Friday, February 10, 2012

Backup to Network Drive

We are attempting to set our SQL Server 2000 backups to point to a network
drive. We have created a domain user and set the SQL Server Service and SQL
Server Agent to use this account. We have also set this account as a member
of the Administrators group on the SQL Server itself and added it to the sys
admin group within SQL Server. On the destination server, the service account
has full control on the share that we'd like to write to. Unfortunately, our
backups are failing. The SQL Server Log provides the following message
"BackupDiskFile::CreateMedia: Backup device '\\Server\SQLBackup' failed to
create. Operating system error = 5(Access is denied.)."
What are we missing here?Marcia,
Did you restart the SQL Server once the drive was mounted on your
server? Have you verified that as the user which SQL Server starts
under on the box you can read and write data to that location? These
are some of the gotcha's. I wish SQL Server allowed you to see network
mount points when you go to Backup Database options through Enterprise
Manager.
Shahryar
MarciaN wrote:
>We are attempting to set our SQL Server 2000 backups to point to a network
>drive. We have created a domain user and set the SQL Server Service and SQL
>Server Agent to use this account. We have also set this account as a member
>of the Administrators group on the SQL Server itself and added it to the sys
>admin group within SQL Server. On the destination server, the service account
>has full control on the share that we'd like to write to. Unfortunately, our
>backups are failing. The SQL Server Log provides the following message
>"BackupDiskFile::CreateMedia: Backup device '\\Server\SQLBackup' failed to
>create. Operating system error = 5(Access is denied.)."
>What are we missing here?
>
Shahryar G. Hashemi | Sr. DBA Consultant
InfoSpace, Inc.
601 108th Ave NE | Suite 1200 | Bellevue, WA 98004 USA
Mobile +1 206.459.6203 | Office +1 425.201.8853 | Fax +1 425.201.6150
shashem@.infospace.com | www.infospaceinc.com
This e-mail and any attachments may contain confidential information that is legally privileged. The information is solely for the use of the intended recipient(s); any disclosure, copying, distribution, or other use of this information is strictly prohibited. If you have received this e-mail in error, please notify the sender by return e-mail and delete this message. Thank you.|||HowTo: Backup to UNC name using Database Maintenance Wizard
http://support.microsoft.com/?kbid=555128
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
news:B8AAEF33-2B4B-445A-ADBF-F2D74A78F0D2@.microsoft.com...
> We are attempting to set our SQL Server 2000 backups to point to a network
> drive. We have created a domain user and set the SQL Server Service and
> SQL
> Server Agent to use this account. We have also set this account as a
> member
> of the Administrators group on the SQL Server itself and added it to the
> sys
> admin group within SQL Server. On the destination server, the service
> account
> has full control on the share that we'd like to write to. Unfortunately,
> our
> backups are failing. The SQL Server Log provides the following message
> "BackupDiskFile::CreateMedia: Backup device '\\Server\SQLBackup' failed to
> create. Operating system error = 5(Access is denied.)."
> What are we missing here?|||We have followed these procedures and still no luck. Can you give some
specifics related to the access levels that the WIndows Service account
should have?
"Geoff N. Hiten" wrote:
> HowTo: Backup to UNC name using Database Maintenance Wizard
> http://support.microsoft.com/?kbid=555128
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
> news:B8AAEF33-2B4B-445A-ADBF-F2D74A78F0D2@.microsoft.com...
> > We are attempting to set our SQL Server 2000 backups to point to a network
> > drive. We have created a domain user and set the SQL Server Service and
> > SQL
> > Server Agent to use this account. We have also set this account as a
> > member
> > of the Administrators group on the SQL Server itself and added it to the
> > sys
> > admin group within SQL Server. On the destination server, the service
> > account
> > has full control on the share that we'd like to write to. Unfortunately,
> > our
> > backups are failing. The SQL Server Log provides the following message
> > "BackupDiskFile::CreateMedia: Backup device '\\Server\SQLBackup' failed to
> > create. Operating system error = 5(Access is denied.)."
> >
> > What are we missing here?
>
>|||The SQL Server service account requires FULL CONTROL over the share and the
underlying NTFS directory structure.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
news:12B2D6D3-3FFF-4356-9857-700A5E2CF2F0@.microsoft.com...
> We have followed these procedures and still no luck. Can you give some
> specifics related to the access levels that the WIndows Service account
> should have?
>
> "Geoff N. Hiten" wrote:
>> HowTo: Backup to UNC name using Database Maintenance Wizard
>> http://support.microsoft.com/?kbid=555128
>> --
>> Geoff N. Hiten
>> Senior Database Administrator
>> Microsoft SQL Server MVP
>> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
>> news:B8AAEF33-2B4B-445A-ADBF-F2D74A78F0D2@.microsoft.com...
>> > We are attempting to set our SQL Server 2000 backups to point to a
>> > network
>> > drive. We have created a domain user and set the SQL Server Service and
>> > SQL
>> > Server Agent to use this account. We have also set this account as a
>> > member
>> > of the Administrators group on the SQL Server itself and added it to
>> > the
>> > sys
>> > admin group within SQL Server. On the destination server, the service
>> > account
>> > has full control on the share that we'd like to write to.
>> > Unfortunately,
>> > our
>> > backups are failing. The SQL Server Log provides the following message
>> > "BackupDiskFile::CreateMedia: Backup device '\\Server\SQLBackup' failed
>> > to
>> > create. Operating system error = 5(Access is denied.)."
>> >
>> > What are we missing here?
>>|||We gave the service account FULL CONTROL over the share. After an
unsuccessful test of that, we added the service account to the local admins
group on the destination server and still no luck. It seems like we have
covered all the bases but still can not make this work. Can you think of
anything else?
"Geoff N. Hiten" wrote:
> The SQL Server service account requires FULL CONTROL over the share and the
> underlying NTFS directory structure.
> --
> Geoff N. Hiten
> Senior Database Administrator
> Microsoft SQL Server MVP
> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
> news:12B2D6D3-3FFF-4356-9857-700A5E2CF2F0@.microsoft.com...
> > We have followed these procedures and still no luck. Can you give some
> > specifics related to the access levels that the WIndows Service account
> > should have?
> >
> >
> > "Geoff N. Hiten" wrote:
> >
> >> HowTo: Backup to UNC name using Database Maintenance Wizard
> >> http://support.microsoft.com/?kbid=555128
> >>
> >> --
> >> Geoff N. Hiten
> >> Senior Database Administrator
> >> Microsoft SQL Server MVP
> >> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
> >> news:B8AAEF33-2B4B-445A-ADBF-F2D74A78F0D2@.microsoft.com...
> >> > We are attempting to set our SQL Server 2000 backups to point to a
> >> > network
> >> > drive. We have created a domain user and set the SQL Server Service and
> >> > SQL
> >> > Server Agent to use this account. We have also set this account as a
> >> > member
> >> > of the Administrators group on the SQL Server itself and added it to
> >> > the
> >> > sys
> >> > admin group within SQL Server. On the destination server, the service
> >> > account
> >> > has full control on the share that we'd like to write to.
> >> > Unfortunately,
> >> > our
> >> > backups are failing. The SQL Server Log provides the following message
> >> > "BackupDiskFile::CreateMedia: Backup device '\\Server\SQLBackup' failed
> >> > to
> >> > create. Operating system error = 5(Access is denied.)."
> >> >
> >> > What are we missing here?
> >>
> >>
> >>
>
>|||Verify NTFS file permissions on the destination directory. This is
different from the share security permissions.
Log in to the console of the SQL Server as the service account and try to
access the network share directly. Create, rename, and delete a file.
Run a backup via Query Analyzer (BACKUP DATABASE command) to the share
location.
--
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
news:3469833A-EC8A-4755-828B-D309A0A2F72E@.microsoft.com...
> We gave the service account FULL CONTROL over the share. After an
> unsuccessful test of that, we added the service account to the local
> admins
> group on the destination server and still no luck. It seems like we have
> covered all the bases but still can not make this work. Can you think of
> anything else?
> "Geoff N. Hiten" wrote:
>> The SQL Server service account requires FULL CONTROL over the share and
>> the
>> underlying NTFS directory structure.
>> --
>> Geoff N. Hiten
>> Senior Database Administrator
>> Microsoft SQL Server MVP
>> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
>> news:12B2D6D3-3FFF-4356-9857-700A5E2CF2F0@.microsoft.com...
>> > We have followed these procedures and still no luck. Can you give some
>> > specifics related to the access levels that the WIndows Service account
>> > should have?
>> >
>> >
>> > "Geoff N. Hiten" wrote:
>> >
>> >> HowTo: Backup to UNC name using Database Maintenance Wizard
>> >> http://support.microsoft.com/?kbid=555128
>> >>
>> >> --
>> >> Geoff N. Hiten
>> >> Senior Database Administrator
>> >> Microsoft SQL Server MVP
>> >> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
>> >> news:B8AAEF33-2B4B-445A-ADBF-F2D74A78F0D2@.microsoft.com...
>> >> > We are attempting to set our SQL Server 2000 backups to point to a
>> >> > network
>> >> > drive. We have created a domain user and set the SQL Server Service
>> >> > and
>> >> > SQL
>> >> > Server Agent to use this account. We have also set this account as a
>> >> > member
>> >> > of the Administrators group on the SQL Server itself and added it to
>> >> > the
>> >> > sys
>> >> > admin group within SQL Server. On the destination server, the
>> >> > service
>> >> > account
>> >> > has full control on the share that we'd like to write to.
>> >> > Unfortunately,
>> >> > our
>> >> > backups are failing. The SQL Server Log provides the following
>> >> > message
>> >> > "BackupDiskFile::CreateMedia: Backup device '\\Server\SQLBackup'
>> >> > failed
>> >> > to
>> >> > create. Operating system error = 5(Access is denied.)."
>> >> >
>> >> > What are we missing here?
>> >>
>> >>
>> >>
>>|||I'd start by logging in on the SQL Server machine using the service account and see if I can access
and create files. If so, use xp_cmdshell to see if you can do the same.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
news:3469833A-EC8A-4755-828B-D309A0A2F72E@.microsoft.com...
> We gave the service account FULL CONTROL over the share. After an
> unsuccessful test of that, we added the service account to the local admins
> group on the destination server and still no luck. It seems like we have
> covered all the bases but still can not make this work. Can you think of
> anything else?
> "Geoff N. Hiten" wrote:
>> The SQL Server service account requires FULL CONTROL over the share and the
>> underlying NTFS directory structure.
>> --
>> Geoff N. Hiten
>> Senior Database Administrator
>> Microsoft SQL Server MVP
>> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
>> news:12B2D6D3-3FFF-4356-9857-700A5E2CF2F0@.microsoft.com...
>> > We have followed these procedures and still no luck. Can you give some
>> > specifics related to the access levels that the WIndows Service account
>> > should have?
>> >
>> >
>> > "Geoff N. Hiten" wrote:
>> >
>> >> HowTo: Backup to UNC name using Database Maintenance Wizard
>> >> http://support.microsoft.com/?kbid=555128
>> >>
>> >> --
>> >> Geoff N. Hiten
>> >> Senior Database Administrator
>> >> Microsoft SQL Server MVP
>> >> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
>> >> news:B8AAEF33-2B4B-445A-ADBF-F2D74A78F0D2@.microsoft.com...
>> >> > We are attempting to set our SQL Server 2000 backups to point to a
>> >> > network
>> >> > drive. We have created a domain user and set the SQL Server Service and
>> >> > SQL
>> >> > Server Agent to use this account. We have also set this account as a
>> >> > member
>> >> > of the Administrators group on the SQL Server itself and added it to
>> >> > the
>> >> > sys
>> >> > admin group within SQL Server. On the destination server, the service
>> >> > account
>> >> > has full control on the share that we'd like to write to.
>> >> > Unfortunately,
>> >> > our
>> >> > backups are failing. The SQL Server Log provides the following message
>> >> > "BackupDiskFile::CreateMedia: Backup device '\\Server\SQLBackup' failed
>> >> > to
>> >> > create. Operating system error = 5(Access is denied.)."
>> >> >
>> >> > What are we missing here?
>> >>
>> >>
>> >>
>>|||It's working! We deleted the shared folder and recreated it. Now it works.
Thanks to all for your suggestions.
"Tibor Karaszi" wrote:
> I'd start by logging in on the SQL Server machine using the service account and see if I can access
> and create files. If so, use xp_cmdshell to see if you can do the same.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
> news:3469833A-EC8A-4755-828B-D309A0A2F72E@.microsoft.com...
> > We gave the service account FULL CONTROL over the share. After an
> > unsuccessful test of that, we added the service account to the local admins
> > group on the destination server and still no luck. It seems like we have
> > covered all the bases but still can not make this work. Can you think of
> > anything else?
> >
> > "Geoff N. Hiten" wrote:
> >
> >> The SQL Server service account requires FULL CONTROL over the share and the
> >> underlying NTFS directory structure.
> >>
> >> --
> >> Geoff N. Hiten
> >> Senior Database Administrator
> >> Microsoft SQL Server MVP
> >>
> >> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
> >> news:12B2D6D3-3FFF-4356-9857-700A5E2CF2F0@.microsoft.com...
> >> > We have followed these procedures and still no luck. Can you give some
> >> > specifics related to the access levels that the WIndows Service account
> >> > should have?
> >> >
> >> >
> >> > "Geoff N. Hiten" wrote:
> >> >
> >> >> HowTo: Backup to UNC name using Database Maintenance Wizard
> >> >> http://support.microsoft.com/?kbid=555128
> >> >>
> >> >> --
> >> >> Geoff N. Hiten
> >> >> Senior Database Administrator
> >> >> Microsoft SQL Server MVP
> >> >> "MarciaN" <MarciaN@.discussions.microsoft.com> wrote in message
> >> >> news:B8AAEF33-2B4B-445A-ADBF-F2D74A78F0D2@.microsoft.com...
> >> >> > We are attempting to set our SQL Server 2000 backups to point to a
> >> >> > network
> >> >> > drive. We have created a domain user and set the SQL Server Service and
> >> >> > SQL
> >> >> > Server Agent to use this account. We have also set this account as a
> >> >> > member
> >> >> > of the Administrators group on the SQL Server itself and added it to
> >> >> > the
> >> >> > sys
> >> >> > admin group within SQL Server. On the destination server, the service
> >> >> > account
> >> >> > has full control on the share that we'd like to write to.
> >> >> > Unfortunately,
> >> >> > our
> >> >> > backups are failing. The SQL Server Log provides the following message
> >> >> > "BackupDiskFile::CreateMedia: Backup device '\\Server\SQLBackup' failed
> >> >> > to
> >> >> > create. Operating system error = 5(Access is denied.)."
> >> >> >
> >> >> > What are we missing here?
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>|||Windows has two level access control.
You need to give the sql account first the access to the shared
drive/directory and then you need to give access to the
files
1. Access to the SHARE
2. Access to files on that share
1. On the shared directory right click-> sharing->permissions. Check the
SQL account has access rights.
2. same right click->security->permissions. check the SQL account has
rights.
That should do it
rgrds Matti

No comments:

Post a Comment