Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Migration plan

Author  Topic 

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2012-03-29 : 10:30:25
I want a template document for the plan migration of sqlserver migration 2005 to 2008.

I did google but could n't find.

Please help.

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-29 : 10:31:24
Dump and Restore?


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2012-03-29 : 10:35:26
THanks Brett.

I need a sample template document to write up migration plan to get the approval from my boss.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-03-29 : 10:50:05
Not sure what you are exactly looking for, but back up the db and verify it




USE [master]
GO


-- Check to see that the DB is in Good Health

DBCC CHECKDB ('<dbname>')
GO

-- Back up DB to a local drive on the server, not across the network

BACKUP DATABASE [<dbname>]
TO DISK = N'<fp>\<servername>_<instancename>_<dbname>_D<yyyymmdd>_T<hhmiss>.BAK'
WITH NOFORMAT, INIT, NAME = N'<dbnaem> Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO

-- Run This next block through the Verify

DECLARE @backupSetId int

SELECT @backupSetId = position
FROM msdb..backupset
WHERE database_name=N'<dbname>'
AND backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'<dbname>' )

IF @backupSetId is null
BEGIN
raiserror(N'Verify failed. Backup information for database ''<dbname>'' not found.', 16, 1)
END

RESTORE VERIFYONLY
FROM DISK = N'<fp>\<servername>_<instancename>_<dbname>_D<yyyymmdd>_T<hhmiss>.BAK'
WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO

-- Run this to test the back up. Once the Backup Verify is restored, go check the verify database

-- Check for logical file names and locations

RESTORE FILELISTONLY
FROM DISK = N'<fp>\<servername>_<instancename>_<dbname>_D<yyyymmdd>_T<hhmiss>.BAK'
GO

-- Test the Backup

ALTER DATABASE <dbname>_VERIFY SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO

-- Restore Database to Verify

RESTORE DATABASE <dbname>_VERIFY
FROM DISK = N'<fp>\<servername>_<instancename>_<dbname>_D<yyyymmdd>_T<hhmiss>.BAK'
WITH MOVE '<dbname>' TO '<fp DBFile>\<dbname>\<dbname>_VERIFY.MDF'
, MOVE '<dbname>_LOG' TO '<fp DBFile>\<dbname>\<dbname>_VERIFY.LDF'
, REPLACE
GO

-- Put the database into Multi user and read write mode

ALTER DATABASE <dbname>_VERIFY SET READ_WRITE
ALTER DATABASE <dbname>_VERIFY SET MULTI_USER
GO

-- Check out the Verify DB to make sure it looks good.

USE [<dbname>_VERIFY]
GO



Then do the Restore to the New Instance


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -