to exportusing script

Here is the script to export schema name is  RRI, my directory is /backup6
how will I modify this script for the schema RRI  and location /backup6



set -x
. /ldba/

export NLS_LANG


PASSWORD=`grep -w SYSTEM $LDBAPSWD | awk '{print $2}'`


exit 0
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
I do not understand the question:

Here is the script to export schema name is  RRI, my directory is /backup6
how will I modify this script for the schema RRI  and location /backup6

If that is the script for RRI and /backup6, then there is no need to modify it?
Steve WalesSenior Database AdministratorCommented:
You are currently, in this script, exporting a schema represented by the environment variable $USER:


The script is defined for $USER to be the first parameter when the script is called (that's what $1 is):


The destination for the export is an Oracle directory called DUMP_EXADATA


From within SQLPLUS, check the defintion of that directory:

select * from dba_directories;

Where is DUMP_EXADATA pointed ?   To /backup6 ?  If so, you're good.  If not, create a new directory pointing there and modify the call to expdp accordingly.

create directory NEWDIR as '/backup6';
grant read, write on directory NEWDIR to SYSTEM;

(Since SYSTEM is who the script is exporting under).

Also:  Don't use EXPDP as your sole means of backup.  If this is an export for some other reason, then fine.  If it's meant as your primary means of backing up this data you may find yourself in trouble down the line, since you can't use an export for point in time recovery.  If this is some form of static data that never changes, then you'll probably be OK.  Just be aware of the limitation of exp/expdp as the primary means of backing up data.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thomaslijuAuthor Commented:
SYS@sprefuat1> select * from dba_directories;

OWNER                          DIRECTORY_NAME
------------------------------ ------------------------------
SYS                            DUMP_FILES2

SYS                            DATA_PUMP_DIR

SYS                            DUMP_FILES

OWNER                          DIRECTORY_NAME
------------------------------ ------------------------------
SYS                            WORK_DIR

SYS                            ARROWGB

SYS                            FDE_DS

OWNER                          DIRECTORY_NAME
------------------------------ ------------------------------
SYS                            SNP_MANUFACTURE

SYS                            GLP_MANUFACTURE

SYS                            GLP_DATA_LOAD

OWNER                          DIRECTORY_NAME
------------------------------ ------------------------------
SYS                            ORACLE_OCM_CONFIG_DIR

SYS                            TMP

11 rows selected.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

slightwv (䄆 Netminder) Commented:
I see no directory named DUMP_EXADATA.

You need to create it pointing to /backup6.

create or replace directory DUMP_EXADATA as '/backup6';
DavidSenior Oracle Database AdministratorCommented:
Thomas, it helps me to think of the expdp directory as an alias or variable, rather than a file system.  However, the file system that the alias resolves to, must have the appropriate read-write O/S permissions.  What Steve mentions in (39889054) about the read & write is internal to Oracle. You need both internal rights, and external.
thomaslijuAuthor Commented:
These are the schemas to export..
nohup AUGEAS &
nohup BLS &
nohup CAPIQ &
nohup CAPIQ_INCR &
nohup CGS_ETL_USER &
nohup CLARITAS &
nohup COMUTIL &

If I want to export this CAPIQ schema..

What should be the modified script..
Steve WalesSenior Database AdministratorCommented:
Looks like you've already got this exporting CAPIQ:

>>nohup CAPIQ &

All the "nohup" and "&" are doing is spawning the job to run in the background and allowing the initiating user to logoff if necessary without killing the job.

The " CAPIQ" is what is doing the work.
thomaslijuAuthor Commented:
So in order to export CAPIQ
I have to do
nohup CAPIQ &

in command line
Steve WalesSenior Database AdministratorCommented:
Assuming you've created a directory inside Oracle pointing to the place you want the export sent to, granted read/write to the user running the export (according to the docs the user creating the directory has read/write on it, so if you create as system and export as system it should have those permissions) and assuming the oracle user at the operating system level has write permissions to /backup6 then you should be good to go.

The logfile of the job will be in /backup6 and will be called what's specified in the LOGFILE directive:

thomaslijuAuthor Commented:
so logout from sql
come to os
run the command
nohup CAPIQ &
Steve WalesSenior Database AdministratorCommented:
thomaslijuAuthor Commented:
but you may see this.

nj09mhf0362[oracle:sprefuat1] 40: nohup TULLETT &
[1] 15940
nj09mhf0362[oracle:sprefuat1] 41: + . /ldba/ /ldba/ not found
[1]    Exit 1      TULLETT
nj09mhf0362[oracle:sprefuat1] 41: nohup TULLETT &
[1] 18771
nj09mhf0362[oracle:sprefuat1] 42: + . /ldba/ /ldba/ not found

[1]    Exit 1      TULLETT
nj09mhf0362[oracle:sprefuat1] 42: cd /ldba
nj09mhf0362[oracle:sprefuat1] 43: ls
10gR2_migration_to_exadata/   fix.sql                       set_cgsods11.csh*             set_cgsodsui.csh*   
afiedt.buf                    fix.txt             *    *              set_sprefuat.csh*
analyzefinmaster.sql          foo                           set_cgsodspr.csh*             set_cgsodsut1.csh@            set_sprefuat.csh.before_rac
chk_all_invalid.log           libobk.so64.1@      *       *
ck_obj.lst                    log/                          set_cgsodsqa1.csh@            set_cgsodsut.csh*   
com/                          lost+found/            *              shrink.sql
control.bkp                   mhf0362/                      set_cgsodsqa.csh*   *          shrink.sql.fin_master_ts
copy.txt                      null/               *              set_sprefprd.csh    
dead.letter                   oradiag_oracle/               set_cgsodsui1.csh@                 tmp/
exp_script/                   rc_syn.log                       set_sprefuat1.csh@
nj09mhf0362[oracle:sprefuat1] 44: cd 10gR2_migration_to_exadata/
nj09mhf0362[oracle:sprefuat1] 45: ls
afiedt.buf                      create_public_db_links.exe      create_tablespaces.exe          idx_tablespaces.sql             recreate_dblink_with_pswd.exe
alter_user.exe                  create_public_db_links.sql      create_users.exe      *                   role_grants.exe
alter_user.sql                  create_public_synonyms.exe      create_users.sql                job_sync.exe                    role_grants.sql
char_conv/                      create_public_synonyms.sql*                 job_sync.sql                    sys_privs.exe
chg_idx_tablespace.sql          create_quotas.exe                  logs/                           sys_privs.sql
chg_noparallel.sql              create_quotas.sql     *             sys_tab_privs.exe
ck_obj.lst                      create_roles.exe      *                   object_counts.sql               sys_tab_privs.sql
create_dblink.exe               create_roles.sql                extract_tablespaces.sql           system_tab_privs.exe
create_profiles.exe             create_schema_owners.exe        gen_export_schemas.sql          rc_dblink.sql                   system_tab_privs.sql
create_profiles.sql             create_schema_owners.sql        gen_export_syns_schemas.sql     rec_dblink.sql
nj09mhf0362[oracle:sprefuat1] 46:
slightwv (䄆 Netminder) Commented:
>> /ldba/ not found

OK, from the ls command, that doesn't exist. We cannot help you with that since that is not a default Oracle script.

>>nohup TULLETT &

For testing don't use nohup and &

Just use: TULLETT
Steve WalesSenior Database AdministratorCommented:
For a start, your script "./ldba/" seems to be missing.

The script is assuming that from the OS level directory you're running from, there's a directory there called ldba and within that directory is another script called

You should make sure that exists.  That's what your script is complaining about at the moment.

I guess it begs the question, where did you get the script from ?  Is it something  you've grabbed from the internet or something that was already on the machine.

We can tell you that it's missing, but have no idea what it does since it appears to be a custom script.
Guy Hengel [angelIII / a3]Billing EngineerCommented:
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
slightwv (䄆 Netminder) Commented:
thomasliju is under suspension for multiple accounts and has been instructed to come back and close ALL his open questions in ALL accounts before the suspension is lifted.
thomaslijuAuthor Commented:
nohup CAPIQ &

yes nohup is helped.
slightwv (䄆 Netminder) Commented:

The original question was:
how will I modify this script for the schema RRI  and location /backup6

I fail to see how "nohup CAPIQ &"  answered the question asked.

Please close your questions properly.  I will have a Moderator take a look at this question.
slightwv (䄆 Netminder) Commented:
I feel the asker just wanted to modify an existing script to add a new schema to it and to a new location.  Then it morphed into a different question where they didn't understand the environment (missing files and such).

Based on that I feel the following posts would be enough to answer it:

Given the history of this particular member, I want them to come back and answer it properly and not have Cleanup or Moderators answer it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.