Author |
Topic |
madhu.maddula
Starting Member
10 Posts |
Posted - 2008-06-12 : 12:25:36
|
HiI want to take backup of rapport database. and copy those .bak files from this local server to remote server automatically.can any one help me plzzzzzzz.........Thanks in advanceMadhu....... |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-06-12 : 13:20:19
|
Did you check Backup command in Booksonline? |
 |
|
madhu.maddula
Starting Member
10 Posts |
Posted - 2008-06-13 : 00:54:06
|
no sodeepwill u plz.. explain me clearly....Thanks...Madhu |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-06-13 : 01:34:55
|
BACKUP DATABASE rapportTO DISK = 'F:\Backup\rapport.bak'EXEC master.dbo.xp_cmdshell 'xcopy F:\Backup\rapport.bak \\RemoteServer\Share\'OrBACKUP DATABASE rapportTO DISK = '\\RemoteServer\Share\rapport.bak'Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
madhu.maddula
Starting Member
10 Posts |
Posted - 2008-06-13 : 01:47:13
|
hi tarathanks for ur response..I need to take backup regularly for every 2 hours.so it need to create new file in the specified folder every time.how can i do this...Thanks & Best RegardsMadhu |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-06-13 : 01:49:41
|
Hopefully you are talking about transaction log backups as you won't want full backups every 2 hours. Check out my isp_Backup which can be found here:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspxIt'll create new files each time. If you decide to use it, be sure to either subscribe to my blog or check back for updates as I'll be posting a change to it in the next few weeks. I update it a few times per year with features, bug fixes, and requests.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
madhu.maddula
Starting Member
10 Posts |
Posted - 2008-06-13 : 02:30:12
|
hi tarahow can i give the remote server path..ThanksMadhu |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
madhu.maddula
Starting Member
10 Posts |
Posted - 2008-06-13 : 02:55:04
|
hi tara,u UNC path means can i give it with IP addressThanksMadhu |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-06-13 : 02:56:21
|
Yes, but it needs to be in a specific format:\\ServerName\ShareName\...\\IPAdress\ShareName\...\\AliasName\ShareName\...Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
madhu.maddula
Starting Member
10 Posts |
Posted - 2008-06-13 : 03:24:00
|
Hi Taraone final question ?I given the path like this exec isp_Backup @path='\\192.168.0.16\test', @dbType = '-Rapport', @bkpType = 'Full', @retention = -1, @liteSpeed = 'N'It is giving the following errorMsg 3201, Level 16, State 1, Procedure isp_Backup, Line 361Cannot open backup device '\\192.168.0.16\test\Rapport\Rapport_20080613124823.BAK'. Operating system error 1265(The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.).Msg 3013, Level 16, State 1, Procedure isp_Backup, Line 361BACKUP DATABASE is terminating abnormally.suggest me...Thanks & Best RegardsMadhu |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-06-13 : 03:27:13
|
Make sure that the SQL Server service account has write access to the Rapport directory on 192.168.0.16 and also it has access to the test share.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
madhu.maddula
Starting Member
10 Posts |
Posted - 2008-06-13 : 03:47:18
|
Hi tarasorry for disturbing u..where can check for SQL Server service account write access permissions ??????and if it don't has permission How can i set the write access permissin.Thanks & Best RegardsMadhu |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-06-13 : 13:12:21
|
If you don't know how to do it, then please ask a server administrator to help you.To be honest though, I've never tested my isp_Backup with a UNC path. I pointed you to my code as you asked how to create backups every day using different file names.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|