Skip to main content

Automated Sql server Backup

Sql Server administrators often need to backup databases and preferably automated. following script will create backups of all databases other than specified, Script will create separate directory of backups, currently this script runs daily and creates daily directory. to create physical directory using Sql we need to enable a stored procedure “xp_cmdshell” and that can only be enabled when […]

How to run large sql script

some times you have to run a large SQL script in SQL server and “Sql Server Management Studio” dies when you load the large file. To import / run the large script you need to use SQL Server command line tool sqlcmd there are many parameters for this command line toll use this for full list […]

Shrink SQL Server 2008

Normally when a database in Microsoft Sql Server 2008 is created the recovery model is full and that causes huge disk space usage and with usage of database the log file increases in size. Some times you may need to clean the log file, so here you go.