Monday, March 19, 2012

Backup Database! this is really interesting!

Hi,
I run this in query analyzer
dump database MYDB to disk = 'c:\temp.dat' with init
sql server fails to back up and returns
Server: Msg 3202, Level 16, State 1, Line 1
Write on 'c:\temp.dat' failed, status = 64. See the SQL Server Error Log For
More details.
Server: Msg 3013, Level 16, State 1, Line 1
Backup Database is terminating abnormally
and these are the diagnostics and computer configurations i
performed(computerA):
1. There is 25.5 GB of free space available on C drive.
2. The computer has two RAIDSone SCSI drive. It generates same error on all
of them. This leads me to believe that this is not hardware problem.
3. It generates for all three databases on the server. so not dependent on
database either.
4. Tested on another computer with same hardware but got the databases from
computerA. It fails on that computer too.
5. tested on yet another computer with older versions of the same databases
,(not restored from computerA). It succeeds.
My thoughts are inclined towards virus or sth in the database. but here
comes the kicker. asked the services guy to send me the database backups.
Restored dbs on my machine to the backup copies. It all works fine.
So not the DBs, Not the SQL Server, not the Hardware. what is it?
Or am i totally on the wrong track?
Please someone put some suggestions. I am burning saturday to do this.
A couple things to note. One is that DUMP is the old 6.5 command and you
should be using BACKUP DATABASE instead. But I suspect the error is due to
incorrect permissions but without more details it's hard to say for sure.
Did you check the SQL Error log as it stated? The backup command is always
done under the account SQL Server is running under. So make sure that
account has write permissions on that directory and file. Make sure the file
is not locked by some other application such as a tape backup process.
Andrew J. Kelly SQL MVP
"venAdder" <venAdder@.discussions.microsoft.com> wrote in message
news:F7183062-C942-4B7C-8DD3-A0FAC0228CC8@.microsoft.com...
> Hi,
> I run this in query analyzer
> dump database MYDB to disk = 'c:\temp.dat' with init
> sql server fails to back up and returns
> Server: Msg 3202, Level 16, State 1, Line 1
> Write on 'c:\temp.dat' failed, status = 64. See the SQL Server Error Log
> For
> More details.
> Server: Msg 3013, Level 16, State 1, Line 1
> Backup Database is terminating abnormally
>
> and these are the diagnostics and computer configurations i
> performed(computerA):
> 1. There is 25.5 GB of free space available on C drive.
> 2. The computer has two RAIDSone SCSI drive. It generates same error on
> all
> of them. This leads me to believe that this is not hardware problem.
> 3. It generates for all three databases on the server. so not dependent on
> database either.
> 4. Tested on another computer with same hardware but got the databases
> from
> computerA. It fails on that computer too.
> 5. tested on yet another computer with older versions of the same
> databases
> ,(not restored from computerA). It succeeds.
> My thoughts are inclined towards virus or sth in the database. but here
> comes the kicker. asked the services guy to send me the database backups.
> Restored dbs on my machine to the backup copies. It all works fine.
> So not the DBs, Not the SQL Server, not the Hardware. what is it?
> Or am i totally on the wrong track?
> Please someone put some suggestions. I am burning saturday to do this.
|||I am sorry c:\temp.dat is wrong.
it is \\myserver\c$\temp.dat
Ok I think I know what the problem is. The path is actually
'\\myserver\c$\temp.dat'. The status = 64 means The specified network name
is no longer available ( ERROR_NETNAME_DELETED ). But the myserver is the
name of the computer on which sql server runs. I mean sql server is installed
on myserver. So it should be same as saying c:\temp.dat.
So the query becomes
dump database MYDB to disk = '\\myserver\c$\temp.dat' with init
But in case of c:\temp.dat it succeeds and in case of \\myserver\c$\temp.dat
it fails ( it used to work, but has been failing recently).
Now i tried following.
1. I am able to access c drive on myserver by typing \\myserver\c$ in
windows explorer from another computer on LAN.
2. I am able to access c drive by typing \\myserver\c$ in the windows
explorer on myserver.
3. ping 127.0.0.1 return normal results on myserver.
So why does windows generates ERROR_NETNAME_DELETED when i run
dump database MYDB to disk = '\\myserver\c$\temp.dat' with init
in query analyzer?
|||If this is duplicate sorry, for some reason i don't see my posts on the forum
Ok I think I know what the problem is. Sorry for the 'c:\temp.dat'. The path
is actually
'\\myserver\c$\temp.dat'. The status = 64 means The specified network name
is no longer available ( ERROR_NETNAME_DELETED ). But the myserver is the
name of the computer on which sql server runs. I mean sql server is installed
on myserver. So it should be same as saying c:\temp.dat.
So the query becomes
dump database MYDB to disk = '\\myserver\c$\temp.dat' with init
But in case of c:\temp.dat it succeeds and in case of \\myserver\c$\temp.dat
it fails ( it used to work, but ahs been failing recently).
Now i tried following.
1. I am able to access c drive on myserver by typing \\myserver\c$ in
windows explorer from another computer on LAN.
2. I am able to access c drive by typing \\myserver\c$ in the windows
explorer on myserver.
3. ping 127.0.0.1 return normal results on myserver.
So why does windows generates ERROR_NETNAME_DELETED when i run
dump database MYDB to disk = '\\myserver\c$\temp.dat' with init
in query analyzer?
|||I think Andrew is correct that it is a permissions issue. It works fine
locally on my machine.
Try this from Query Analyzer:
exec master..xp_cmdshell 'dir \\myserver\c$\temp.dat'
You should see the output of the dir command in the results pane.
Ron
Ron Talmage
SQL Server MVP
"venAdder" <venAdder@.discussions.microsoft.com> wrote in message
news:4AFC6143-1BC2-483C-AB63-DB4AFD398EE6@.microsoft.com...
> If this is duplicate sorry, for some reason i don't see my posts on the
forum
> Ok I think I know what the problem is. Sorry for the 'c:\temp.dat'. The
path
> is actually
> '\\myserver\c$\temp.dat'. The status = 64 means The specified network name
> is no longer available ( ERROR_NETNAME_DELETED ). But the myserver is the
> name of the computer on which sql server runs. I mean sql server is
installed
> on myserver. So it should be same as saying c:\temp.dat.
> So the query becomes
> dump database MYDB to disk = '\\myserver\c$\temp.dat' with init
> But in case of c:\temp.dat it succeeds and in case of
\\myserver\c$\temp.dat
> it fails ( it used to work, but ahs been failing recently).
> Now i tried following.
> 1. I am able to access c drive on myserver by typing \\myserver\c$ in
> windows explorer from another computer on LAN.
> 2. I am able to access c drive by typing \\myserver\c$ in the windows
> explorer on myserver.
> 3. ping 127.0.0.1 return normal results on myserver.
>
> So why does windows generates ERROR_NETNAME_DELETED when i run
> dump database MYDB to disk = '\\myserver\c$\temp.dat' with init
> in query analyzer?
>
|||I still think it is permissions. Log on to the server with the account that
SQL Server is running under and see if you can access that share.
Andrew J. Kelly SQL MVP
"venAdder" <venAdder@.discussions.microsoft.com> wrote in message
news:B3D7FA16-1D79-48BF-8D64-90319A6A9B7C@.microsoft.com...
>I am sorry c:\temp.dat is wrong.
> it is \\myserver\c$\temp.dat
> Ok I think I know what the problem is. The path is actually
> '\\myserver\c$\temp.dat'. The status = 64 means The specified network name
> is no longer available ( ERROR_NETNAME_DELETED ). But the myserver is the
> name of the computer on which sql server runs. I mean sql server is
> installed
> on myserver. So it should be same as saying c:\temp.dat.
> So the query becomes
> dump database MYDB to disk = '\\myserver\c$\temp.dat' with init
> But in case of c:\temp.dat it succeeds and in case of
> \\myserver\c$\temp.dat
> it fails ( it used to work, but has been failing recently).
> Now i tried following.
> 1. I am able to access c drive on myserver by typing \\myserver\c$ in
> windows explorer from another computer on LAN.
> 2. I am able to access c drive by typing \\myserver\c$ in the windows
> explorer on myserver.
> 3. ping 127.0.0.1 return normal results on myserver.
>
> So why does windows generates ERROR_NETNAME_DELETED when i run
> dump database MYDB to disk = '\\myserver\c$\temp.dat' with init
> in query analyzer?
>
>
|||No it's not a permissions issue. The reason is when that query executes i can
see the file in explorer for a few seconds. Then it gets deleted when query
fails. Here is what happened:
The issue turned out to be network redirector cahing related.
The precise article corressponding to this is
http://support.microsoft.com/default...EN-US;q285997.
The reason I am sure this is it because the articles describes that using
c:\ should
be fine, which is actually the case. It works fine if no unc is used. and
the windows reports this failed to write to
\device\lanmanredirector\........... it's exactly the error described in
that article.
the solution to this is here
http://support.microsoft.com/default...b;en-us;163401
Now this article explains how to turn off network redirector disabling in
winnt not in win 2000. I opened win registry. The keys are diff.
does anyone know how to do the same thing in win2000professional?
and also it's still a mystry what could ahve caused this problem on that
particular computer. The file size might be one of the causes, but I don't
think so because I have tried on computers configured in exactly the same
way(hardware and software) with much larger files and it all works fine.
|||Make sure your WORKSTATION has the Server Service and the RPC Service
running.
Sincerely,
Anthony Thomas

"venAdder" <venAdder@.discussions.microsoft.com> wrote in message
news:057130BB-486B-4092-AED3-5B24680AD800@.microsoft.com...
No it's not a permissions issue. The reason is when that query executes i
can
see the file in explorer for a few seconds. Then it gets deleted when query
fails. Here is what happened:
The issue turned out to be network redirector cahing related.
The precise article corressponding to this is
http://support.microsoft.com/default...EN-US;q285997.
The reason I am sure this is it because the articles describes that using
c:\ should
be fine, which is actually the case. It works fine if no unc is used. and
the windows reports this failed to write to
\device\lanmanredirector\........... it's exactly the error described in
that article.
the solution to this is here
http://support.microsoft.com/default...b;en-us;163401
Now this article explains how to turn off network redirector disabling in
winnt not in win 2000. I opened win registry. The keys are diff.
does anyone know how to do the same thing in win2000professional?
and also it's still a mystry what could ahve caused this problem on that
particular computer. The file size might be one of the causes, but I don't
think so because I have tried on computers configured in exactly the same
way(hardware and software) with much larger files and it all works fine.

No comments:

Post a Comment