Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Location
    India
    Posts
    2

    Unanswered: how to execute a sql script at sybase server start up

    I want to run a sql script on sybase server startup .I have added the isql with the script name in the RUN_<<servenrname>>.bat So that the script creates the temporary stored procedure in the temp db.

    but the Sp is not created....

    Do any one have any idea to perform it

  2. #2
    Join Date
    Sep 2002
    Location
    Hong Kong
    Posts
    159

    Re: how to execute a sql script at sybase server start up

    The ASE can accept connections before all the databases are online, so you may be trying to create a stored procedure in an unrecovered database.

    As part of your script, check the database is online before creating the stored procedure. Loop around as necessary

  3. #3
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    Hiya,

    I think I understand what you are trying to achieve here. You want to make some objects available in the tempdb as soon as ASE is available for logins.

    You don't have to do that with fancy scripting. Simply have those objects created in the model database and each time tempdb is created at startup those objects are already available.

    Remember, the downside is that the same objects will be avilable in all new userdatabases as well.

    Cheers
    Willy

Posting Permissions

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