Solved

Could not back up to a remote drive in maintenance plan

Posted on 2004-04-06
3
1,854 Views
Last Modified: 2007-12-19

I have mapped a remote to g: on my SQL server server, but I could not make the drive g: selectable in the maintenance plan GUI. I just typed the G:. It worked for a testing period. Later I wanted to changed ti g:\sql2kbaks directory. But it does not work after setting the destination to the folder for log and db. Here is one of error message:

BackupDiskFile::CreateMedia: Backup device 'g:\sql2kBaks\model_tlog_200404060000.TRN' failed to create. Operating system error = 3(The system cannot find the path specified.).

I used domain account in service for the agent and check security - the domain account has write permission the folder.

Any suggestion?

GT
0
Comment
Question by:geotiger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
arbert earned 250 total points
ID: 10769318
You can't use mapped drives--they exist when you're logged on and are very difficult to get to work with a service account.  use the unc path instead:

\\servername\share\folder\backupname.bak
0
 
LVL 12

Author Comment

by:geotiger
ID: 10805949
Arbert,

Thanks for your comment. It is creating TRN files for some databases.

It seems that it only solves part of the problem. I am getting errors for not being able to switch to single user mode. Is it requred to switch single user mode even if it is just backing up logs? How to force users off in maintenance plan?

[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 5070: [Microsoft][ODBC SQL Server Driver][SQL Server]Database state cannot be changed while other users are using the database 'msdb'
[Microsoft][ODBC SQL Server Driver][SQL Server]ALTER DATABASE statement failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]sp_dboption command failed.
[3] Database msdb: Check Data and Index Linkage...
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 7919: [Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed. Database needs to be in single user mode.

    The following errors were found:

[Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed. Database needs to be in single user mode.
    ** Execution Time: 0 hrs, 0 mins, 1 secs **

GT
0
 
LVL 12

Author Comment

by:geotiger
ID: 10806697
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question