Changing filegroup

  • Executing the following is giving the same info. under name column.

    exec sp_helpdb 'Database1'

    go

    exec sp_helpdb 'Database2'

    go

    How do I correct the name of any database.

    Thank you all.

    -R

  • sp_helpdb returns two result sets... first resut set NAME column is the database name and should be different....It can't be the same...

    Second result set NAME column is names of logical database files and they can be same for two different dbs...I don't see any reason to change them...

    If you want to check the ALTER DATABASE ... command in BOL....

     

    MohammedU
    Microsoft SQL Server MVP

  • I apologize, I meant the second set of result set.

    We have two identical databases to serve testing and development purposes. I thought it's better to differentiate between those two not only by the database name, but also by the logical name.

    Thanks.

  • Take it easy... there is nothing wrong to aplogize...

    As I mentioned ... if you want to change you have to use it ALTER DATABASE...MODIFY FILE... command...

    Note: When you restore again from production to this db then your logical file names must be the same as production...otherwise restore will fail..

     

     

     

    MohammedU
    Microsoft SQL Server MVP

  • "We have two identical databases to serve testing and development purposes. I thought it's better to differentiate between those two not only by the database name, but also by the logical name"

    Why should they be different ?

    That the logic file names have the same value is not significant.

    SQL = Scarcely Qualifies as a Language

  • Actually I have decided not to change the logical file names since the logical names are not relevant to the application.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply