Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> export file name
I would like to pass in the users schema name and the date of the export and the sequenceid from a database sequence called ExportDumpID for the name given to the export dump file.
So far I have the date and sequence passed into the filename using sqlplus scripting.
Then I have a pl-sql function (within a package body) which returns the username of the user currently logged in.
Any ideas on how to now put/syntax the username returned by the function into the sqlplus script to be returned into the export filename like the date and sequence number?
To become for example
betty_08JUN2001_45.dmp
Many Thanks.
Thiko!
column user new_val user
column today new_val dt
column sequence new_val seq
SELECT TO_CHAR(sysdate,'dd-mm-yyyy HH24:MI') today FROM dual; SELECT ExportDumpID.NEXTVAL seq FROM dual;
host exp FILE=exp_&user_&dt_&seq.dmp OWNER=Y GRANTS=Y ROWS=Y COMPRESS=Y exit
--
![]() |
![]() |