Search This Blog

Saturday, January 27, 2007

exp + date

E:\>echo %date%
01-27-07

E:\>exp scott/tiger file=d:\test_%date% log=d:\test_%date% tables=DEPT

Export: Release 9.0.1.1.1 - Production on Sat Jan 27 10:32:40 2007

(c) Copyright 2001 Oracle Corporation. All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table DEPT 4 rows exported
Export terminated successfully without warnings.

E:\>d:

D:\>dir
Volume in drive D has no label.
Volume Serial Number is 54DF-1372

Directory of D:\

01-27-07 10:32 AM 6,144 test_01-27-07.DMP
01-27-07 10:32 AM 407 test_01-27-07.LOG
Note : We can edit default date format >>>start ---> control panel--->Regional and language option.
------------------------------------------------------------------------------
SQL> column today new_val dt
SQL> select to_char(sysdate,'ddmmyy') today from dual;

TODAY
------
270107

SQL> host exp userid=scott/tiger tables=emp file=d:\test_&dt..dmp log=d:\test_&d
t..log

Export: Release 9.0.1.1.1 - Production on Sat Jan 27 10:40:08 2007

(c) Copyright 2001 Oracle Corporation. All rights reserved.


Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
tion
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table EMP 14 rows exported
Export terminated successfully without warnings.

SQL> host d:

SQL> host dir
Volume in drive D has no label.
Volume Serial Number is 54DF-1372

Directory of D:\

01/27/07 10:40 AM 8,192 test_270107.dmp
01/27/07 10:40 AM 407 test_270107.log

SQL>

Hope this helps
Taj

No comments: