Thursday, February 16, 2012

Backup locations

I need to set up SQL (preferably in a DB Maint Plan) to do scheduled backups, but place them on a mapped drive. (Running out of room on my server!) Whenever I try to set anything up, I can only "see" the local drives. I've tried it mapped and UNC. I've also made sure that both the server's logins appear on both machines and have permissions on the shared folder. What am I missing' Any help would be greatly appreciated
Thanks
TinaMethod 1: Create your maintenance plan and pick an
arbitrary backup directory. When you have finished
creating the plan, go to the Jobs under SQL Server Agent
and modify the DB backup Job for the maintenance plan. The
T-SQL in the job step should be something like:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID 1115857B-656B-
4064-9F7A-5BD2C6C1A2E6 -BkUpMedia DISK -
BkUpDB "e:\MSSQLBackup" -BkExt "BAK"'
Change the value following -BkUpDB to a UNC of your choice.
Method 2: Forget about the maintenance plan and create a
SQL Server Agent backup job yourself with the BACKUP
statement. You can then specify whatever UNC you fancy,
assuming there is no permission issue.
Linchi
>--Original Message--
>I need to set up SQL (preferably in a DB Maint Plan) to
do scheduled backups, but place them on a mapped drive.
(Running out of room on my server!) Whenever I try to set
anything up, I can only "see" the local drives. I've tried
it mapped and UNC. I've also made sure that both the
server's logins appear on both machines and have
permissions on the shared folder. What am I missing' Any
help would be greatly appreciated.
>Thanks!
>Tina
>.
>|||Enterprise Mangler will only show local drives. SQL cannot use mapped
drives consistantly because the SQL Service may not see the same mappings as
the console login. The solution is to type the UNC name of the folder in
the target location field.
You also have to make sure that SQL Server can write files to that location.
The easiest way is for you to run SQL under a domain-level account and give
that account permissions on the target folder. Use the following SQL Script
to test access.
xp_cmdshell 'dir \\MyUNCRemote\ShareName'
I suggest giving FULL CONTROL on the target folder to the SQL Service
account. Make sure you have both share permission and underlying NTFS
permissions set correctly.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
"Tina Tysinger" <ttysinger@.co.hernando.fl.us> wrote in message
news:2D848E29-A745-4682-B70A-D549A2760558@.microsoft.com...
> I need to set up SQL (preferably in a DB Maint Plan) to do scheduled
backups, but place them on a mapped drive. (Running out of room on my
server!) Whenever I try to set anything up, I can only "see" the local
drives. I've tried it mapped and UNC. I've also made sure that both the
server's logins appear on both machines and have permissions on the shared
folder. What am I missing' Any help would be greatly appreciated.
> Thanks!
> Tina

No comments:

Post a Comment