Simon's SQL

SQL,DBA,tuning,Trouble Shooting,Performance

Archive for February, 2012

Replication performance tuning

Posted by Simon Cho on 02/23/2012

http://technet.microsoft.com/en-us/library/cc966539.aspx

http://searchsqlserver.techtarget.com/tip/15-SQL-Server-replication-tips-in-15-minutes

http://www.sql-server-performance.com/2005/replication-tuning/

 

Advertisements

Posted in Common | Leave a Comment »

Master rebuild and change check list

Posted by Simon Cho on 02/23/2012

Master DB rebuild and change check list

  1. backup login script http://support.microsoft.com/kb/918992
  2. backup linked server script
  3. Detach databases.
  4. Master rebuild whatever option
  5. When you rebuild or attach master DB, you should know about sa password from original instance.
  6. SQL service pack update if different version.
  7. Attach databases
    • If you move master database from other service, you should drop unnecessary databases.
  8. run #1 login script only for necessary account(s).
  9. change sa password if you want
  10. change master key with force option

    https://simonsql.com/2012/02/23/an-error-occurred-during-decryption/

    ALTER SERVICE MASTER KEY FORCE REGENERATE
  11. change server name
    http://msdn.microsoft.com/en-us/library/ms143799.aspx

    use master
    declare @srvname varchar(255), @new_srvname varchar(255)
    set @srvname = @@servername
    set @new_srvname = 'new hostname'    --your computer hostname
    exec sp_dropserver @srvname
    exec sp_addserver @new_srvname, local
    go
    
  12. change server option if you want to change : sp_configure
    • min max memory
    • ad hoc query
    • e.t.c.

Posted in Common | Leave a Comment »

An error occurred during decryption

Posted by Simon Cho on 02/23/2012

I guess, you had a problem on Master database.
After changed you got linked server error like this.

“An error occurred during decryption.”

The reason why login mapping password can decrypt due to master key changed.
So, you need to generate again master key with force option.

http://support.microsoft.com/kb/914261

ALTER SERVICE MASTER KEY FORCE REGENERATE

Posted in Common | 1 Comment »

SQL Server – Undelete a Table and Restore a Single Table from Backup

Posted by Simon Cho on 02/01/2012

http://weblogs.sqlteam.com/mladenp/archive/2010/10/12/sql-server-ndash-undelete-a-table-and-restore-a-single.aspx

Posted in Common | Leave a Comment »