Friday, February 24, 2012
Attempts to made backup on the network drive are failed
on MS Windows Advanced Server Service Pack 4
Attempts to made backup on the network drive are failed.
There are two databases with this feature. One has 1400Mb data and 100Mb
log. Another has 4410Mb data and 1000Mb log.
First database has about 80% successful attempts. Second - only 10%. However
there are a lot of databases about 300-500Mb that are backed up successfully
always and one that has 4100Mb data and 1000Mb log, that is backed up
successfully always.
Backups on the local drives are always successful.
Copying entire catalog \data (about 20Gb mdf and ldf files) on the same
network drive is always successful.
Symptoms:
After issuing this statement:
backup database LargeDB to
disk='\\server001\backup2\mssql\LargeDB_20031209.bak' with stats=1
we have result:
1 percent backed up.
2 percent backed up.
3 percent backed up.
................
97 percent backed up.
98 percent backed up.
99 percent backed up.
Processed 563608 pages for database 'LargeDB', file 'LargeDBData' on file 1.
100 percent backed up.
Processed 1 pages for database 'LargeDB', file 'LargeDBlog' on file 1.
Server: Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
SQL Server log contains two records:
BackupDiskFile::RequestDurableMedia: failure on backup device
'\\server001\backup2\mssql\LargeDB_20031209.bak'. Operating system error
64(error not found).
BACKUP failed to complete the command backup database LargeDB to
disk='\\server001\backup2\mssql\LargeDB_20031209.bak' with stats=1
Application event log contains two records:
18210 :
BackupDiskFile::RequestDurableMedia: failure on backup device
'\\server001\backup2\mssql\LargeDB_20031209.bak'. Operating system error
64(error not found).
3041 :
BACKUP failed to complete the command backup database LargeDB to
disk='\\server001\backup2\mssql\LargeDB_20031209.bak' with stats=1
System event log has no records
Events logs from file server has no records.
Attempt to restore from the "unsuccessful" backup file always is successful.
What should I do?|
| MS SQL Server 2000 Enterprise Edition Service Pack 3
| on MS Windows Advanced Server Service Pack 4
|
| Attempts to made backup on the network drive are failed.
| There are two databases with this feature. One has 1400Mb data and 100Mb
| log. Another has 4410Mb data and 1000Mb log.
| First database has about 80% successful attempts. Second - only 10%.
However
| there are a lot of databases about 300-500Mb that are backed up
successfully
| always and one that has 4100Mb data and 1000Mb log, that is backed up
| successfully always.
| Backups on the local drives are always successful.
| Copying entire catalog \data (about 20Gb mdf and ldf files) on the same
| network drive is always successful.
|
| Symptoms:
| After issuing this statement:
| backup database LargeDB to
| disk='\\server001\backup2\mssql\LargeDB_20031209.bak' with stats=1
| we have result:
| 1 percent backed up.
| 2 percent backed up.
| 3 percent backed up.
| ................
| 97 percent backed up.
| 98 percent backed up.
| 99 percent backed up.
| Processed 563608 pages for database 'LargeDB', file 'LargeDBData' on file
1.
| 100 percent backed up.
| Processed 1 pages for database 'LargeDB', file 'LargeDBlog' on file 1.
| Server: Msg 3013, Level 16, State 1, Line 1
| BACKUP DATABASE is terminating abnormally.
|
| SQL Server log contains two records:
| BackupDiskFile::RequestDurableMedia: failure on backup device
| '\\server001\backup2\mssql\LargeDB_20031209.bak'. Operating system error
| 64(error not found).
| BACKUP failed to complete the command backup database LargeDB to
| disk='\\server001\backup2\mssql\LargeDB_20031209.bak' with stats=1
|
| Application event log contains two records:
| 18210 :
| BackupDiskFile::RequestDurableMedia: failure on backup device
| '\\server001\backup2\mssql\LargeDB_20031209.bak'. Operating system error
| 64(error not found).
| 3041 :
| BACKUP failed to complete the command backup database LargeDB to
| disk='\\server001\backup2\mssql\LargeDB_20031209.bak' with stats=1
| System event log has no records
|
| Events logs from file server has no records.
|
| Attempt to restore from the "unsuccessful" backup file always is
successful.
|
| What should I do?
--
Go to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\param
eters\SessTimeout
Increase this value to 600 (10 minutes) and see how you go.
Hope this helps,
--
Eric Cárdenas
SQL Server support
Attempting to restore a db from a network drive and use the 'with move' statement
log file to a new location. CAN SOMEONE PLEAS REVIEW THE STATEMENTS
AND ERROR MESSAGES AND LET ME KNOW WHAT I AM DOING WRONG.
Here is the script that I am using for this procedure
===================================== USE MASTER
GO
RESTORE FILELISTONLY
FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
Backup\Indii DB'
RESTORE LOG Indii
FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
Backup\Indii DB'
WITH MOVE 'Indii_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL$INDII_NY2_PROD\Data\Indii_Log.LDF'
-- WITH NORECOVERY
RESTORE DATABASE Indii
FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
Backup\Indii DB'
WITH NORECOVERY
=====================================
Here are the error(s) that I am receiving
===================================== Server: Msg 913, Level 16, State 8, Line 3
Could not find database ID 65535. Database may not be activated yet or
may be in transition.
Server: Msg 3013, Level 16, State 1, Line 3
RESTORE LOG is terminating abnormally.
Server: Msg 5105, Level 16, State 2, Line 7
Device activation error. The physical file name 'C:\Program
Files\Microsoft SQL Server\MSSQL$PRODUCTION\Data\\Indii_log.LDF' may be
incorrect.
Server: Msg 3156, Level 16, State 1, Line 7
File 'Indii_Log' cannot be restored to 'C:\Program Files\Microsoft SQL
Server\MSSQL$PRODUCTION\Data\\Indii_log.LDF'. Use WITH MOVE to identify
a valid location for the file.
Server: Msg 3013, Level 16, State 1, Line 7
RESTORE DATABASE is terminating abnormally.war_wheelan@.yahoo.com wrote:
> Attempting to restore a db from a network drive and need to move the
> log file to a new location. CAN SOMEONE PLEAS REVIEW THE STATEMENTS
> AND ERROR MESSAGES AND LET ME KNOW WHAT I AM DOING WRONG.
> Here is the script that I am using for this procedure
> =====================================> USE MASTER
> GO
> RESTORE FILELISTONLY
> FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
> Backup\Indii DB'
> RESTORE LOG Indii
> FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
> Backup\Indii DB'
> WITH MOVE 'Indii_Log' TO 'C:\Program Files\Microsoft SQL
> Server\MSSQL$INDII_NY2_PROD\Data\Indii_Log.LDF'
> -- WITH NORECOVERY
> RESTORE DATABASE Indii
> FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
> Backup\Indii DB'
> WITH NORECOVERY
> =====================================> Here are the error(s) that I am receiving
> =====================================> Server: Msg 913, Level 16, State 8, Line 3
> Could not find database ID 65535. Database may not be activated yet or
> may be in transition.
> Server: Msg 3013, Level 16, State 1, Line 3
> RESTORE LOG is terminating abnormally.
> Server: Msg 5105, Level 16, State 2, Line 7
> Device activation error. The physical file name 'C:\Program
> Files\Microsoft SQL Server\MSSQL$PRODUCTION\Data\\Indii_log.LDF' may be
> incorrect.
> Server: Msg 3156, Level 16, State 1, Line 7
> File 'Indii_Log' cannot be restored to 'C:\Program Files\Microsoft SQL
> Server\MSSQL$PRODUCTION\Data\\Indii_log.LDF'. Use WITH MOVE to identify
> a valid location for the file.
> Server: Msg 3013, Level 16, State 1, Line 7
> RESTORE DATABASE is terminating abnormally.
>
It looks like you're trying to restore the log before the database has
been restored. Restore the database first, THEN the log.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Tracy,
The reason that I attempted to restore the log file first is because I
receive the same error either way.
Tracy McKibben wrote:
> war_wheelan@.yahoo.com wrote:
> > Attempting to restore a db from a network drive and need to move the
> > log file to a new location. CAN SOMEONE PLEAS REVIEW THE STATEMENTS
> > AND ERROR MESSAGES AND LET ME KNOW WHAT I AM DOING WRONG.
> >
> > Here is the script that I am using for this procedure
> > =====================================> > USE MASTER
> > GO
> > RESTORE FILELISTONLY
> > FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
> > Backup\Indii DB'
> > RESTORE LOG Indii
> > FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
> > Backup\Indii DB'
> > WITH MOVE 'Indii_Log' TO 'C:\Program Files\Microsoft SQL
> > Server\MSSQL$INDII_NY2_PROD\Data\Indii_Log.LDF'
> > -- WITH NORECOVERY
> > RESTORE DATABASE Indii
> > FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
> > Backup\Indii DB'
> > WITH NORECOVERY
> > =====================================> >
> > Here are the error(s) that I am receiving
> > =====================================> > Server: Msg 913, Level 16, State 8, Line 3
> > Could not find database ID 65535. Database may not be activated yet or
> > may be in transition.
> > Server: Msg 3013, Level 16, State 1, Line 3
> > RESTORE LOG is terminating abnormally.
> > Server: Msg 5105, Level 16, State 2, Line 7
> > Device activation error. The physical file name 'C:\Program
> > Files\Microsoft SQL Server\MSSQL$PRODUCTION\Data\\Indii_log.LDF' may be
> > incorrect.
> > Server: Msg 3156, Level 16, State 1, Line 7
> > File 'Indii_Log' cannot be restored to 'C:\Program Files\Microsoft SQL
> > Server\MSSQL$PRODUCTION\Data\\Indii_log.LDF'. Use WITH MOVE to identify
> > a valid location for the file.
> > Server: Msg 3013, Level 16, State 1, Line 7
> > RESTORE DATABASE is terminating abnormally.
> >
> It looks like you're trying to restore the log before the database has
> been restored. Restore the database first, THEN the log.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
Attempting to restore a db from a network drive and use the 'with move' statement
log file to a new location. CAN SOMEONE PLEAS REVIEW THE STATEMENTS
AND ERROR MESSAGES AND LET ME KNOW WHAT I AM DOING WRONG.
Here is the script that I am using for this procedure
=====================================
USE MASTER
GO
RESTORE FILELISTONLY
FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
Backup\Indii DB'
RESTORE LOG Indii
FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
Backup\Indii DB'
WITH MOVE 'Indii_Log' TO 'C:\Program Files\Microsoft SQL
Server\MSSQL$INDII_NY2_PROD\Data\Indii_L
og.LDF'
-- WITH NORECOVERY
RESTORE DATABASE Indii
FROM DISK = '\\NAS1\NASDisk\SQL Server\SQL Server Production
Backup\Indii DB'
WITH NORECOVERY
=====================================
Here are the error(s) that I am receiving
=====================================
Server: Msg 913, Level 16, State 8, Line 3
Could not find database ID 65535. Database may not be activated yet or
may be in transition.
Server: Msg 3013, Level 16, State 1, Line 3
RESTORE LOG is terminating abnormally.
Server: Msg 5105, Level 16, State 2, Line 7
Device activation error. The physical file name 'C:\Program
Files\Microsoft SQL Server\MSSQL$PRODUCTION\Data\\Indii_log.LDF' may be
incorrect.
Server: Msg 3156, Level 16, State 1, Line 7
File 'Indii_Log' cannot be restored to 'C:\Program Files\Microsoft SQL
Server\MSSQL$PRODUCTION\Data\\Indii_log.LDF'. Use WITH MOVE to identify
a valid location for the file.
Server: Msg 3013, Level 16, State 1, Line 7
RESTORE DATABASE is terminating abnormally.Tracy,
The reason that I attempted to restore the log file first is because I
receive the same error either way.
Tracy McKibben wrote:
> war_wheelan@.yahoo.com wrote:
> It looks like you're trying to restore the log before the database has
> been restored. Restore the database first, THEN the log.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
Monday, February 13, 2012
Attaching a DB to a Network Folder
I'm trying to attach a db to a network folder.
I used the sproc sp_attach_db from master db to attach a test db to a local drive (c:\test) and works fine.
EXEC sp_attach_db @.dbname = N'myDatabase',
@.filename1 = N'C:\Test\myDatabase.mdf'
NO PROB. With this--
but when i try to attach a test td to a network drive, (\\computer\test) does not work.
EXEC sp_attach_db @.dbname = N'myDatabase',
@.filename1 = N'\\computer\test\myDatabase.mdf'
--I get this error message -
File '\\computer\test\myDatabase.mdf' is on a network device not supported for database files.
So i'm thinking that I can not use sp_attach_db sproc to attach a db to a network drive?
Is there any other way to attach a db to a network drive?
I even tried to map the network folder and it did not work.
EXEC sp_attach_db @.dbname = N'myDatabase',
@.filename1 = N'z:\test\myDatabase.mdf'
Yeah i forgot to tell you I'm using SQL Server 2000.
If you have ever run into this kind of situation, please let me know.
Thanks.
Irv
This link may help
http://support.microsoft.com/default.aspx?scid=kb;en-us;304261
specifically the use of trace flag 1807
|||You could try adding trace flag 1807
Allows you to configure SQL Server with network-based database files.
Note: I would not do this with a database myself because I don't know the down side.
See thread http://forums.databasejournal.com/showthread.php?t=30580&goto=nextnewest
Tim S
|||
Thanks Guys, That was really helpful!
Irv
attaching a DB in express 2005
I am having trouble attaching a db to ms sql express 2005.
I have the db in a folder deep down in my drive, within an asp.net website project. For some wierd reason i can't drill down more than two levels to get to the DB
Anyone have any ideas why?
Ilan
Hey,
Yes, there are security problems for the account that can access it (the SQL Server internal account). I've experienced this as well, and it is weird, but if you copy the DB to c:\program files\microsoft SQL Server\90\, and then into one of the data folders, it can access it there (probably can access from that root folder too).
|||So you recommend that i copy the DB in the microsft SQL folder and once i have linked to it in express move it to the data folder for my project?
|||Hey,
It's a minor annoyance, but it's not too bad. Yes, I have found no other thing to do in that situation... The alternatives are to attach the database to the database server, or use straight-up T-SQL to do everything you want. You can use T-SQL to manage your database, as you can use T-SQL for everything you do in the editor.