2 items found with tag: sql server RSSATOM
0 votes
If you need to move the tempdb to another drive in SQL Server, use this SQL: use master go Alter database tempdb modify file (name = tempdev, filename = 'E:\Sqldata\tempdb.mdf') go Alter database tempdb modify file (name = templog, filename = 'E:\Sqldata\templog.ldf') Go Don't forget to modify the paths according to your own server paths.
0 votes
If you ever migrate a SQL Server database from one server to another, you'll find that the database IDs get messed up when you reattach the database. Use the SQL below to migrate the database's legacy ids to the new server's ids: USE dbname go EXEC sp_change_users_login 'Update_One', 'oldid', 'newid'