SQL and ASP.net Related Practical Problems
very useful query
HEY.... TO CLEAR THE DATABASE LOG BETTER USE THIS QUERY.BACKUO LOG DBNAME WITH NO_LOGDBCC SHRINKFILE(LOGFILE,1)********SOME ADDITIONAL INFORMATIONTO GET THE LOG FILE NAME USE THE COMMANDUSE DBNAMESP_HELPFILE***********TO GET THE LOG FILE AND LOG % STATUS OF ALL THE DATABASESDBCC SQLPERF(LOGSPACE)****HOPW THIS INFO WILL BE HELPFULCHEERS VARUN BHAGAT
HI The actual query is USE DatabaseNameGODBCC SHRINKFILE(, 1)BACKUP LOG WITH TRUNCATE_ONLYDBCC SHRINKFILE(, 1)GO
Post a Comment
3 comments:
very useful query
HEY.... TO CLEAR THE DATABASE LOG BETTER USE THIS QUERY.
BACKUO LOG DBNAME WITH NO_LOG
DBCC SHRINKFILE(LOGFILE,1)
********
SOME ADDITIONAL INFORMATION
TO GET THE LOG FILE NAME USE THE COMMAND
USE DBNAME
SP_HELPFILE
***********
TO GET THE LOG FILE AND LOG % STATUS OF ALL THE DATABASES
DBCC SQLPERF(LOGSPACE)
****
HOPW THIS INFO WILL BE HELPFUL
CHEERS
VARUN BHAGAT
HI The actual query is
USE DatabaseName
GO
DBCC SHRINKFILE(, 1)
BACKUP LOG WITH TRUNCATE_ONLY
DBCC SHRINKFILE(, 1)
GO
Post a Comment