Home » RDBMS Server » Server Administration » date oracle (merged 3)
date oracle (merged 3) [message #404707] Sat, 23 May 2009 00:00 Go to next message
tjay
Messages: 37
Registered: September 2008
Member
Hi

Oracle 9i on hp unix.
I will make a job take controlfile trace periodically.
How can I change the date part dynamically?
like below:


alter database backup controlfile to trace as '/some/arbitrary/control230509';


alter database backup controlfile to trace as '/some/arbitrary/control240509';


alter database backup controlfile to trace as '/some/arbitrary/control250509';
..
..
..

Re: date oracle (merged 3) [message #404726 is a reply to message #404707] Sat, 23 May 2009 01:14 Go to previous message
Michel Cadot
Messages: 65153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> col mydate new_value mydate
SQL> select to_char(sysdate,'DDMMYY') mydate from dual;
MYDATE
------
230509

1 row selected.

SQL> alter database backup controlfile to trace as '/some/arbitrary/control&mydate';
alter database backup controlfile to trace as '/some/arbitrary/control230509'
*
ERROR at line 1:
ORA-01278: error creating file ...

Of course it cannot create the file but you can see the name is correct.

Regards
Michel

[Updated on: Sat, 23 May 2009 01:15]

Report message to a moderator

Previous Topic: CPU Patch Failed
Next Topic: Archive log is frequently filling
Goto Forum:
  


Current Time: Tue Aug 22 08:15:19 CDT 2017

Total time taken to generate the page: 0.01526 seconds