two undocumented Stored Procedures that allow you to process through all tables in a database, or all databases in a SQL Server instance http://www.databasejournal.com/features/mssql/article.php/3441031/SQL-Server-Undocumented-Stored-Procedures-spMSforeachtable-and-spMSforeachdb.htm
Category: sql server administration
This would be run for each db in turn. 1. Pause log backup job 2. On primary – alter database [dbname] set partner off 3. On primary – ALTER AVAILABILITY GROUP [agname] ADD DATABASE [dbname] 4. On secondary – ALTER DATABASE [dbname] SET HADR AVAILABILITY…
All of these instructions should be done as a database admin, with the restored database selected. First, make sure that this is the problem. This will lists the orphaned users: EXEC sp_change_users_login ‘Report’ If you already have a login id and password for this user,…
Enable the Database Mail XPs: USE master GO sp_configure ‘show advanced options’,1 GO RECONFIGURE WITH OVERRIDE GO sp_configure ‘Database Mail XPs’,1 GO RECONFIGURE GO Create a new mail profile: USE msdb GO EXECUTE msdb.dbo.sysmail_add_profile_sp @profile_name = ‘admin’, @description = ‘Profile for sending Automated DBA Notifications’…
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL10.MSSQLSERVERClusterStateSQL_Engine_Core_Inst set to 0
create new computer object in correct OUwith the name you want to use as the sql cluster name disable the account assign perms (I wound up giving the windows cluster, sql server service account user, and my domain admin account full perms to the new…
2 IPs for physical servers 1 IP for virtual SQL name 2 IPs for sql servers (used when setting up sql clustering as cluster network 1 and cluster network 2 IPs)
Download SQL server 2008 service pack 3 http://www.microsoft.com/en-us/download/details.aspx?id=27594 Extract SQLServer2008SP3-KB2546951-x64-ENU by running the below command from command line SQLServer2008SP3-KB2546951-x64-ENU /x:”c:SQLSERVER2008SP3″ Run the Setup.exe file from the SQL Server 2008 source media by specifying the /PCUSource parameter. For example: Setup.exe /PCUSource=C:SP1 https://support.microsoft.com/en-us/kb/955392
http://blogs.msdn.com/b/sqlserverstorageengine/archive/2006/10/20/consistency-checking-options-for-a-vldb.aspx DBCC CHECKDB includes: DBCC CHECKALLOC DBCC CHECKCATALOG DBCC CHECKTABLE http://sqlmag.com/blog/unkillable-dbcc-checkdb DBCC CHECKDB(‘DatabaseName’) WITH NO_INFOMSGS, ALL_ERRORMSGS http://www.bpsoftware.com/Blog/post/2008/11/25/SQL-DBCC-CHECKTABLE-on-multiple-tables.aspx — set options SET NOCOUNT ON; SET ANSI_PADDING ON; SET ANSI_NULLS ON; SET QUOTED_IDENTIFIER ON; DECLARE @tablenames TABLE (TableName VARCHAR(255)); — populate table with tablenames INSERT INTO…