Showing posts with label thru. Show all posts
Showing posts with label thru. Show all posts

Thursday, March 29, 2012

Backup fails using SMO with big databases

Hello
I'm seeing the backup using SMO fails with big databases (>15GB). I
have a 2GB database and I can see the command go thru. in Profiler but
after it's about 50-70% done, I get an exception saying backup failed.
There is no details on the SQLServer log.

Here's the code snippet:

bk.Initialize = m_backupInit;
bk.PercentCompleteNotification = 10;
bk.PercentComplete += new
PercentCompleteEventHandler(bk_PercentComplete);
bk.SqlBackup(m_Server);

Here's the command as captured by SQL-Profiler:
BACKUP DATABASE [Test_MODEL] TO DISK = N'D:\Temp
\Test_Model_Backup.dat' WITH NOFORMAT, INIT, NOSKIP, REWIND,
NOUNLOAD, STATS = 10

Has anyone else seen this. The wierd thing is it works using old SQL-
DMO.

thanks
SunitOn Feb 8, 11:42 pm, "sjoshi" <sjo...@.ingr.comwrote:

Quote:

Originally Posted by

Hello
I'm seeing the backup using SMO fails with big databases (>15GB). I
have a 2GB database and I can see the command go thru. in Profiler but
after it's about 50-70% done, I get an exception saying backup failed.
There is no details on the SQLServer log.
>
Here's the code snippet:
>
bk.Initialize = m_backupInit;
bk.PercentCompleteNotification = 10;
bk.PercentComplete += new
PercentCompleteEventHandler(bk_PercentComplete);
bk.SqlBackup(m_Server);
>
Here's the command as captured by SQL-Profiler:
BACKUP DATABASE [Test_MODEL] TO DISK = N'D:\Temp
\Test_Model_Backup.dat' WITH NOFORMAT, INIT, NOSKIP, REWIND,
NOUNLOAD, STATS = 10
>
Has anyone else seen this. The wierd thing is it works using old SQL-
DMO.
>
thanks
Sunit


I would check the event log as well, there may more information there.
I have too encountered situations which are similair, however, never
where there was absolutely no information in any of the typical log
locations. 15 gig is not paticulary large, I am sure there must be
more to it. What is the result when you execute via OSQL prompt?
Cheers,
Gsql

Backup fails for big databases

Hello

I'm seeing that the backup using SMO fails with big databases (>15GB).
I have a 20GB database and I can see the command go thru. in Profiler
but after it's about 50-70% done, I get an exception saying backup
failed. There is no details on the SQLServer log.

Here's the code snippet:

bk.Initialize = m_backupInit;
bk.PercentCompleteNotification = 10;
bk.PercentComplete += new
PercentCompleteEventHandler(bk_PercentComplete);
bk.SqlBackup(m_Server);

Here's the command as captured by SQL-Profiler:
BACKUP DATABASE [Test_MODEL] TO DISK = N'D:\Temp
\Test_Model_Backup.dat' WITH NOFORMAT, INIT, NOSKIP, REWIND,
NOUNLOAD, STATS = 10

Has anyone else seen this. The wierd thing is it works using old SQL-
DMO.

thanks
Sunit

Hi,

the standard timeout for the command is as far as I can remember 600 seconds, you can extend this by setting the following command:

Server svr = new Server(".");
svr.ConnectionContext.StatementTimeout = 6000;

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||That seems to have fixed it. Thanks a lot.

Sunit

Tuesday, March 27, 2012

Backup failed - Error 3013

Hi, everyday an automated backup is done of my content database and when i
checked today to ensure the job went thru, I realized it failed.
I get the error msg:
"A nonrecoverable I/O error occured on file
"\\tcl-fileserver3\backups\moss\daily"
The specified network name is no longer available. Error: 3013"
I created a new file and did a backup to that file
"\\tcl-fileserver3\backups\moss\testing" and the backup went thru fine. I
then renamed the original file and did a backup and that went thru......
Is it possible that a file name can be corrupted? The original backup path
was "\\tcl-fileserver3\backups\moss\daily" I renamed that file to:
"\\tcl-fileserver3\backups\moss\daily_testing" and the backup went thru
fine......
What could be the issue here?
When you say the remote server, you are referring to the server where i am
backing up the information to?
Also, I didn't change the time in the schedule, I just changed the name of
the file and it worked......
What could cause this?
"Des FitzGerald" wrote:

> Hi Shelly,
> I think this points to a problem with either the network connection at the
> scheduled time of the backup or to over processing on the remote network
> server you are sending the backup to at the time of the schedule.
> Could it be that this remote server is under heavy load during the backup?
> If so perhaps changing the time of the schedule if possible may help.
> Kind Regards,
> Des
>
> On 08/01/2008 16:09, in article
> ED8CA9B6-4896-4E15-BC4A-1DA86CDDCD03@.microsoft.com, "Shelley"
> <Shelley@.discussions.microsoft.com> wrote:
>
>
>
|||Hi, thanks so much for your help.
I renamed the file, but left the schedule the same and the backup went thru.
Still not sure what the exact problem was since this was the first time this
ever happened; have been doing the automated backups for about a month now.
Thanks again,
Shelley
"Des FitzGerald" wrote:

> The remote server is where you are backing up your database to - in this
> case \\tcl-fileserver
> I am thinking that this server was under load when your normal scheduled
> nightly execution took place and this may have caused the problem or perhaps
> there was an intermittent network problem at the time.
> Both these scenarios are possibilities as to why you have seen this issue,
> the file name may have become corrupt because of the I/O problems on the
> server, I would look at the time of the schedule and see if other heavy
> processing is occurring on your remote backup location and change the time
> if possible of the schedule so it executes when the server is under less
> strain.
> Alternatively if this happened only once out of 100 runs of the schedule it
> may just be bad luck and the schedule can remain. It would also be possible
> to write a check before starting the backup to make sure the file exists and
> can be reached and that all looks OK.
> Cheers,
> Des
> On 08/01/2008 16:31, in article
> 62B77DBE-316A-4C5F-AAAB-AD1B9E1AB994@.microsoft.com, "Shelley"
> <Shelley@.discussions.microsoft.com> wrote:
>
>

Backup failed - Error 3013

Hi, everyday an automated backup is done of my content database and when i
checked today to ensure the job went thru, I realized it failed.
I get the error msg:
"A nonrecoverable I/O error occured on file
"\\tcl-fileserver3\backups\moss\daily"
The specified network name is no longer available. Error: 3013"
I created a new file and did a backup to that file
"\\tcl-fileserver3\backups\moss\testing" and the backup went thru fine. I
then renamed the original file and did a backup and that went thru......
Is it possible that a file name can be corrupted? The original backup path
was "\\tcl-fileserver3\backups\moss\daily" I renamed that file to:
"\\tcl-fileserver3\backups\moss\daily_testing" and the backup went thru
fine......
What could be the issue here?Hi Shelly,
I think this points to a problem with either the network connection at the
scheduled time of the backup or to over processing on the remote network
server you are sending the backup to at the time of the schedule.
Could it be that this remote server is under heavy load during the backup?
If so perhaps changing the time of the schedule if possible may help.
Kind Regards,
Des
On 08/01/2008 16:09, in article
ED8CA9B6-4896-4E15-BC4A-1DA86CDDCD03@.microsoft.com, "Shelley"
<Shelley@.discussions.microsoft.com> wrote:
> Hi, everyday an automated backup is done of my content database and when i
> checked today to ensure the job went thru, I realized it failed.
> I get the error msg:
> "A nonrecoverable I/O error occured on file
> "\\tcl-fileserver3\backups\moss\daily"
> The specified network name is no longer available. Error: 3013"
> I created a new file and did a backup to that file
> "\\tcl-fileserver3\backups\moss\testing" and the backup went thru fine. I
> then renamed the original file and did a backup and that went thru......
> Is it possible that a file name can be corrupted? The original backup path
> was "\\tcl-fileserver3\backups\moss\daily" I renamed that file to:
> "\\tcl-fileserver3\backups\moss\daily_testing" and the backup went thru
> fine......
> What could be the issue here?|||When you say the remote server, you are referring to the server where i am
backing up the information to?
Also, I didn't change the time in the schedule, I just changed the name of
the file and it worked......
What could cause this?
"Des FitzGerald" wrote:
> Hi Shelly,
> I think this points to a problem with either the network connection at the
> scheduled time of the backup or to over processing on the remote network
> server you are sending the backup to at the time of the schedule.
> Could it be that this remote server is under heavy load during the backup?
> If so perhaps changing the time of the schedule if possible may help.
> Kind Regards,
> Des
>
> On 08/01/2008 16:09, in article
> ED8CA9B6-4896-4E15-BC4A-1DA86CDDCD03@.microsoft.com, "Shelley"
> <Shelley@.discussions.microsoft.com> wrote:
> > Hi, everyday an automated backup is done of my content database and when i
> > checked today to ensure the job went thru, I realized it failed.
> > I get the error msg:
> > "A nonrecoverable I/O error occured on file
> > "\\tcl-fileserver3\backups\moss\daily"
> > The specified network name is no longer available. Error: 3013"
> > I created a new file and did a backup to that file
> > "\\tcl-fileserver3\backups\moss\testing" and the backup went thru fine. I
> > then renamed the original file and did a backup and that went thru......
> > Is it possible that a file name can be corrupted? The original backup path
> > was "\\tcl-fileserver3\backups\moss\daily" I renamed that file to:
> > "\\tcl-fileserver3\backups\moss\daily_testing" and the backup went thru
> > fine......
> > What could be the issue here?
>
>
>|||The remote server is where you are backing up your database to - in this
case \\tcl-fileserver
I am thinking that this server was under load when your normal scheduled
nightly execution took place and this may have caused the problem or perhaps
there was an intermittent network problem at the time.
Both these scenarios are possibilities as to why you have seen this issue,
the file name may have become corrupt because of the I/O problems on the
server, I would look at the time of the schedule and see if other heavy
processing is occurring on your remote backup location and change the time
if possible of the schedule so it executes when the server is under less
strain.
Alternatively if this happened only once out of 100 runs of the schedule it
may just be bad luck and the schedule can remain. It would also be possible
to write a check before starting the backup to make sure the file exists and
can be reached and that all looks OK.
Cheers,
Des
On 08/01/2008 16:31, in article
62B77DBE-316A-4C5F-AAAB-AD1B9E1AB994@.microsoft.com, "Shelley"
<Shelley@.discussions.microsoft.com> wrote:
> When you say the remote server, you are referring to the server where i am
> backing up the information to?
> Also, I didn't change the time in the schedule, I just changed the name of
> the file and it worked......
> What could cause this?
> "Des FitzGerald" wrote:
>> Hi Shelly,
>> I think this points to a problem with either the network connection at the
>> scheduled time of the backup or to over processing on the remote network
>> server you are sending the backup to at the time of the schedule.
>> Could it be that this remote server is under heavy load during the backup?
>> If so perhaps changing the time of the schedule if possible may help.
>> Kind Regards,
>> Des
>>
>> On 08/01/2008 16:09, in article
>> ED8CA9B6-4896-4E15-BC4A-1DA86CDDCD03@.microsoft.com, "Shelley"
>> <Shelley@.discussions.microsoft.com> wrote:
>> Hi, everyday an automated backup is done of my content database and when i
>> checked today to ensure the job went thru, I realized it failed.
>> I get the error msg:
>> "A nonrecoverable I/O error occured on file
>> "\\tcl-fileserver3\backups\moss\daily"
>> The specified network name is no longer available. Error: 3013"
>> I created a new file and did a backup to that file
>> "\\tcl-fileserver3\backups\moss\testing" and the backup went thru fine. I
>> then renamed the original file and did a backup and that went thru......
>> Is it possible that a file name can be corrupted? The original backup path
>> was "\\tcl-fileserver3\backups\moss\daily" I renamed that file to:
>> "\\tcl-fileserver3\backups\moss\daily_testing" and the backup went thru
>> fine......
>> What could be the issue here?
>>
>>|||Hi, thanks so much for your help.
I renamed the file, but left the schedule the same and the backup went thru.
Still not sure what the exact problem was since this was the first time this
ever happened; have been doing the automated backups for about a month now.
Thanks again,
Shelley
"Des FitzGerald" wrote:
> The remote server is where you are backing up your database to - in this
> case \\tcl-fileserver
> I am thinking that this server was under load when your normal scheduled
> nightly execution took place and this may have caused the problem or perhaps
> there was an intermittent network problem at the time.
> Both these scenarios are possibilities as to why you have seen this issue,
> the file name may have become corrupt because of the I/O problems on the
> server, I would look at the time of the schedule and see if other heavy
> processing is occurring on your remote backup location and change the time
> if possible of the schedule so it executes when the server is under less
> strain.
> Alternatively if this happened only once out of 100 runs of the schedule it
> may just be bad luck and the schedule can remain. It would also be possible
> to write a check before starting the backup to make sure the file exists and
> can be reached and that all looks OK.
> Cheers,
> Des
> On 08/01/2008 16:31, in article
> 62B77DBE-316A-4C5F-AAAB-AD1B9E1AB994@.microsoft.com, "Shelley"
> <Shelley@.discussions.microsoft.com> wrote:
> > When you say the remote server, you are referring to the server where i am
> > backing up the information to?
> > Also, I didn't change the time in the schedule, I just changed the name of
> > the file and it worked......
> > What could cause this?
> >
> > "Des FitzGerald" wrote:
> >
> >> Hi Shelly,
> >>
> >> I think this points to a problem with either the network connection at the
> >> scheduled time of the backup or to over processing on the remote network
> >> server you are sending the backup to at the time of the schedule.
> >>
> >> Could it be that this remote server is under heavy load during the backup?
> >>
> >> If so perhaps changing the time of the schedule if possible may help.
> >>
> >> Kind Regards,
> >> Des
> >>
> >>
> >>
> >> On 08/01/2008 16:09, in article
> >> ED8CA9B6-4896-4E15-BC4A-1DA86CDDCD03@.microsoft.com, "Shelley"
> >> <Shelley@.discussions.microsoft.com> wrote:
> >>
> >> Hi, everyday an automated backup is done of my content database and when i
> >> checked today to ensure the job went thru, I realized it failed.
> >> I get the error msg:
> >> "A nonrecoverable I/O error occured on file
> >> "\\tcl-fileserver3\backups\moss\daily"
> >> The specified network name is no longer available. Error: 3013"
> >> I created a new file and did a backup to that file
> >> "\\tcl-fileserver3\backups\moss\testing" and the backup went thru fine. I
> >> then renamed the original file and did a backup and that went thru......
> >> Is it possible that a file name can be corrupted? The original backup path
> >> was "\\tcl-fileserver3\backups\moss\daily" I renamed that file to:
> >> "\\tcl-fileserver3\backups\moss\daily_testing" and the backup went thru
> >> fine......
> >> What could be the issue here?
> >>
> >>
> >>
> >>
> >>
>
>sql