Skip to main content

Migration of SQL Server



                                                                      Migration

Pre-migration check list:

1. Take backup of all databases including system databases
2. Analyze the disk space of the target server for the new database.
3. Confirm the data and log file location for the target server.
4. Collect the information of database logins, users and their permissions. (Optional)
5. Check the database for the Orphan users. (EXEC sp_change_users_login @action='report')
6. sp_change_users_login 'Auto_Fix', userNAME, NULL
7. Check the SQL Server for any dependent objects (SQL Agent Jobs and Linked Servers)


Procedure of migration and post migration check list.

1. Make a copy of the data and log file using detach.
2. Attach to target server.
3. Change the compatibility level.
4. Run DBCC upgrade usage DBCC Updateusage (“DB”) with count_rows.( Reports and corrects            pages and row count inaccuracies in the catalog views.)
5. Run DBCC CHECKDB DBCC CHECKDB (DB) with ALL_ERRORMSGS.
6. Update the statistics using sp_updatestats.
7. Change the page verify from Torn_Page_Detection to Check_Sum.
8. Run DBCC CHECKDB with all_errormsgs

Comments

Popular posts from this blog

Self Introduction and Responsibilities of a SQL Server DBA.

Hi, Self Introduction:                      I am Vang chew bigger , currently I am working with   Citronics , Here my role is SQL Server Database Administrator , I am having 3+ yrs Exp in SQL SERVER DBA with T-SQL, I have experience on SQL Server 2000, 2005 and 2008, I have a great experience on installation and configuration of SQL SERVER versions, and also applying the patches, hot fix, services packs and RTM’s accordingly, involved in upgrading on in place and side by side as per client requirement, and also Migrating the database on SQL SERVER 2000 to 2005 and 2008, Solid experience on configuring and maintenance of High availability SQL Server solutions, including Log shipping, Database Mirroring, Replication(Transactional and Merge) and SQL Server Clustering., having experience on performance tuning on server level, database level and query level, Responsible for working with application developers in identifying,...

Shrinking a SQL Server Log File with Database in Always ON Availability.

Shrinking a SQL Server Log File with Database in Always ON Availability.                    Once we had a situation in our production server that the database which is in Always ON Availability group has been grown to the maximum size.  Many of them say that we can't shrink the log file as the database is in Always ON and we should take the downtime to perform the operation. But we shrink-ed the database log file to 5 GB from 180 GB. Steps are as below: --To Check the Number of pages allocated by the LogFile. DBCC LOGINFO --To check the file sixe sp_helpdb [SQLPantry] --To check the Log file Size DBCC SQLPERF(LOGSPACE) The above statement will show the logspace of all db at present situation. --To check the Log_reuse_wait description of a log file. select log_reuse_wait_desc,* from sys.databases The above statement will show the status of the log whether it has to be backuped i.e., LogBackup, Nothing, Ac...

Frequently Raised Errors in Log-Shipping

1. Question : IS it possible to log ship database between SQL 2000 & SQL 2008?  Answer: No, thats impossible, In SQL 2008 transaction log architecture is changed compared to SQL 2000 and hence you won’t be able to restore tlog backups from SQL 2000 to SQL 2008 or vice versa. 2. Question:I’m getting the below error message in restoration job on secondary server, WHY? [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 4305: [Microsoft][ODBC SQL Server Driver][SQL Server]The log in this backup set begins at LSN 7000000026200001, which is too late to apply to the database. An earlier log backup that includes LSN 6000000015100001 can be restored. [Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating abnormally. Answer: Was your sql server or agent restarted Y’day in either source or destination ? because the error states there is a mismatch in LSN. A particular tran log was not applied in the destination server he...