Skip to Content
avatar image
Former Member

How can i Switch database inside procedure in Sybase ASE

In SQL Server I am using "use database_name" in exec statement inside procedure..

but Sybase ASE i cant able to change database dynamically...

can anyone help me please

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    May 29, 2015 at 06:25 AM

    Hello Srinath,

    In Sybase ASE you can use "alter database_name" to change database dynamically.

    Also refer below links for detailed information.

    Alter Database Syntax -----> SyBooks Online

    Alter Database Command -----> SyBooks Online

    Thanks And Regards,

    Parth Raval

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2015 at 10:23 AM

    Hi Srinath,

    What's your exact need..??

    If you want to extend size of data device, log device, data device/log device for saptools, etc.., you can use transaction "DBACOCKPIT".

    Thanks And Regards,

    Parth Raval

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      My Need is dynamically changing database inside procedure (like use database_name)..use database_name command not working inside procedure..

  • avatar image
    Former Member
    May 29, 2015 at 10:47 AM
    Add comment
    10|10000 characters needed characters exceeded

  • May 30, 2015 at 01:45 AM

    For one possible solution, see my response to your post in the ASE Developer forum:

    Add comment
    10|10000 characters needed characters exceeded