Skip to main content

Suspect Database.


    Some time we come to see the database are in Suspect Mode after coming to the shift and checking the databases as part of the daily routine checks.

To Fix this follow the below steps.


  1. EXEC SP_RESETSTATUS <'DBNAME'>;
  2. ALTER DATABASE <'DBNAME'> SET EMERGENCY;
  3. DBCC CHECKDB('DBNAME');
  4. ALTER DATABASE <'DBNAME'> SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
  5. DBCC CHECKDB ('DBNAME', REPAIR_ALLOW_DATA_LOSS);
  6. ALTER DATABASE <DBNAME> SET MULTIUSER;
  7. GO





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...

Video's Links of SQL Server.

YouTube Video's Links of SQL Server. Monitoring of Database Objects for Space Issues https://youtu.be/ywfEeHnr8sw Please Like, Subscribe, share the videos of my channel...!!! Increase in the Growth of the Log File | SQL Server https://youtu.be/eWvfwqPB6to Please Like, Subscribe, share the videos of my channel...!!! To find the Active Running Transactions on SQL Server. https://youtu.be/6jPl1jKRfvU Please Like, Subscribe, share the videos of my channel...!!! Shrinking a Log File of a Database in Always on Availability. https://youtu.be/VKlbiz-HNbQ Please Like, Subscribe, share the videos of my channel...!!! Self Introduction and Responsibilities of DBA. https://youtu.be/Td-8nQ6cRe4 Please Like, Subscribe, share the videos of my channel...!!! Re-Indexing of Database. https://youtu.be/0Dd2ylJBjG8 Please Like, Subscribe, share the videos of my channel...!!! Shrinking of LDF and MDF Files on Drives https://youtu.be/LtbSaiHu6Ho Please Like, Subscribe, share t...