-
Can Oracle during startup or right after startup before 1 user connect execute some SQL statement?
-
You can if your database is any version of 8i, as you can create a trigger on a system event.
Dave
-
Yes if you are using Oracle8i. You can use database event triggers for this purpose (AFTER STARTUP ON DATABASE trigger).
-
-
The best suggestion I can offer in light of the fact that you have 7.3.4 is to modify your startup script so that it does a 'startup open restrict' instead of a standard startup - thus only allowing users with the RESTRICTED_SESSION system privilege to connect (typically, this will only be the DBA users).
Then the script could run your SQL script, and finally issue the SQL command 'alter system disable restricted session' to allow the normal database users to connect.
HTH
David.
-
How can i run script after startup autamatically?
Please give me example
-
Hmm, I guess I fell into the trap of assuming everyone is on the same operating system as I am - sorry. I am on AIX, and the databases are started using operating system scripts. If this is the case, the actual startup command is run from a svrmgr session that is run from within the startup script. In this case, just run the script by issuing the command
'@script_name' before the exit statement that terminates the svrmgr session.
If you are on NT where the database is started via services, then, sorry, I am unable to help you.
HTH
David.
-