Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

backup Expand / Collapse
Author
Message
Posted Thursday, June 20, 2013 6:24 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:37 PM
Points: 40,210, Visits: 36,619
CREATE DATABASE TestingRecoveryModel
GO

ALTER DATABASE TestingRecoveryModel SET RECOVERY SIMPLE
GO

BACKUP DATABASE TestingRecoveryModel TO DISK = 'C:\Databases\Backups\Testing.bak'
GO

USE TestingRecoveryModel
GO

create table a ( a1 char(1000) default 'a1',
a2 char(1000) default 'a2',
a3 char(1000) default 'a3',
a4 char(1000) default 'a4',
a5 char(1000) default 'a5',
a6 char(1000) default 'a6',
a7 char(1000) default 'a7' ,
i integer)
GO

insert into a (i) values (1)
go 20000

SELECT name, recovery_model_desc, log_reuse_wait_desc FROM sys.databases WHERE name = 'TestingRecoveryModel'
GO

insert into a (i) values (1)
go 20000

SELECT name, recovery_model_desc, log_reuse_wait_desc FROM sys.databases WHERE name = 'TestingRecoveryModel'
GO



Double check code and settings, you cannot get a log reuse wait of log backup on a database that's always been in simple recovery model.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass



  Post Attachments 
Log reuse wait.png (62 views, 23.84 KB)
Post #1465628
Posted Thursday, June 20, 2013 6:50 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, April 27, 2014 7:55 PM
Points: 218, Visits: 556
Dear Gail

Thank with the script given it working fine. I was trying through SSMS and it was creating the issue. Dont know whats going wrong when i try it from ssms
Post #1465662
Posted Thursday, June 20, 2013 6:54 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:37 PM
Points: 40,210, Visits: 36,619
Krishna1 (6/20/2013)
Dear Gail

Thank with the script given it working fine. I was trying through SSMS and it was creating the issue. Dont know whats going wrong when i try it from ssms


I ran that from SSMS too. Either the DB was left in full recovery (which is the default) or you had some code somewhere that was changing the DB to full recovery.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1465664
Posted Sunday, June 23, 2013 5:27 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, April 27, 2014 7:55 PM
Points: 218, Visits: 556
Dear Gail
I tried it again today. Attached documeent shows the step i took. But after taking full back up it makes the log_reuse_wait_desc as LOG_BACKUP.
Not able to understand whats making it like this. Due to this log size just keeps increasing even though the recovery model is simple
Did you try the same in sql2012 express edition? How do i check whats happning to recovery model? (becasue it still shows as simple)


Regards
Krishna.


  Post Attachments 
5.pdf (6 views, 49.54 KB)
Post #1466515
Posted Monday, June 24, 2013 1:22 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Sunday, April 27, 2014 7:55 PM
Points: 218, Visits: 556
hi all
Got the solution from folloing link . http://dba.stackexchange.com/questions/42068/sql-server-2012-simple-recovery-model-with-log-backup-log-reuse-wait-desc

After creating a DB from SSSM GUI, immidiatly changed the recovery model to full. Then again made it as Simple. After this it works fine

Post #1466607
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse