SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Migration plan
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sqlfresher2k7
Aged Yak Warrior

583 Posts

Posted - 03/29/2012 :  10:30:25  Show Profile  Reply with Quote
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 - 03/29/2012 :  10:31:24  Show Profile  Reply with Quote
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

583 Posts

Posted - 03/29/2012 :  10:35:26  Show Profile  Reply with Quote
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 - 03/29/2012 :  10:50:05  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000