sql | satheesh.net https://satheesh.net Fri, 15 Jun 2012 09:56:08 +0000 en-US hourly 1 https://satheesh.net/wp-content/uploads/cropped-satheesh-32x32.jpg sql | satheesh.net https://satheesh.net 32 32 How to shrink SQL / SharePoint database / log files https://satheesh.net/2011/04/05/how-to-shrink-sql-sharepoint-database-log-files/?utm_source=rss&utm_medium=rss&utm_campaign=how-to-shrink-sql-sharepoint-database-log-files https://satheesh.net/2011/04/05/how-to-shrink-sql-sharepoint-database-log-files/#comments Tue, 05 Apr 2011 09:20:46 +0000 https://satheesh.net/?p=335 SharePoint Config database logs are one thing to keep an eye on since they do have a tendency to grow. If you don?t perform a full farm backup usually the log doesn?t get emptied and it just keeps bloating. If you?re running SQL Server Express with default installation, you can find the files in C:\Program […]

The post How to shrink SQL / SharePoint database / log files first appeared on satheesh.net.]]>
SharePoint Config database logs are one thing to keep an eye on since they do have a tendency to grow. If you don?t perform a full farm backup usually the log doesn?t get emptied and it just keeps bloating.

If you?re running SQL Server Express with default installation, you can find the files in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

As we see in the example above, even though the database is only 6 megs, the log file grew to 11 gigs. Let?s reduce that:

1. If you don?t have it yet, download and install SQL Server Management Studio express from here.

2. Run the Management Studio and connect to your SQL Server.

3. Expand ?Databases? and select your config database ?SharePoint_Config?.
    IMPORTANT: If you are connecting to a Small Business Server or you cannot find the correct database use this string in the Server name field when connecting:

\\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

4. Right Click it, select Tasks ?> Shrink ?> Files

5. In the new window select Release unused space and click OK.

If that doesn?t decrease the database size much, do the following:

1. First to be on the safe side, let?s back it up (this step is optional)

Select New Query

type the following:

BACKUP LOG [Sharepoint_Config] TO DISK=?D:\configLogBackup.bak?
GO

where SharePoint_Config is the name of your config database file and D:\configlogbackup.bak is the location and file name of where you?ll make the backup.

And click Execute

This may take a while if your log file is big.

2. Next clear the query (or click New Query again) and enter the following commands

BACKUP LOG [Sharepoint_Config] WITH TRUNCATE_ONLY
USE [SharePoint_Config]
GO

anc click Execute again

3. Clear the query or open another query tab and enter the next command:

DBCC SHRINKFILE (N?SharePoint_Config_log? , 50)
GO

The 50 in the command above sets the size in MB to truncate the log to. If your config db is of different name, replace the SharePoint_Config part above with your config db name.

And click Execute yet again.

The result you get should be something like below:

and ofcourse the file size:

Finally you got some space!

The post How to shrink SQL / SharePoint database / log files first appeared on satheesh.net.]]>
https://satheesh.net/2011/04/05/how-to-shrink-sql-sharepoint-database-log-files/feed/ 8
MS SQL Database Backup (Freeware) https://satheesh.net/2009/11/19/ms-sql-database-backup-freeware/?utm_source=rss&utm_medium=rss&utm_campaign=ms-sql-database-backup-freeware https://satheesh.net/2009/11/19/ms-sql-database-backup-freeware/#comments Thu, 19 Nov 2009 10:38:40 +0000 https://satheesh.net/?p=123 This little software makes making backup of Microsoft SQL databases a breeze. Best of all, it’s freeware! SQLBackupAndFTP – get it here -> http://www.sqlbackupandftp.com/ Compatibility: SQL Server 2012 Express SQL Server 2008 Express SQL Server 2005 Express SQL Server 2012 – all editions SQL Server 2008 – all editions SQL Server 2005 – all editions […]

The post MS SQL Database Backup (Freeware) first appeared on satheesh.net.]]>
This little software makes making backup of Microsoft SQL databases a breeze. Best of all, it’s freeware!

sqlbackupandftp

SQLBackupAndFTP – get it here -> http://www.sqlbackupandftp.com/

Compatibility:
SQL Server 2012 Express
SQL Server 2008 Express
SQL Server 2005 Express
SQL Server 2012 – all editions
SQL Server 2008 – all editions
SQL Server 2005 – all editions
SQL Server 2000 (only local backups, not remote)

OS Support:
Win2000, WinXP, Win2003, Windows Vista, Win2008, Windows 7

 

If you want to backup your mySQL databases you can use MySqlBackupFTP (freeware) -> http://www.mysqlbackupftp.com/

The post MS SQL Database Backup (Freeware) first appeared on satheesh.net.]]>
https://satheesh.net/2009/11/19/ms-sql-database-backup-freeware/feed/ 1