Home » Articles posted by rohitmssqlfun (Page 58)

Author Archives: rohitmssqlfun

Why Can’t I Set a Default SQL Server Schema for My Windows Group Login?

Application doesn’t use the dbo schema and I need to set the users coming into the database to use the correct schema automatically. We’re using Windows groups and whenever I go to set a default schema, SQL Server gives me an error. How can I set the default schema for my users? The short answer … Continue reading

SQL Server 2008 || Parallel DBCC (Database Console Commands)

SQL Server 2008 Enterprise gives you the added boost to verify your data quickly and efficiently with multiprocessor support. Database console commands such as DBCC CHECKDB, DBCC CHECKFILEGROUP, and DBCC CHECKTABLE check the allocation and integrity of the database objects. In short, these commands are used to ensure that the database is free from corruption—pages … Continue reading

How to Recycle SQL Server error logs – 5 Types of logs

1) Recycle SQL Error log exec msdb..sp_cycle_errorlog 2) Recycle SQL Agent Error log exec msdb..sp_cycle_agent_errorlog 3) Recycle(rollover) SQL Server Default trace EXEC sp_configure ‘default trace’, 0 RECONFIGURE EXEC sp_configure ‘default trace’, 1 RECONFIGURE 4) Recycle SQLFT#.Log a. Before 2008 – restart the indexer b. After 2008 – no way to cycle to full text log … Continue reading

SQL Server 2005 Onwards – Mirrored Backup || Cool Feature

SQL Server 2005 onwards includes the mirroring of backup media sets to provide redundancy of your critical database backups. Mirroring a media set increases backup reliability by reducing the impact of backup-device malfunctions. These malfunctions are very serious because backups are the last line of defense against data loss. SQL Server 2005 Standard Edition supports … Continue reading

How to find current/particular transaction level?

There is 2 ways of finding current / particular transaction level :- 1) SELECT CASE transaction_isolation_level WHEN 0 THEN ‘Unspecified’ WHEN 1 THEN ‘ReadUncomitted’ WHEN 2 THEN ‘Readcomitted’ WHEN 3 THEN ‘Repeatable’ WHEN 4 THEN ‘Serializable’ WHEN 5 THEN ‘Snapshot’ END AS TRANSACTION_ISOLATION_LEVEL FROM sys.dm_exec_sessions where session_id = @@SPID 2) DECLARE @UserOptions TABLE(SetOption varchar(100), Value … Continue reading