Step by Step
|
--step1: Reading current log
sp_readerrorlog
--step2: Reading archie1 log
sp_readerrorlog 1
--step3: Reading agents current log
sp_readerrorlog 0,2 --2 indicates
agent log 1 for sql log
--step4: To filter errorlog for error word
sp_readerrorlog 0,1,'error'
--step5: To recycle errorlog
sp_cycle_errorlog
--step6: Check current log after recycling
sp_readerrorlog
--step7: To recycle sql agent log
use msdb
go
sp_cycle_agent_errorlog
--step8: Backup of master database
backup database master to disk='master.bak'
--step9: Check the errorlog for backup details
sp_readerrorlog 0,1,'master'
--step10: Backup fails..
backup database master1 to disk='master1.bak'
--step11: Check errorlog
sp_readerrorlog 0,1,'master1'
--step12: To customize event
logging we can use trace flags
dbcc traceon(3226,-1) --3226 avoid success entries into errorlog
--step13: Take backup of any
database
backup database msdb to disk='msdb.bak'
--step14: Check msdb backup
details. Not recorded
sp_readerrorlog 0,1,'msdb'
--step15: Make trace flag off
dbcc tracestatus--To enabled trace flags
dbcc traceoff(3226,-1)
|
no
no
Subscribe to:
Posts (Atom)
SQL Server DBA Demo
On 15-Feb-2019 @6 PM. For details: 9177166122
Follow Me
Subscribe YouTube
Popular Posts
-
* Error Logs maintains events raised by SQL Server database engine or Agent. * Error Logs are main source for troubleshooting SQL Server...
-
* It is a new feature introduced in SQL Server 2005. * While working with large tables, generally we face the following problems ...
-
First 2 steps should be executed in primary server and copy 2nd step output and run in standby or second server --step1 USE master GO IF OB...
About Me
- Kareem Syed
- Senior Architect and Trainer working on SQL Server and Azure
Contact: optimizeolt@gmail.com
My Published Articles
http://www.codeproject.com/Articles/485124/Configuring-Database-Mail-in-SQL-Server http://www.codeproject.com/Tips/537811/Rebuilding-master-database-in-SQL-Server
Followers
Recent Posts
SQL Server DBA Demo
On 07-Feb-2019 @9 AM
SQL Server DBA Demo
On 07-Feb-2019 @9 AM
SQL Talk
Welcome to SQL Talk
SQL-TALK is dedicated website to talk about SQL Server and other Microsoft products. I am a strong supporter of Microsoft and their products specially SQL SERVER, Azure, PowerShell. I have very good hands on experience on SQL Server and other Microsoft products. I want to share my experience to interested SQL and Microsoft products lovers. I have conducted corporate training for different organizations...
Recent Posts
no
Recent Comments
Flickr
Copyright © 2015. WP Code125 converted by MyTemplatesLab
Hi, I am Kareem Syed having 16+ years experience in SQL Server and Azure.
I have conducted corporate training for different organizations like CTS, Infotech India Private Ltd, Canara Bank, RPS Consulting, Genpact, Micro Academy, CYIENT, FiServ, NiteoIT, WiseLearner, Bank of America, TS Police dept, CapitalIQ and more...
No comments
Post a Comment
Note: Only a member of this blog may post a comment.