Database name change

  • Hi,

    How do I change the name of database that has a period(.) in it's name?

    For eg.

    Client.Database

    Thank you.

    Suhas.

  • alter database [My.DB] modify name = [My.New.DB.Name]

  • The same way you'd rename any database. Either right-click in SSMS and select 'rename' or user sp_renamedb.

    sp_renamedb 'Client.Database', 'NewDatabase'

    or Alter Database

    alter database [Client.Database] modify name = [NewDatabase]

    Greg

  • Thanks.

    That was easy. Embarassing for me.

Viewing 4 posts - 1 through 3 (of 3 total)

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