date oracle (merged 3) [message #404707] |
Sat, 23 May 2009 00:00 |
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 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
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
|
|
|