If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Excute a sqlscript when database startup

Hi,

You must have oracle 8i or later to get system level trigger get going. There are a lot level of triggers. Please go through those. Please refer to PL/SQL guide in otn.oracle.com for details. If you don't have an otn account, create a free otn account.

Re: Excute a sqlscript when database startup

You can also edit the dbstop & dbstart scripts in the $ORACLE_HOME/bin directory. The only downside to this is that you *MUST* use the dbstop & dbstart script to stop & start the database(s). The upside is that should you NOT want to execute the scripts you start the database via sqlplus/svrmgrl (8i =<).

Thank you for answering me.
I really have a problem, this is:
When my database startup, I receive some errors in alert file:
ORA-12012: error on auto execute 0f job 2
ORA-29540: class ttk does not exist
ORA-06512: at "SR.LISTFNAME", line 0 . . .
This server is installed by copying files from another server, I don't know much about it. So I want to fix this problem. I tried query from DBA_TRIGGERS to find out if there is any triggers executed when database is startup, but there isn't. What can I do next ?

The 1st error ORA-12012 refers to database jobs, I suggest the you set the JOB_QUEUE_PROCESSES=0 in your init.ora file. This will prevent all database jobs from running. This should at least get your database up and running.

The 2nd & 3rd errors ORA-29540 & ORA-06512 tell you why the job failed. You also mentioned that the server files were copied, that's probaby why you get the errors, the 2nd error tell you that the ttk java class is missing. So you have to locate the ttk java class on the old server and copy all the directories and files exactly to the new server.

I have checked database init file: JOB_QUEUE_PROCESSES=4
I can't copy java class again because they only gave me those files, no more support.
Can I tell Oracle not run that class ?
I intend to export data and import exported file into my own database but I don't know what sqlscript to run after create my database to ensure every procedures will work well. How can I get information about those from their database ? What information I must set to make my database like their database ?