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

SQL server logs backup / reduction Expand / Collapse
Author
Message
Posted Monday, April 22, 2013 2:18 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:43 AM
Points: 33,059, Visits: 15,172
aayushmail007 (4/22/2013)
Thanks Steve and Gila.
if this is organization data what would you prefer ?

My first requirement will be to have space in drive
2nd recover when needed


Those are not the priorities I'd have. That may lead to you not recovering at all.

What's the drive size, what's the data size, what's the log size. How much data import/change per day?







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1445164
Posted Monday, April 22, 2013 2:21 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, April 24, 2013 10:08 AM
Points: 12, Visits: 22
C drive : 200gb

sql log: 140 gb
sql data : 30 gb
etc : 10-20gb

space left : less than 5gb

logs increments 1.5- 2gb a day
Post #1445167
Posted Monday, April 22, 2013 2:23 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:43 AM
Points: 33,059, Visits: 15,172
If you're loading 1-2 GB a day in the log, I'd shrink the log to 5GB. Space is relatively cheap, and this gives you pad.

You don't need a 140GB log, and likely it grew because you didn't run log backups. Switch the db to simple mode, shrink the log. Schedule (don't run, schedule) a full backup every day.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1445168
Posted Monday, April 22, 2013 2:28 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, April 24, 2013 10:08 AM
Points: 12, Visits: 22
first I have to run log backup by taking it offline and then use backup option in SQL mgmt studio.

the challenge here is that the sql server is on remote desktop and I will be taking backup in another mapped drive,
but I cannot see that drive when I select disk . Only two options are C and D .
Cannot locate mapped drive
Post #1445171
Posted Monday, April 22, 2013 2:48 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:43 AM
Points: 33,059, Visits: 15,172
You don't need to take anything offline to run a backup. If you take the database offline, you can't run a backup in SSMS.

As far as the mapped drives, the server doesn't see drives you've mapped in your session. The service account for the server has it's own mapped drives.

What I would say here is run the full backup. use a UNC path. Then switch to simple mode. This will generate a checkpoint and the log chain is broken. You should be able to shrink the log then.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1445189
Posted Monday, April 22, 2013 2:57 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, April 24, 2013 10:08 AM
Points: 12, Visits: 22
I tried couple of UNC but I am not getting it correct :

I have an x drive mapped to it , what should be the correct UNC?
Post #1445192
Posted Monday, April 22, 2013 3:00 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:43 AM
Points: 33,059, Visits: 15,172
You don't need to map a drive. The service account for SQL Server logs into Windows. It can't see your drive mappings when you've logged in with RDP.

Instead, run the backup like this:

Backup database mydb to disk='\\backupserver\share\myshare\mybackup.bak'








Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1445194
Posted Monday, April 22, 2013 3:23 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, April 24, 2013 10:08 AM
Points: 12, Visits: 22
error

Msg 3201, Level 16, State 1, Line 1
Cannot open backup device '\\X\analyitcs\test_UNC.BAK'. Operating system error 53(The network path was not found.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.


I went to services and restarted the SQL server and now analytics its in a recovery mode.
Hope I have not screwed it up?
Post #1445204
Posted Monday, April 22, 2013 3:51 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:43 AM
Points: 33,059, Visits: 15,172
Your service account may not have rights to that path. Not all accounts will. You'll have to determine if that's the case.

If the db is recovering, you will have to look in the error log to find out why.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1445219
Posted Monday, April 22, 2013 3:53 PM


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 @ 11:41 AM
Points: 42,442, Visits: 35,496
Ice007 (4/22/2013)
Cannot open backup device '\\X\analyitcs\test_UNC.BAK'. Operating system error 53(The network path was not found.).


As the error message says, the network path does not exist. Nor would I expect it to unless you have a server named "X"
\\<server name>\<share name>\<path>



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 #1445220
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse