-
One Script to Backup All SQL Databases
Posted on August 15th, 2011 Add commentsIt’s a nightmare for backup your DB if you have 100+ DB’s in SQL server. Just simply run a script while you taking a coffee:
12345678910111213141516171819202122232425262728DECLARE @name VARCHAR(50) -- database nameDECLARE @path VARCHAR(256) -- path for backup filesDECLARE @fileName VARCHAR(256) -- filename for backupDECLARE @fileDate VARCHAR(20) -- used for file nameSET @path = "C:\Backup"SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)DECLARE db_cursor CURSOR FORSELECT nameFROM master.dbo.sysdatabasesWHERE name NOT IN ('master','model','msdb','tempdb')--skip system database (optional)OPEN db_cursorFETCH NEXT FROM db_cursor INTO @nameWHILE @@FETCH_STATUS = 0BEGINSET @fileName = @path + @name + '_' + @fileDate + '.BAK'BACKUP DATABASE @name TO DISK = @fileNameFETCH NEXT FROM db_cursor INTO @nameENDCLOSE db_cursorDEALLOCATE db_cursor
263 views
-
Visual Studio Website Administration Tool & SQL Server Express
Posted on June 24th, 2010 1 commentIn Visual Studio the Website Administration Tool lets you view and manage the Web site configuration through a simple Web interface. But sometimes there is problem which is when using the Website Administration Tool to make a new connection for a new website, for example, using the security tab of the Website Administration Tool to manage rules for securing specific resources in the web application or website, it will display an error message “Unable to connect to SQL Server database”, even you have SQL Server Express installed and no problem to connect to it.
To solve this problem, try one or more of the following ways:
Read the rest of this entry »
888 views
Recent Comments