Skip to content

ORA-27040: file create error, unable to create file

I tried to export one schema using datapump in Enterprose linux enviornment , It shows following error

[oracle@localhost ~]$ expdp test/test directory=my_test dumpfile=my_test.dmp nologfile=y

Export: Release 10.2.0.1.0 – Production on Tuesday, 27 April, 2010 20:16:00

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file “/tmp/backup/my_test.dmp”
ORA-27040: file create error, unable to create file
Linux Error: 13: Permission denied

The above error for that partticular directory is for root user. Its not permissable directory for Oracle.So we need to give permission to oracle for particular directory.

[root@localhost tmp]# ls -ld backup/
drwxr-xr-x 2 root root  4096 Apr 27 18:01 backup/

[root@localhost ~]# cd /tmp
[root@localhost tmp]# chown -R oracle:oinstall backup/
[root@localhost tmp]# ls -ld backup/
drwxr-xr-x 2 oracle oinstall 4096 Apr 27 18:24 backup/

Now you can take backup using datapump 🙂

[oracle@localhost ~]$ expdp test/test directory=my_test dumpfile=my_test.dmp nologfile=y

Export: Release 10.2.0.1.0 – Production on Tuesday, 27 April, 2010 20:18:14

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Production
With the Partitioning, OLAP and Data Mining options
Starting “TEST”.”SYS_EXPORT_SCHEMA_01″:  test/******** directory=my_test dumpfile=my_test.dmp nologfile=y
Estimate in progress using BLOCKS method…
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
. . exported “TEST”.”T”                                  7.812 KB      14 rows
Master table “TEST”.”SYS_EXPORT_SCHEMA_01″ successfully loaded/unloaded
******************************************************************************
Dump file set for TEST.SYS_EXPORT_SCHEMA_01 is:
/tmp/backup/my_test.dmp
Job “TEST”.”SYS_EXPORT_SCHEMA_01″ successfully completed at 20:18:26

One Comment Post a comment

Trackbacks & Pingbacks

  1. where can I find it?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: