<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>auto backup &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/auto-backup/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Mon, 21 Jan 2019 07:06:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server: Script to take full backup for all the Databases</title>
		<link>https://www.dbrnd.com/2019/01/sql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup/</link>
					<comments>https://www.dbrnd.com/2019/01/sql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup/#respond</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 14 Jan 2019 07:03:32 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[auto backup]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database backup script]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[full backup]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=4041</guid>

					<description><![CDATA[In this post, I am sharing one T-SQL Script to take full backup for all the databases of SQL Server. There are different types of backups and techniques available in the SQL Server, but I always believe in DBA Scripts which you can modify as per your requirements. Apart from scheduled backups, sometimes DBA requires [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2019%2F01%2Fsql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20take%20full%20backup%20for%20all%20the%20Databases" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2019%2F01%2Fsql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20take%20full%20backup%20for%20all%20the%20Databases" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2019%2F01%2Fsql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20take%20full%20backup%20for%20all%20the%20Databases" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2019%2F01%2Fsql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20take%20full%20backup%20for%20all%20the%20Databases" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2019%2F01%2Fsql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20take%20full%20backup%20for%20all%20the%20Databases" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2019%2F01%2Fsql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup%2F&amp;linkname=SQL%20Server%3A%20Script%20to%20take%20full%20backup%20for%20all%20the%20Databases" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2019%2F01%2Fsql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup%2F&#038;title=SQL%20Server%3A%20Script%20to%20take%20full%20backup%20for%20all%20the%20Databases" data-a2a-url="https://www.dbrnd.com/2019/01/sql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup/" data-a2a-title="SQL Server: Script to take full backup for all the Databases"></a></p><p>In this post, I am sharing one T-SQL Script to take full backup for all the databases of SQL Server. </p>
<blockquote><p>There are different types of backups and techniques available in the SQL Server, but I always believe in DBA Scripts which you can modify as per your requirements.
</p></blockquote>
<blockquote><p>Apart from scheduled backups, sometimes DBA requires ad-hoc full backups of databases which they can do using this script.</p></blockquote>
<p><strong>Script to take full backup of databases:</strong><br />
You can change the path name (&#8216;C:\TempBackup\&#8217;) and replace with your path name. </p>
<pre class="crayon-plain-tag">DECLARE @dbName	NVARCHAR (255); 
DECLARE @SQL NVARCHAR(4000); 
 
DECLARE DBBackupCur 
CURSOR FOR 
    SELECT name FROM sys.databases WITH (NOLOCK) 
    WHERE name NOT IN ('master','model','msdb','tempdb')  
    OPTION (RECOMPILE); 
 
OPEN DBBackupCur;     
FETCH NEXT FROM DBBackupCur INTO @dbName 
WHILE (@@fetch_status &lt;&gt; -1) 
BEGIN 
    IF (@@fetch_status &lt;&gt; -2) 
    BEGIN 
        SET @SQL = N'BACKUP DATABASE [' + @dbName + N'] TO DISK = ''C:\TempBackup\' + @dbName + N'.bak'''; 
        EXECUTE sp_executesql @SQL 
        PRINT N'Backup completed: ' + @dbName 
    END; 
    FETCH NEXT FROM DBBackupCur INTO @dbName; 
END; 
CLOSE DBBackupCur; 
DEALLOCATE DBBackupCur; 
GO</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2019/01/sql-server-script-to-take-full-backup-for-all-the-databases-ad-hoc-full-database-backup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
