Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Tuesday, March 27, 2012

Backup Failed? cannot find deleted database

Hi,
I have MSSQL 2000 and I am using Veritas Backup Exec 9.1 to backup
SQL.
I resently deleted a Database and now the JOB fails with error:
0xa000fe09 - DBASE_NAME cannot find/connect to database or its
directories.
The database is not listed in the job selection either? Is there
anyway I can stop Veritas reporting the failure for a non-exsistant
database?
TIAIn the backup selections list, select Text view, which will then give you a
list of all the things being backed up (rather than the graphical display),
you should find that the db which you have deleted is listed there, so you
can manually delete it from the list.
The graphical display won't display it, as the items to be backed up are
displayed live from the server, so since the db is no longer there, it can't
display it, and therefore can't show that it is selected. It's a fairly well
known "feature" of all versions of Backup Exec.
Keith
"Carlos" <carlos_kennerley@.hotmail.com> wrote in message
news:fb6dfb4d.0410260154.2dd334ad@.posting.google.com...
> Hi,
> I have MSSQL 2000 and I am using Veritas Backup Exec 9.1 to backup
> SQL.
> I resently deleted a Database and now the JOB fails with error:
> 0xa000fe09 - DBASE_NAME cannot find/connect to database or its
> directories.
> The database is not listed in the job selection either? Is there
> anyway I can stop Veritas reporting the failure for a non-exsistant
> database?
> TIA

Backup Failed? cannot find deleted database

Hi,
I have MSSQL 2000 and I am using Veritas Backup Exec 9.1 to backup
SQL.
I resently deleted a Database and now the JOB fails with error:
0xa000fe09 - DBASE_NAME cannot find/connect to database or its
directories.
The database is not listed in the job selection either? Is there
anyway I can stop Veritas reporting the failure for a non-exsistant
database?
TIA
In the backup selections list, select Text view, which will then give you a
list of all the things being backed up (rather than the graphical display),
you should find that the db which you have deleted is listed there, so you
can manually delete it from the list.
The graphical display won't display it, as the items to be backed up are
displayed live from the server, so since the db is no longer there, it can't
display it, and therefore can't show that it is selected. It's a fairly well
known "feature" of all versions of Backup Exec.
Keith
"Carlos" <carlos_kennerley@.hotmail.com> wrote in message
news:fb6dfb4d.0410260154.2dd334ad@.posting.google.c om...
> Hi,
> I have MSSQL 2000 and I am using Veritas Backup Exec 9.1 to backup
> SQL.
> I resently deleted a Database and now the JOB fails with error:
> 0xa000fe09 - DBASE_NAME cannot find/connect to database or its
> directories.
> The database is not listed in the job selection either? Is there
> anyway I can stop Veritas reporting the failure for a non-exsistant
> database?
> TIA

Backup Failed? cannot find deleted database

Hi,
I have MSSQL 2000 and I am using Veritas Backup Exec 9.1 to backup
SQL.
I resently deleted a Database and now the JOB fails with error:
0xa000fe09 - DBASE_NAME cannot find/connect to database or its
directories.
The database is not listed in the job selection either? Is there
anyway I can stop Veritas reporting the failure for a non-exsistant
database?
TIAIn the backup selections list, select Text view, which will then give you a
list of all the things being backed up (rather than the graphical display),
you should find that the db which you have deleted is listed there, so you
can manually delete it from the list.
The graphical display won't display it, as the items to be backed up are
displayed live from the server, so since the db is no longer there, it can't
display it, and therefore can't show that it is selected. It's a fairly well
known "feature" of all versions of Backup Exec.
Keith
"Carlos" <carlos_kennerley@.hotmail.com> wrote in message
news:fb6dfb4d.0410260154.2dd334ad@.posting.google.com...
> Hi,
> I have MSSQL 2000 and I am using Veritas Backup Exec 9.1 to backup
> SQL.
> I resently deleted a Database and now the JOB fails with error:
> 0xa000fe09 - DBASE_NAME cannot find/connect to database or its
> directories.
> The database is not listed in the job selection either? Is there
> anyway I can stop Veritas reporting the failure for a non-exsistant
> database?
> TIA

Backup failed (Error 3041) while try to issue a BACKUP Statement in Local

Hi,

I use the Transact-SQL BACKUP statement in Visual Basic to backup my local MSSQL Database. It give me this error

Error 3041

BACKUP failed to complete the command BACKUP DATABASE [BCFPC] to BCFPCBKP

I already created a backup device called BCFPCBKP and it is backup to the disk.

I tried to run the same BACKUP statement in SQL Query Analyzer and it worked fine. I tried to run my VB application in another PC. It worked fine when i use this command remotely. Can anyone tell me what's the problem?

Thanks in advance

regards,
M.Y. YapAre you sure the id which was used to start the job agent had access right to the backup device?|||Yes, I usse the same id with the one that I used at a remote PC.

The id I used was 'sa' and I connect to the master database to run the 'BACKUP' statement.

Sunday, March 11, 2012

Backup data MSSQL 2000

My Question
How to backup data in mssql 2000 server from my program
(Delphi 7)You'll want to look into SQLDMO (COM) which will allow you to perform everything you can do with Enterprise Manager.

There are also commands that you can execute to run backups, such as:

mdbConnection.Execute "BACKUP DATABASE " & database_name & "TO DISK = " & db_location_string & " WITH NOINIT , NOUNLOAD , NAME = " & database_name & ", NOSKIP , STATS = 10, NOFORMAT"

Not sure of the syntax for Delphi for executing SQL commands (this is an VB-ADO example).

The COM approach will be nicer from a programming perspective (OO), but the db command might be easier.

Backup data from MSSQL

Is there any way to backup(like method or command to run) data that were
entered into the database? Like saving all the data into another file(.eg
..txt), so that i'm able to clear certain tables in the database in a weekly
or monthly basis. As my system handles lots of data a day, so i need to
backup and clear the database to ensure that the system had enough space and
able to run fast enough. I know that there are few types of backup available
in the books i read up like 'Database backup', 'Differential database
backup', 'File and/or File group backup' and 'Transaction log backup', but i
cannot find any methods on how to use them. And i also didn't find the full
explaination for these backup. Which of these are better? Or are there any
better backup available?
Thanx..
Hi,
There are 2 options:-
1. Use BACKUP DATABASE command to backup your entire database This includes
all tables, procedures, views, indexes ,etc....(all objects
2. Use DTS or BCP OUT commands to export the contents of a table into a TXT
file. Later if need you can use DTS or BCP IN to import
the data back
BACKUP DATABASE
Backups the entire database into a .BAK file. After that you can delete the
huge transaction table with old data. If you require the data later you
could
use RESTORE DATABASe command to restore the database.
Execute the below command from Query analyzer to backup:-
BACKUP DATABASE <dbname> to DISK='D:\backup\dbname.BAK' with INIT -- With
INIT will overwrite the old backup file every time
COmmand to RESTORE
RESTORE DATABASE <dbname> from DISK='d:\backup\dbname.bak' -- More more
options see SQL Server books online
Thanks
Hari
SQL Server MVP
"yingying" <yingying@.discussions.microsoft.com> wrote in message
news:18D9692D-9F32-4187-AF78-63AD5D963EBD@.microsoft.com...
> Is there any way to backup(like method or command to run) data that were
> entered into the database? Like saving all the data into another file(.eg
> .txt), so that i'm able to clear certain tables in the database in a
> weekly
> or monthly basis. As my system handles lots of data a day, so i need to
> backup and clear the database to ensure that the system had enough space
> and
> able to run fast enough. I know that there are few types of backup
> available
> in the books i read up like 'Database backup', 'Differential database
> backup', 'File and/or File group backup' and 'Transaction log backup', but
> i
> cannot find any methods on how to use them. And i also didn't find the
> full
> explaination for these backup. Which of these are better? Or are there any
> better backup available?
> Thanx..

Backup data from MSSQL

Is there any way to backup(like method or command to run) data that were
entered into the database' Like saving all the data into another file(.eg
.txt), so that i'm able to clear certain tables in the database in a weekly
or monthly basis. As my system handles lots of data a day, so i need to
backup and clear the database to ensure that the system had enough space and
able to run fast enough. I know that there are few types of backup available
in the books i read up like 'Database backup', 'Differential database
backup', 'File and/or File group backup' and 'Transaction log backup', but i
cannot find any methods on how to use them. And i also didn't find the full
explaination for these backup. Which of these are better? Or are there any
better backup available?
Thanx..Hi,
There are 2 options:-
1. Use BACKUP DATABASE command to backup your entire database This includes
all tables, procedures, views, indexes ,etc....(all objects
2. Use DTS or BCP OUT commands to export the contents of a table into a TXT
file. Later if need you can use DTS or BCP IN to import
the data back
BACKUP DATABASE
--
Backups the entire database into a .BAK file. After that you can delete the
huge transaction table with old data. If you require the data later you
could
use RESTORE DATABASe command to restore the database.
Execute the below command from Query analyzer to backup:-
BACKUP DATABASE <dbname> to DISK='D:\backup\dbname.BAK' with INIT -- With
INIT will overwrite the old backup file every time
COmmand to RESTORE
RESTORE DATABASE <dbname> from DISK='d:\backup\dbname.bak' -- More more
options see SQL Server books online
Thanks
Hari
SQL Server MVP
"yingying" <yingying@.discussions.microsoft.com> wrote in message
news:18D9692D-9F32-4187-AF78-63AD5D963EBD@.microsoft.com...
> Is there any way to backup(like method or command to run) data that were
> entered into the database' Like saving all the data into another file(.eg
> .txt), so that i'm able to clear certain tables in the database in a
> weekly
> or monthly basis. As my system handles lots of data a day, so i need to
> backup and clear the database to ensure that the system had enough space
> and
> able to run fast enough. I know that there are few types of backup
> available
> in the books i read up like 'Database backup', 'Differential database
> backup', 'File and/or File group backup' and 'Transaction log backup', but
> i
> cannot find any methods on how to use them. And i also didn't find the
> full
> explaination for these backup. Which of these are better? Or are there any
> better backup available?
> Thanx..

Backup data from MSSQL

Is there any way to backup(like method or command to run) data that were
entered into the database' Like saving all the data into another file(.eg
.txt), so that i'm able to clear certain tables in the database in a weekly
or monthly basis. As my system handles lots of data a day, so i need to
backup and clear the database to ensure that the system had enough space and
able to run fast enough. I know that there are few types of backup available
in the books i read up like 'Database backup', 'Differential database
backup', 'File and/or File group backup' and 'Transaction log backup', but i
cannot find any methods on how to use them. And i also didn't find the full
explaination for these backup. Which of these are better? Or are there any
better backup available?
Thanx..Hi,
There are 2 options:-
1. Use BACKUP DATABASE command to backup your entire database This includes
all tables, procedures, views, indexes ,etc....(all objects
2. Use DTS or BCP OUT commands to export the contents of a table into a TXT
file. Later if need you can use DTS or BCP IN to import
the data back
BACKUP DATABASE
--
Backups the entire database into a .BAK file. After that you can delete the
huge transaction table with old data. If you require the data later you
could
use RESTORE DATABASe command to restore the database.
Execute the below command from Query analyzer to backup:-
BACKUP DATABASE <dbname> to DISK='D:\backup\dbname.BAK' with INIT -- With
INIT will overwrite the old backup file every time
COmmand to RESTORE
RESTORE DATABASE <dbname> from DISK='d:\backup\dbname.bak' -- More more
options see SQL Server books online
Thanks
Hari
SQL Server MVP
"yingying" <yingying@.discussions.microsoft.com> wrote in message
news:18D9692D-9F32-4187-AF78-63AD5D963EBD@.microsoft.com...
> Is there any way to backup(like method or command to run) data that were
> entered into the database' Like saving all the data into another file(.eg
> .txt), so that i'm able to clear certain tables in the database in a
> weekly
> or monthly basis. As my system handles lots of data a day, so i need to
> backup and clear the database to ensure that the system had enough space
> and
> able to run fast enough. I know that there are few types of backup
> available
> in the books i read up like 'Database backup', 'Differential database
> backup', 'File and/or File group backup' and 'Transaction log backup', but
> i
> cannot find any methods on how to use them. And i also didn't find the
> full
> explaination for these backup. Which of these are better? Or are there any
> better backup available?
> Thanx..

Sunday, February 19, 2012

Backup ?

I do this to backup the database on our production server
BACKUP DATABASE [DP2] TO DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBack
up'
WITH INIT , NOUNLOAD , NAME = N'DP2 Backup Job', NOSKIP , STATS = 10,
NOFORMAT DECLARE @.i INT
select @.i = position from msdb..backupset where database_name='DP2'and
type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset
where database_name='DP2')
RESTORE VERIFYONLY FROM DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBack
up'
WITH FILE = @.i
It works fine. However if I change to a mapped drive it gives me the
following error. I had agent running under the system account with failures
so thought I would change to my account, it also fails. I have full control
of that directory from this machine in windows. What gives?
Executed as user: DP2SQL02\jcantley. Cannot open backup device
'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server
error log for more details. [SQLSTATE 42000] (Error 3201) BACKUP DATABASE
is terminating abnormally. [SQLSTATE 42000] (Error 3013) Associated
statement is not prepared [SQLSTATE HY007] (Error 0) Cannot open backup
device 'V:\DailyDbBackup'. Device error or device off-line. See the SQL
Server error log for more details. [SQLSTATE 42000] (Error 3201) VERIFY
DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step
failed.See if this helps: http://vyaskn.tripod.com/administration_faq.htm#q17
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"JC" <striderguy56@.hotmail.com> wrote in message
news:OZ7MaIAIFHA.580@.TK2MSFTNGP15.phx.gbl...
I do this to backup the database on our production server
BACKUP DATABASE [DP2] TO DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBack
up'
WITH INIT , NOUNLOAD , NAME = N'DP2 Backup Job', NOSKIP , STATS = 10,
NOFORMAT DECLARE @.i INT
select @.i = position from msdb..backupset where database_name='DP2'and
type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset
where database_name='DP2')
RESTORE VERIFYONLY FROM DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBack
up'
WITH FILE = @.i
It works fine. However if I change to a mapped drive it gives me the
following error. I had agent running under the system account with failures
so thought I would change to my account, it also fails. I have full control
of that directory from this machine in windows. What gives?
Executed as user: DP2SQL02\jcantley. Cannot open backup device
'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server
error log for more details. [SQLSTATE 42000] (Error 3201) BACKUP DATABASE
is terminating abnormally. [SQLSTATE 42000] (Error 3013) Associated
statement is not prepared [SQLSTATE HY007] (Error 0) Cannot open backup
device 'V:\DailyDbBackup'. Device error or device off-line. See the SQL
Server error log for more details. [SQLSTATE 42000] (Error 3201) VERIFY
DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step
failed.

Backup ?

I do this to backup the database on our production server
BACKUP DATABASE [DP2] TO DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
WITH INIT , NOUNLOAD , NAME = N'DP2 Backup Job', NOSKIP , STATS = 10,
NOFORMAT DECLARE @.i INT
select @.i = position from msdb..backupset where database_name='DP2'and
type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset
where database_name='DP2')
RESTORE VERIFYONLY FROM DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
WITH FILE = @.i
It works fine. However if I change to a mapped drive it gives me the
following error. I had agent running under the system account with failures
so thought I would change to my account, it also fails. I have full control
of that directory from this machine in windows. What gives?
Executed as user: DP2SQL02\jcantley. Cannot open backup device
'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
log for more details. [SQLSTATE 42000] (Error 3201) BACKUP DATABASE is
terminating abnormally. [SQLSTATE 42000] (Error 3013) Associated statement
is not prepared [SQLSTATE HY007] (Error 0) Cannot open backup device
'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
log for more details. [SQLSTATE 42000] (Error 3201) VERIFY DATABASE is
terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.
Hi
Mapped drives are not supported. You have to use UNC paths.
Regards
Mike
"jcantley" wrote:

> I do this to backup the database on our production server
> BACKUP DATABASE [DP2] TO DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
> WITH INIT , NOUNLOAD , NAME = N'DP2 Backup Job', NOSKIP , STATS = 10,
> NOFORMAT DECLARE @.i INT
> select @.i = position from msdb..backupset where database_name='DP2'and
> type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset
> where database_name='DP2')
> RESTORE VERIFYONLY FROM DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
> WITH FILE = @.i
> It works fine. However if I change to a mapped drive it gives me the
> following error. I had agent running under the system account with failures
> so thought I would change to my account, it also fails. I have full control
> of that directory from this machine in windows. What gives?
> Executed as user: DP2SQL02\jcantley. Cannot open backup device
> 'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
> log for more details. [SQLSTATE 42000] (Error 3201) BACKUP DATABASE is
> terminating abnormally. [SQLSTATE 42000] (Error 3013) Associated statement
> is not prepared [SQLSTATE HY007] (Error 0) Cannot open backup device
> 'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
> log for more details. [SQLSTATE 42000] (Error 3201) VERIFY DATABASE is
> terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.
|||Mike,
Here is what I get when i use UNC. We are running active dir could that be
an issue? I am running this under my account but would like to just run it
under system, but what ever works.
Executed as user: DP2SQL02\jcantley. Cannot open backup device
'\\Dp2sql01\BACKUP\DailyDbBackup'. Device error or device off-line. See the
SQL Server error log for more details. [SQLSTATE 42000] (Error 3201) BACKUP
DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013) Associated
statement is not prepared [SQLSTATE HY007] (Error 0) Cannot open backup
device '\\Dp2sql01\BACKUP\DailyDbBackup'. Device error or device off-line.
See the SQL Server error log for more details. [SQLSTATE 42000] (Error 3201)
VERIFY DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013).
The step failed.
"Mike Epprecht (SQL MVP)" wrote:
[vbcol=seagreen]
> Hi
> Mapped drives are not supported. You have to use UNC paths.
> Regards
> Mike
> "jcantley" wrote:
|||Hi
Have you verified, that when you log on to the server as the account that
runs SQL server and Agent Service, then the folder is available and you have
write access to the folder?
What about the syntax for the TO DISK = ... is that correct? You specify TO
DISK = \\dp2sql01\BACKUP\DailyBackup - could it be that SQL reads this as a
folder rather than as a file? What if you try with ...TO DISK =
'\\dp2sql01\BACKUP\DailyBackup.bak' ?
Regards
Steen
StiderGuy wrote:[vbcol=seagreen]
> Mike,
> Here is what I get when i use UNC. We are running active dir could
> that be an issue? I am running this under my account but would like
> to just run it under system, but what ever works.
> Executed as user: DP2SQL02\jcantley. Cannot open backup device
> '\\Dp2sql01\BACKUP\DailyDbBackup'. Device error or device off-line.
> See the SQL Server error log for more details. [SQLSTATE 42000]
> (Error 3201) BACKUP DATABASE is terminating abnormally. [SQLSTATE
> 42000] (Error 3013) Associated statement is not prepared [SQLSTATE
> HY007] (Error 0) Cannot open backup device
> '\\Dp2sql01\BACKUP\DailyDbBackup'. Device error or device off-line.
> See the SQL Server error log for more details. [SQLSTATE 42000]
> (Error 3201) VERIFY DATABASE is terminating abnormally. [SQLSTATE
> 42000] (Error 3013). The step failed.
> "Mike Epprecht (SQL MVP)" wrote:

Backup ?

I do this to backup the database on our production server
BACKUP DATABASE [DP2] TO DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
WITH INIT , NOUNLOAD , NAME = N'DP2 Backup Job', NOSKIP , STATS = 10,
NOFORMAT DECLARE @.i INT
select @.i = position from msdb..backupset where database_name='DP2'and
type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset
where database_name='DP2')
RESTORE VERIFYONLY FROM DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
WITH FILE = @.i
It works fine. However if I change to a mapped drive it gives me the
following error. I had agent running under the system account with failures
so thought I would change to my account, it also fails. I have full control
of that directory from this machine in windows. What gives?
Executed as user: DP2SQL02\jcantley. Cannot open backup device
'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
log for more details. [SQLSTATE 42000] (Error 3201) BACKUP DATABASE is
terminating abnormally. [SQLSTATE 42000] (Error 3013) Associated statement
is not prepared [SQLSTATE HY007] (Error 0) Cannot open backup device
'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
log for more details. [SQLSTATE 42000] (Error 3201) VERIFY DATABASE is
terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.Hi
Mapped drives are not supported. You have to use UNC paths.
Regards
Mike
"jcantley" wrote:
> I do this to backup the database on our production server
> BACKUP DATABASE [DP2] TO DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
> WITH INIT , NOUNLOAD , NAME = N'DP2 Backup Job', NOSKIP , STATS = 10,
> NOFORMAT DECLARE @.i INT
> select @.i = position from msdb..backupset where database_name='DP2'and
> type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset
> where database_name='DP2')
> RESTORE VERIFYONLY FROM DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
> WITH FILE = @.i
> It works fine. However if I change to a mapped drive it gives me the
> following error. I had agent running under the system account with failures
> so thought I would change to my account, it also fails. I have full control
> of that directory from this machine in windows. What gives?
> Executed as user: DP2SQL02\jcantley. Cannot open backup device
> 'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
> log for more details. [SQLSTATE 42000] (Error 3201) BACKUP DATABASE is
> terminating abnormally. [SQLSTATE 42000] (Error 3013) Associated statement
> is not prepared [SQLSTATE HY007] (Error 0) Cannot open backup device
> 'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
> log for more details. [SQLSTATE 42000] (Error 3201) VERIFY DATABASE is
> terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.|||Mike,
Here is what I get when i use UNC. We are running active dir could that be
an issue? I am running this under my account but would like to just run it
under system, but what ever works.
Executed as user: DP2SQL02\jcantley. Cannot open backup device
'\\Dp2sql01\BACKUP\DailyDbBackup'. Device error or device off-line. See the
SQL Server error log for more details. [SQLSTATE 42000] (Error 3201) BACKUP
DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013) Associated
statement is not prepared [SQLSTATE HY007] (Error 0) Cannot open backup
device '\\Dp2sql01\BACKUP\DailyDbBackup'. Device error or device off-line.
See the SQL Server error log for more details. [SQLSTATE 42000] (Error 3201)
VERIFY DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013).
The step failed.
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> Mapped drives are not supported. You have to use UNC paths.
> Regards
> Mike
> "jcantley" wrote:
> > I do this to backup the database on our production server
> >
> > BACKUP DATABASE [DP2] TO DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
> > WITH INIT , NOUNLOAD , NAME = N'DP2 Backup Job', NOSKIP , STATS = 10,
> > NOFORMAT DECLARE @.i INT
> > select @.i = position from msdb..backupset where database_name='DP2'and
> > type!='F' and backup_set_id=(select max(backup_set_id) from msdb..backupset
> > where database_name='DP2')
> > RESTORE VERIFYONLY FROM DISK = N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup'
> > WITH FILE = @.i
> >
> > It works fine. However if I change to a mapped drive it gives me the
> > following error. I had agent running under the system account with failures
> > so thought I would change to my account, it also fails. I have full control
> > of that directory from this machine in windows. What gives?
> >
> > Executed as user: DP2SQL02\jcantley. Cannot open backup device
> > 'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
> > log for more details. [SQLSTATE 42000] (Error 3201) BACKUP DATABASE is
> > terminating abnormally. [SQLSTATE 42000] (Error 3013) Associated statement
> > is not prepared [SQLSTATE HY007] (Error 0) Cannot open backup device
> > 'V:\DailyDbBackup'. Device error or device off-line. See the SQL Server error
> > log for more details. [SQLSTATE 42000] (Error 3201) VERIFY DATABASE is
> > terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.|||Hi
Have you verified, that when you log on to the server as the account that
runs SQL server and Agent Service, then the folder is available and you have
write access to the folder?
What about the syntax for the TO DISK = ... is that correct? You specify TO
DISK = \\dp2sql01\BACKUP\DailyBackup - could it be that SQL reads this as a
folder rather than as a file? What if you try with ...TO DISK ='\\dp2sql01\BACKUP\DailyBackup.bak' ?
Regards
Steen
StiderGuy wrote:
> Mike,
> Here is what I get when i use UNC. We are running active dir could
> that be an issue? I am running this under my account but would like
> to just run it under system, but what ever works.
> Executed as user: DP2SQL02\jcantley. Cannot open backup device
> '\\Dp2sql01\BACKUP\DailyDbBackup'. Device error or device off-line.
> See the SQL Server error log for more details. [SQLSTATE 42000]
> (Error 3201) BACKUP DATABASE is terminating abnormally. [SQLSTATE
> 42000] (Error 3013) Associated statement is not prepared [SQLSTATE
> HY007] (Error 0) Cannot open backup device
> '\\Dp2sql01\BACKUP\DailyDbBackup'. Device error or device off-line.
> See the SQL Server error log for more details. [SQLSTATE 42000]
> (Error 3201) VERIFY DATABASE is terminating abnormally. [SQLSTATE
> 42000] (Error 3013). The step failed.
> "Mike Epprecht (SQL MVP)" wrote:
>> Hi
>> Mapped drives are not supported. You have to use UNC paths.
>> Regards
>> Mike
>> "jcantley" wrote:
>> I do this to backup the database on our production server
>> BACKUP DATABASE [DP2] TO DISK =>> N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup' WITH INIT , NOUNLOAD
>> , NAME = N'DP2 Backup Job', NOSKIP , STATS = 10, NOFORMAT
>> DECLARE @.i INT
>> select @.i = position from msdb..backupset where
>> database_name='DP2'and type!='F' and backup_set_id=(select
>> max(backup_set_id) from msdb..backupset where database_name='DP2')
>> RESTORE VERIFYONLY FROM DISK =>> N'D:\mssql\data\MSSQL\BACKUP\DailyDbBackup' WITH FILE = @.i
>> It works fine. However if I change to a mapped drive it gives me the
>> following error. I had agent running under the system account with
>> failures so thought I would change to my account, it also fails. I
>> have full control of that directory from this machine in windows.
>> What gives?
>> Executed as user: DP2SQL02\jcantley. Cannot open backup device
>> 'V:\DailyDbBackup'. Device error or device off-line. See the SQL
>> Server error log for more details. [SQLSTATE 42000] (Error 3201)
>> BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error
>> 3013) Associated statement is not prepared [SQLSTATE HY007] (Error
>> 0) Cannot open backup device 'V:\DailyDbBackup'. Device error or
>> device off-line. See the SQL Server error log for more details.
>> [SQLSTATE 42000] (Error 3201) VERIFY DATABASE is terminating
>> abnormally. [SQLSTATE 42000] (Error 3013). The step failed.

Sunday, February 12, 2012

backing up transaction log mssql server 2000

Hi I am having problems backing up my transaction log.
The destination for the backup is not on the actual
server that the log is on, but another server. y:\ is a
mapped drive on my sql server.
Is sql capable of backing up to a network drive?
The message below is what i obtained by looking at the
server logs.
can someone help me please, if this goes another day
without a backup, i might halt my server as the log drive
will run out of space.
can i do a backup of the transaction log at any time?
does it cause disruption to users when it does happen?
regards,
Andrew
BACKUP failed to complete the command BACKUP LOG
[QUATTRO] TO DISK = N'y:\QUATTRO_tlog_200406110000.TRN'
WITH INIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
Perhaps it's a rights issue. Try the following in Query Analyzer:
master..xp_cmdshell 'dir y:\'
If this fails, this means SQL Server does not have adequate rights to access
the network drive. You might need to change the startup account for the SQL
Server service then.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backups? Try MiniSQLBackup
"Andrew Marks" <andrewmarks@.flowerspartners.com.au> wrote in message
news:1afb401c44f43$f96b79f0$a101280a@.phx.gbl...
> Hi I am having problems backing up my transaction log.
> The destination for the backup is not on the actual
> server that the log is on, but another server. y:\ is a
> mapped drive on my sql server.
> Is sql capable of backing up to a network drive?
> The message below is what i obtained by looking at the
> server logs.
> can someone help me please, if this goes another day
> without a backup, i might halt my server as the log drive
> will run out of space.
> can i do a backup of the transaction log at any time?
> does it cause disruption to users when it does happen?
> regards,
> Andrew
> BACKUP failed to complete the command BACKUP LOG
> [QUATTRO] TO DISK = N'y:\QUATTRO_tlog_200406110000.TRN'
> WITH INIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT
|||Hi Peter, this is the result of your command in query
analyser.
I assume that this means that the backup job wont work?
Volume in drive Y is Downloads
Volume Serial Number is BC5F-74DB
NULL
Directory of y:\
NULL
File Not Found
NULL
I didn't actually see the y:\ in the folder options, I
mapped the drive then just put y:\in the command line.
what can a do to enable the backup to work?
regards,
Andrew
ps thanks for your reply.

>--Original Message--
>Perhaps it's a rights issue. Try the following in Query
Analyzer:
>master..xp_cmdshell 'dir y:\'
>If this fails, this means SQL Server does not have
adequate rights to access
>the network drive. You might need to change the startup
account for the SQL
>Server service then.
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backups? Try MiniSQLBackup
>
>"Andrew Marks" <andrewmarks@.flowerspartners.com.au>
wrote in message[vbcol=seagreen]
>news:1afb401c44f43$f96b79f0$a101280a@.phx.gbl...
a[vbcol=seagreen]
drive[vbcol=seagreen]
N'y:\QUATTRO_tlog_200406110000.TRN'[vbcol=seagreen]
NOFORMAT
>
>.
>
|||You seem to be able to access the directory just fine. Do you have rights
to write to it using SQL Server credentials? Try copying a file over via QA
e.g.
master..xp_cmdshell 'xcopy c:\<some file on your local drive> y:\'
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backups? Try MiniSQLBackup
"Andrew MArks" <andrewmarks@.flowerspartners.com.au> wrote in message
news:1ada501c44f58$0d89fd80$a301280a@.phx.gbl...[vbcol=seagreen]
> Hi Peter, this is the result of your command in query
> analyser.
> I assume that this means that the backup job wont work?
>
> Volume in drive Y is Downloads
> Volume Serial Number is BC5F-74DB
> NULL
> Directory of y:\
> NULL
> File Not Found
> NULL
> I didn't actually see the y:\ in the folder options, I
> mapped the drive then just put y:\in the command line.
> what can a do to enable the backup to work?
> regards,
> Andrew
> ps thanks for your reply.
> Analyzer:
> adequate rights to access
> account for the SQL
> wrote in message
> a
> drive
> N'y:\QUATTRO_tlog_200406110000.TRN'
> NOFORMAT
|||Hi peter,
thanks for you reply. I tried your command and got the
following result.
E:\backup\Splitter.exe
Access denied
NULL
How do I get my sql server to access my file server
through the sql?
regards,
Andrew

>--Original Message--
>You seem to be able to access the directory just fine.
Do you have rights
>to write to it using SQL Server credentials? Try
copying a file over via QA
>e.g.
>master..xp_cmdshell 'xcopy c:\<some file on your local
drive> y:\'
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backups? Try MiniSQLBackup
>
>"Andrew MArks" <andrewmarks@.flowerspartners.com.au>
wrote in message[vbcol=seagreen]
>news:1ada501c44f58$0d89fd80$a301280a@.phx.gbl...
Query[vbcol=seagreen]
startup[vbcol=seagreen]
log.[vbcol=seagreen]
is[vbcol=seagreen]
the[vbcol=seagreen]
time?[vbcol=seagreen]
happen?
>
>.
>
|||Perhaps your file server has not granted 'Write access' rights on this
folder.
Bear in mind that the SQL Server service starts up using the credentials of
either the Local system account or a named user. You can see this by
opening the Services panel on your server, open the properties page for the
MSSQLSERVER service, and select the Log on tab.
If you are currently using the Local System account and need to stick with
this, then I don't know what sort of rights you need to grant, and to which
named account, in order for the remote machine to explicitly allow this
account write access.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backups? Try MiniSQLBackup
"andrew marks" <andrewmarks@.flowerspartners.com.au> wrote in message
news:1b0fe01c44f64$dd163300$a401280a@.phx.gbl...[vbcol=seagreen]
> Hi peter,
> thanks for you reply. I tried your command and got the
> following result.
> E:\backup\Splitter.exe
> Access denied
> NULL
> How do I get my sql server to access my file server
> through the sql?
> regards,
> Andrew
> Do you have rights
> copying a file over via QA
> drive> y:\'
> wrote in message
> Query
> startup
> log.
> is
> the
> time?
> happen?
|||Hi,
This means your SQL Server start up account do not have necessory previlage
to File server directory.
To do this you have to start your sql server using domain user which got
access to file server directory.
There are Few Pre requisites to do backup remotely;
1. You Should start SQL server service using Domain user who got access to
remote
machine Share
How to change the startup account:-
So go to Control Panel -- Admin Tools -- Services -- MSSQL Server sercice--
Double click and select the "Log on" option.There you give a Valid Domain OS
user and password
to start the service. Now stop and start the MSSQL Server service
2. SQL server startup Domain user must have write access to the share in the
remote machine
3. If you need to schedule this as a job then SQL Agent should use the same
Domain user in which SQL server
was started
4. Restart the services
Now you can execute the Backup script with UNC path
BACKUP Log <dbname> to disk='\\computername\sharename\dbname.bak' with
init
Note:
Backup to remote machine will not work if you start SQL server using Local
system account
Thanks
Hari
MCDBA
Thanks
Hari
MCDBA
"andrew marks" <andrewmarks@.flowerspartners.com.au> wrote in message
news:1b0fe01c44f64$dd163300$a401280a@.phx.gbl...[vbcol=seagreen]
> Hi peter,
> thanks for you reply. I tried your command and got the
> following result.
> E:\backup\Splitter.exe
> Access denied
> NULL
> How do I get my sql server to access my file server
> through the sql?
> regards,
> Andrew
> Do you have rights
> copying a file over via QA
> drive> y:\'
> wrote in message
> Query
> startup
> log.
> is
> the
> time?
> happen?