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: 68665
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: error ORA-25153: Temporary Tablespace is Empty (merged)
Next Topic: CPU Patch Failed
Goto Forum:
  


Current Time: Wed Jul 03 07:24:09 CDT 2024