DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Can Oracle during startup or right after startup before 1 user connect execute state

  1. #1
    Join Date
    Feb 2001
    Posts
    35

    Unhappy

    Can Oracle during startup or right after startup before 1 user connect execute some SQL statement?

  2. #2
    Join Date
    Mar 2001
    Posts
    18

    Wink

    You can if your database is any version of 8i, as you can create a trigger on a system event.

    Dave

  3. #3
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Yes if you are using Oracle8i. You can use database event triggers for this purpose (AFTER STARTUP ON DATABASE trigger).
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  4. #4
    Join Date
    Feb 2001
    Posts
    35
    i have 7.3.4

  5. #5
    Join Date
    Feb 2001
    Posts
    123
    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.

  6. #6
    Join Date
    Feb 2001
    Posts
    35
    How can i run script after startup autamatically?

    Please give me example

  7. #7
    Join Date
    Feb 2001
    Posts
    123
    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.

  8. #8
    Join Date
    Feb 2001
    Posts
    35
    I have 7.3.4 on NT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width