Comments on: Renaming Your MS SQL 2008 Database https://thomaslarock.com/2009/07/renaming-your-ms-sql-2008-database/ Thomas LaRock is an author, speaker, data expert, and SQLRockstar. He helps people connect, learn, and share. Along the way he solves data problems, too. Fri, 11 May 2012 05:54:00 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: Geetika https://thomaslarock.com/2009/07/renaming-your-ms-sql-2008-database/#comment-6954 Fri, 11 May 2012 05:54:00 +0000 http://thomaslarock.com/?p=2305#comment-6954 it does not renames the .mdf file

]]>
By: Nosferatu https://thomaslarock.com/2009/07/renaming-your-ms-sql-2008-database/#comment-778 Thu, 08 Oct 2009 16:13:49 +0000 http://thomaslarock.com/?p=2305#comment-778 Check http://www.kodyaz.com/articles/alter-single-user-multi-user-mode.aspx

Use select spid from master..sysprocesses where dbid = db_id(‘Works’) and spid @@spid

kill all spids

and then rename from Microsoft SQL Server Management Studio

]]>
By: ElmerG https://thomaslarock.com/2009/07/renaming-your-ms-sql-2008-database/#comment-777 Sun, 16 Aug 2009 04:33:24 +0000 http://thomaslarock.com/?p=2305#comment-777 i wholeheartedly agree with you on the first method. simple and names are under your control. wont confuse you or any new guy who comes along after you without knowing about what you did. saves a lot
of headaches when you go back to that later (say a year after).

***

]]>
By: Something for the weekend 10/07/09 | John Sansom - SQL Server DBA in the UK https://thomaslarock.com/2009/07/renaming-your-ms-sql-2008-database/#comment-776 Fri, 10 Jul 2009 10:49:53 +0000 http://thomaslarock.com/?p=2305#comment-776 […] Renaming Your MS SQL 2008 Database – Thomas La Rock tells of his early days as a SQL Server padowan and how he tackled this problem we’ve all had to work on at some point. […]

]]>
By: K. Brian Kelley https://thomaslarock.com/2009/07/renaming-your-ms-sql-2008-database/#comment-775 Wed, 08 Jul 2009 14:59:28 +0000 http://thomaslarock.com/?p=2305#comment-775 By doing detach and attach, if you’ve got anything else configured, like FILESTREAM or cross database ownership chaining, you lose that configuration. Better to use the ALTER which allows you to do the move without losing the config info.

]]>
By: Steve Meder https://thomaslarock.com/2009/07/renaming-your-ms-sql-2008-database/#comment-774 Tue, 07 Jul 2009 21:30:20 +0000 http://thomaslarock.com/?p=2305#comment-774 Keep in mind there could be the issue of 3 part naming of the database in the stored procedures and other objects using the old database name.

]]>
By: Thomas LaRock https://thomaslarock.com/2009/07/renaming-your-ms-sql-2008-database/#comment-773 Tue, 07 Jul 2009 14:30:49 +0000 http://thomaslarock.com/?p=2305#comment-773 In reply to Stephen Swan.

would i lose login info if i kept everything on the same instance? i was always under the impression that same server restores did not require me to take any extra measures when it comes to logins. i cannot imagine that a detach and attach would be have differently than a same server restore.

now, detach and then reattach to a new server would certainly cause an issue with logins and permissions, no doubt. it is the same with a restore as well, you need to take extra steps to preserve the logins and permissions.

]]>