Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Full DB backup in SQL 2005 using network drive?

Author  Topic 

zeeshan13
Constraint Violating Yak Guru

347 Posts

Posted - 2010-08-25 : 12:28:59
Hi All,

Our client has provided us a new production database server. The test server has a database (130GB size) that I need to move to new production database server. The test server has very limited free disk space of 90GB only. I have shrinked the database and drop logs, and also empty the tempdb (by restarting SQL) still I only have 90GB free space. Getting more disk space is not an option.

I have to take a full backup of the database only once on this test server. Can I use network drive? I login as a domain account to the server and connect to SQL managment studio also using the same domain account but in SQL managment studio while taking a backup when I select backup destination I only see local drives and not network drives. How can I take a backup using netowrk drive? Please promptly suggest.

Thanks,

Zee

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-08-25 : 12:36:18
BACKUP DATABASE dbName
TO DISK = '\\server1\share1\dbName.bak'
WITH INIT

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

zeeshan13
Constraint Violating Yak Guru

347 Posts

Posted - 2010-08-25 : 12:56:16
Thanks tkizer. But I am getting the following Access denied error. I am using a domain account. How come it says access denied? Please suggest.
<b>
Msg 3201, Level 16, State 1, Line 1
Cannot open backup device '\\server\f$\dbbackup\backup_one\DatabaseName.BAK'. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
</b>
Go to Top of Page

zeeshan13
Constraint Violating Yak Guru

347 Posts

Posted - 2010-08-25 : 13:15:44
Can someone help please.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-08-25 : 13:26:20
need to give permission on \\server\f$\dbbackup\backup_one\ to the SQL Server service account.
Go to Top of Page

zeeshan13
Constraint Violating Yak Guru

347 Posts

Posted - 2010-08-25 : 13:42:27
And how to give permissions to the SQL Server service account? Can you list some steps please.

Thanks
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-08-25 : 13:46:03
you need to be admin on target server to do it.

right-click the directory, click properties, security. click add.

add the domain user that is the service account on the sql server. grant read/write/modify
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-08-25 : 13:48:53
Is your SQL Server service using Local System Account?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

zeeshan13
Constraint Violating Yak Guru

347 Posts

Posted - 2010-08-25 : 15:42:31
Yes. My SQL Server service is log on as Local System. Is that an issue? Should I change it to log on as domain account and then is it going to resolve the issue?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-08-25 : 15:51:38
Yes that's an issue. You'll need to use a domain account so that you can grant it access to the network path.

It'll require that the SQL Server service be restarted.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

zeeshan13
Constraint Violating Yak Guru

347 Posts

Posted - 2010-08-25 : 16:02:17
I will ask my client to do it. Since they want them to do such tasks. I will then see if it is going to resolve the issue.

Thanks.
Go to Top of Page
   

- Advertisement -