Showing posts with label bak. Show all posts
Showing posts with label bak. Show all posts

Tuesday, March 27, 2012

Backup SQL Database in asp.net

Hi ,

Anyone knows ,How to backup sql Database in asp.net .and I need to get a .bak file through asp.net.

Pls help me.

Tamil

Assuming that the client has the required permissions to perform a backup (database permissions and permissions on the directory where you're saving the file), then you can run the [BACKUP DATABASE] command via the SQLCommand object.

Set the command type to Text, provide the appropriate SQL, and executeNonQuery. There's an MSDN example here (search the page for BACKUP) :http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.sqldatasource.deletecommand.aspx

But note that if you have a large-ish database, you may want to up the timeout property to ensure the backup completes.

|||

Hi I got the backup database locally.But now i need to get backup for remote server.

Here is my code.

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.IO;

using System.Collections.Generic;

using System.Text;

using System.Text.RegularExpressions;

using Microsoft.SqlServer.Management.Smo;

using Microsoft.SqlServer.Management.Common;

using s= SQLDMO;

publicpartialclassDefault3 : System.Web.UI.Page

{

protectedvoid Page_Load(object sender,EventArgs e)

{

Panel1.Visible =false;

Label3.Visible =false;

if (!IsPostBack)

{

SQLDMO.SQLServer oSQLServer =new SQLDMO.SQLServer();

SQLDMO.Restore oRestore =new SQLDMO.Restore();

SQLDMO.Database oDatabase =new SQLDMO.Database();

oSQLServer.Connect("COMP11\\SQLEXPRESS","sa","123");

foreach (SQLDMO.Database dbin oSQLServer.Databases)

{

drpdb.Items.Add(db.Name);

}

}

}

protectedvoid Butback_Click(object sender,EventArgs e)

{

Microsoft.SqlServer.Management.Common.ServerConnection serverConnection =new Microsoft.SqlServer.Management.Common.ServerConnection("COMP11\\SQLEXPRESS");

Server s;

s =newServer(serverConnection);Database db;

db = s.Databases[drpdb.SelectedItem.Text];

int rec;

rec =Convert.ToInt32(db.DatabaseOptions.RecoveryModel);

Backup sbackup =newBackup();

sbackup.Action =BackupActionType.Database;

sbackup.BackupSetDescription ="Full Backup";

sbackup.BackupSetName ="Database Backup";

sbackup.Database = drpdb.SelectedItem.Text;

BackupDeviceItem dbi;

string path = drpdb.SelectedItem.Text +".bak";

string checkpath ="D:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\Backup\\" + path;if (File.Exists(checkpath)==true)

{

Panel1.Visible =true;

Label2.Text ="";Label3.Visible =false;

}

else

{

Label3.Visible =true;

Panel1.Visible =false;dbi =newBackupDeviceItem(path,DeviceType.File);

sbackup.Devices.Add(dbi);

sbackup.Incremental =false;

sbackup.LogTruncation =BackupTruncateLogType.Truncate;

sbackup.SqlBackup(s);

Label3.Text ="Full Backup complete.";

sbackup.Devices.Remove(dbi);

}

}

protectedvoid Button1_Click(object sender,EventArgs e)

{

Microsoft.SqlServer.Management.Common.ServerConnection serverConnection =new Microsoft.SqlServer.Management.Common.ServerConnection("COMP11\\SQLEXPRESS");

Server s;

s =newServer(serverConnection);Database db;

db = s.Databases[drpdb.SelectedItem.Text];

int rec;

rec =Convert.ToInt32(db.DatabaseOptions.RecoveryModel);

Backup sbackup =newBackup();

sbackup.Action =BackupActionType.Database;

sbackup.BackupSetDescription ="Full Backup";

sbackup.BackupSetName ="Database Backup";

sbackup.Database = drpdb.SelectedItem.Text;

BackupDeviceItem dbi;

string path = drpdb.SelectedItem.Text +".bak";

string checkpath ="D:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\Backup\\" + path;

File.Delete(checkpath);

dbi =newBackupDeviceItem(path,DeviceType.File);

sbackup.Devices.Add(dbi);

sbackup.Incremental =false;sbackup.LogTruncation =BackupTruncateLogType.Truncate;

sbackup.SqlBackup(s);

Label3.Visible =true;

Label3.Text = drpdb.SelectedItem.Text +"Backup complete.";

sbackup.Devices.Remove(dbi);

}

protectedvoid Button2_Click(object sender,EventArgs e)

{

Panel1.Visible =true;Label2.Text ="Selected " + drpdb.SelectedItem.Text +" Database fully not Completed!";

}

}

Please help me!

Tamil

|||

Hi

Anyoneknows

I need to get Backup a database from Remote Server.

Tamil

|||

Hi,

check this

http://www.codeplex.com/SqlWebAdmin

|||

hi Mehedi Hasan

I opened that URL.but i didnt understand ,Is it match my requirement?I need to get a backup for SQL Database from remote Server.I already done for local backup.But i need to get a backup for SQL Databases from REmote Server.

Please help me with example.

Tamil

|||

hi friends,,

I got it how to backup database in remote Server.We need to give login secure false then it connects the other server.

Tamil

Sunday, March 25, 2012

Backup Size - Larger than db size

I have a database which I am backing up nightly ( after a log truncate, dbcc
checkdb ) and the .bak size is a lot larger than the actual database.
I am looking at the table space, and I think it might be the reserved space
also being backed up, I thought that only actual data was backed up.
Any pointers would be appreciated. Any more info require pls let me know.Are you perhaps by mistake doing append to the backup device? You can see wh
at backups are on a
backup device using RESTORE HEADERONLY.
Backup will copy all extents which are in use, so even if only one page are
used on an extent, the
whole extent will be included in the backup.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ben Rum" <bundyrum75@.yahoo.com> wrote in message news:eSbUf.14129$814.11725@.newsfe5-win.ntl
i.net...
>I have a database which I am backing up nightly ( after a log truncate, dbc
c checkdb ) and the .bak
>size is a lot larger than the actual database.
> I am looking at the table space, and I think it might be the reserved spac
e also being backed up,
> I thought that only actual data was backed up.
> Any pointers would be appreciated. Any more info require pls let me know.
>
>

Backup Size - Larger than db size

I have a database which I am backing up nightly ( after a log truncate, dbcc
checkdb ) and the .bak size is a lot larger than the actual database.
I am looking at the table space, and I think it might be the reserved space
also being backed up, I thought that only actual data was backed up.
Any pointers would be appreciated. Any more info require pls let me know.Are you perhaps by mistake doing append to the backup device? You can see what backups are on a
backup device using RESTORE HEADERONLY.
Backup will copy all extents which are in use, so even if only one page are used on an extent, the
whole extent will be included in the backup.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ben Rum" <bundyrum75@.yahoo.com> wrote in message news:eSbUf.14129$814.11725@.newsfe5-win.ntli.net...
>I have a database which I am backing up nightly ( after a log truncate, dbcc checkdb ) and the .bak
>size is a lot larger than the actual database.
> I am looking at the table space, and I think it might be the reserved space also being backed up,
> I thought that only actual data was backed up.
> Any pointers would be appreciated. Any more info require pls let me know.
>
>

Backup Size - Larger than db size

I have a database which I am backing up nightly ( after a log truncate, dbcc
checkdb ) and the .bak size is a lot larger than the actual database.
I am looking at the table space, and I think it might be the reserved space
also being backed up, I thought that only actual data was backed up.
Any pointers would be appreciated. Any more info require pls let me know.
Are you perhaps by mistake doing append to the backup device? You can see what backups are on a
backup device using RESTORE HEADERONLY.
Backup will copy all extents which are in use, so even if only one page are used on an extent, the
whole extent will be included in the backup.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ben Rum" <bundyrum75@.yahoo.com> wrote in message news:eSbUf.14129$814.11725@.newsfe5-win.ntli.net...
>I have a database which I am backing up nightly ( after a log truncate, dbcc checkdb ) and the .bak
>size is a lot larger than the actual database.
> I am looking at the table space, and I think it might be the reserved space also being backed up,
> I thought that only actual data was backed up.
> Any pointers would be appreciated. Any more info require pls let me know.
>
>
sql

Tuesday, March 20, 2012

Backup Restore Fails

Hi,

I ran a backup procedure and BAK file created.
I moved the file to another server, tried to restore and failed with following error:
"Cannot open backup device 'C:\*****.bak'. Operating system error 5(Access is denied.)"

I checked the file on the original server and the file is accessible: I can see its content with RESTORE FILELISTONLY command.

Any clues?

Thanks,
Mark

Hello Mark

Are you using the Restore dialog to do this operation or are you using T-SQL?

Either case, ensure that the account under which SQL server service is running has access to the 'C' drive.

[Venkat]
This posting is provided "AS IS" with no warranties, and confers no rights.

Backup restore fail

Hi,
I am trying to restore database (25 GB) and getting
following error
The backup data in 'F:\BACKUP\ABC.BAK' is incorrectly
formatted. Backups cannot be appended, but existing backup
sets may still be usable.
Has any one solution for this ?
Thanks,
ManojHi Manoj,
This error normally occurs when the filemark in the backup device could not
be read.
The various reasons for this error can be,
1. A media failure on the device where the backup is located.
2. A write failure during the creation of the backup. Eg: Network failre
during a network backup
Solution:
This error normally comes if any one of the file in backup set is
problematic. It might be possible to retrieve other backup sets
from the device by specifying the file number
You can use the RESTORE HEADERONLY command to idenfify the backup file list
and use RESTORE DATABASE to restore the specific file.
Sample code
RESTORE HEADERONLY FROM DISK='c:\backup\dbname.bak'
RESTORE DATABASE mydatabase FROM DISK='C:\backup\dbname.bak' WITH FILE =
FileNumber
Have a look into this article,
http://support.microsoft.com/defaul...b;en-us;Q290787
Thanks
Hari
MCDBA
"Manoj" <manoj_raheja@.hotmail.com> wrote in message
news:4d8e01c3ff6e$f2f3df60$a101280a@.phx.gbl...
> Hi,
> I am trying to restore database (25 GB) and getting
> following error
> The backup data in 'F:\BACKUP\ABC.BAK' is incorrectly
> formatted. Backups cannot be appended, but existing backup
> sets may still be usable.
> Has any one solution for this ?
> Thanks,
> Manojsql

Backup restore fail

Hi,
I am trying to restore database (25 GB) and getting
following error
The backup data in 'F:\BACKUP\ABC.BAK' is incorrectly
formatted. Backups cannot be appended, but existing backup
sets may still be usable.
Has any one solution for this ?
Thanks,
ManojHi Manoj,
This error normally occurs when the filemark in the backup device could not
be read.
The various reasons for this error can be,
1. A media failure on the device where the backup is located.
2. A write failure during the creation of the backup. Eg: Network failre
during a network backup
Solution:
This error normally comes if any one of the file in backup set is
problematic. It might be possible to retrieve other backup sets
from the device by specifying the file number
You can use the RESTORE HEADERONLY command to idenfify the backup file list
and use RESTORE DATABASE to restore the specific file.
Sample code
RESTORE HEADERONLY FROM DISK='c:\backup\dbname.bak'
RESTORE DATABASE mydatabase FROM DISK='C:\backup\dbname.bak' WITH FILE =FileNumber
Have a look into this article,
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q290787
Thanks
Hari
MCDBA
"Manoj" <manoj_raheja@.hotmail.com> wrote in message
news:4d8e01c3ff6e$f2f3df60$a101280a@.phx.gbl...
> Hi,
> I am trying to restore database (25 GB) and getting
> following error
> The backup data in 'F:\BACKUP\ABC.BAK' is incorrectly
> formatted. Backups cannot be appended, but existing backup
> sets may still be usable.
> Has any one solution for this ?
> Thanks,
> Manoj

backup question

Using SS2000 SP4. Is there any way to back up to a .bak file just selected
tables from a database?
Thanks,
--
Dan D.No. If you have multiple filegroups and you segregate the tables you want
into a specific file group you can backup just that filegroup.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:954CD167-72FA-49EB-BCC8-6EAFFEF1EA0F@.microsoft.com...
> Using SS2000 SP4. Is there any way to back up to a .bak file just selected
> tables from a database?
> Thanks,
> --
> Dan D.|||I don't have multiple filegroups. Thanks.
--
Dan D.
"Andrew J. Kelly" wrote:
> No. If you have multiple filegroups and you segregate the tables you want
> into a specific file group you can backup just that filegroup.
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:954CD167-72FA-49EB-BCC8-6EAFFEF1EA0F@.microsoft.com...
> > Using SS2000 SP4. Is there any way to back up to a .bak file just selected
> > tables from a database?
> >
> > Thanks,
> > --
> > Dan D.
>|||Sorry - there is not.
One strategy that you might wish to employ is to put these selected tables
in their own filegroup. You can then do a filegroup backup of just that one
group. Another option - you could still separate out your tables into their
own filegroup and stop SQL Server, copy the files associated with that
filegroup, and restart. This is not the best way to help availability. ;-)
Another option would be to replicate those tables to another DB and backup
that DB.
It depends on which approach will work best for you.
Rick Heiges
SQL Server MVP
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:954CD167-72FA-49EB-BCC8-6EAFFEF1EA0F@.microsoft.com...
> Using SS2000 SP4. Is there any way to back up to a .bak file just selected
> tables from a database?
> Thanks,
> --
> Dan D.|||Thanks for the suggestions Rick.
--
Dan D.
"Rick Heiges" wrote:
> Sorry - there is not.
> One strategy that you might wish to employ is to put these selected tables
> in their own filegroup. You can then do a filegroup backup of just that one
> group. Another option - you could still separate out your tables into their
> own filegroup and stop SQL Server, copy the files associated with that
> filegroup, and restart. This is not the best way to help availability. ;-)
> Another option would be to replicate those tables to another DB and backup
> that DB.
> It depends on which approach will work best for you.
> Rick Heiges
> SQL Server MVP
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:954CD167-72FA-49EB-BCC8-6EAFFEF1EA0F@.microsoft.com...
> > Using SS2000 SP4. Is there any way to back up to a .bak file just selected
> > tables from a database?
> >
> > Thanks,
> > --
> > Dan D.
>
>

Sunday, March 11, 2012

Backup problems

Hi,
I'm getting "BackupMedium::ReportIoError: write failure on
backup device 'd:\select
legal\MSSQL$LEGAL\BACKUP\legal_db_200404292100.BAK '.
Operating system error 112(error not found)" messages in
the SQL 2000 Server logs when we try to backup our
databases. This is followed by "Internal I/O request
0x53BE4B78: Op: Write, pBuffer: 0x0D6A0000, Size: 983040,
Position: 21632512, UMS: Internal: 0x103, InternalHigh:
0x0, Offset: 0x14A1600, OffsetHigh: 0x0, m_buf:
0x0D6A0000, m_len: 983040, m_actualBytes: 0, m_errcode:
112, BackupFile: d:\select
legal\MSSQL$LEGAL\BACKUP\legal_db_200404292100.BAK " and
then "BACKUP failed to complete the command BACKUP
DATABASE [legal] TO DISK = N'd:\select
legal\MSSQL$LEGAL\BACKUP\legal_db_200404292100.BAK ' WITH
INIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT"
messages. The database is around 300Mb and we have 40Gb of
free space on the drive.
The server is Dell PE2600 with a Perc Raid controller
handling 3 drives in Raid 5 config. These are split into
two drives; C: for OS and D: for applications and data.
The smaller system databases back up OK as do the
transaction logs. I've found a reference to writeback
cache but don't know if this is the root cause of the
problem. The OS is Windows 2003 Small Business Server with
SQL Server SP3a.
TIA
Trevor
>
> Hi,
> I'm getting "BackupMedium::ReportIoError: write failure on
> backup device 'd:\select
> legal\MSSQL$LEGAL\BACKUP\legal_db_200404292100.BAK '.
> Operating system error 112(error not found)" messages in
> the SQL 2000 Server logs when we try to backup our
> databases. This is followed by "Internal I/O request
> 0x53BE4B78: Op: Write, pBuffer: 0x0D6A0000, Size: 983040,
> Position: 21632512, UMS: Internal: 0x103, InternalHigh:
> 0x0, Offset: 0x14A1600, OffsetHigh: 0x0, m_buf:
> 0x0D6A0000, m_len: 983040, m_actualBytes: 0, m_errcode:
> 112, BackupFile: d:\select
> legal\MSSQL$LEGAL\BACKUP\legal_db_200404292100.BAK " and
> then "BACKUP failed to complete the command BACKUP
> DATABASE [legal] TO DISK = N'd:\select
> legal\MSSQL$LEGAL\BACKUP\legal_db_200404292100.BAK ' WITH
> INIT , NOUNLOAD , NOSKIP , STATS = 10, NOFORMAT"
> messages. The database is around 300Mb and we have 40Gb of
> free space on the drive.
> The server is Dell PE2600 with a Perc Raid controller
> handling 3 drives in Raid 5 config. These are split into
> two drives; C: for OS and D: for applications and data.
> The smaller system databases back up OK as do the
> transaction logs. I've found a reference to writeback
> cache but don't know if this is the root cause of the
> problem. The OS is Windows 2003 Small Business Server with
> SQL Server SP3a.
> TIA
> Trevor
>
Hi Trevor,
Are you using a compressed volume? It is possible that you are out of
diskspace.
Compressed volumes are not supported. Also checkout the following article:
INF: SQL Server and Striped Backups
http://support.microsoft.com/?id=325334
Hope this helps,
Eric Crdenas
SQL Server senior support professional
|||Eric Cardenas wrote:

> --
> Hi Trevor,
> Are you using a compressed volume? It is possible that you are out of
> diskspace.
> Compressed volumes are not supported. Also checkout the following
> article:
> INF: SQL Server and Striped Backups
> http://support.microsoft.com/?id=325334
> Hope this helps,
> --
> Eric Cardenas
> SQL Server senior support professional
Eric,
We should have plenty of disk space. The drives aren't compressed as
far as I am aware.
The databases reside on the same drive that we are backing up to.
We are backing up the databases to a folder on the drive using the SQL
Server backup, and then to tape; the actual database files we exclude
from the tape backup.
The server reports around 40Gb of free space on a 60Gb drive, and the
databases that it fails to back up are our main data database which is
around 200Mb to 250Mb in size, and one of the SQL Server system
databases which looks to be only around 25Mb! The other smaller system
databases back up OK.
The drive is on a Raid 5 array which comprises three 60Gb drives.
We can copy and otherwise create large files on the drive without any
problems; we can copy the database files manually with out any problems
(when we shutdown the SQL Server)
It just seems to be the SQL Server backup of the databases that are
reporting an error.
I've seen some references to writeback cache causing a problem like
this, but nothing that I can say "this is how we fix the problem"
I can't believe that the problem is with the raid striping as I would
then expect loads of people to be reporting this.
Trevor

Friday, February 24, 2012

Backup MSDE database

How add backup job schedule MSDE database with sqldmo(vb.net). Freq_type =
daily and file name (.bak and .log) is different for all days.
hi Viktor,
Viktor Zadro wrote:
> How add backup job schedule MSDE database with sqldmo(vb.net).
> Freq_type = daily and file name (.bak and .log) is different for all
> days.
hi Viktor,
as you are doing a scheduled backup job, you should resort on
Transact-SQL...
create your job and job schedules as needed and, regarding the step, add a
T-SQL step with a command that will auto-modify the backup file name at each
execution like
SET NOCOUNT ON
DECLARE @.fName VARCHAR(256)
SELECT @.fName = CONVERT(VARCHAR(19), getdate() , 120)
SELECT @.fName = REPLACE( @.fName , ' ' , '_')
SELECT @.fName = REPLACE( @.fName , '-' , '_')
SELECT @.fName = REPLACE( @.fName , ':' , '_')
SELECT @.fName = 'C:\' + @.fName + '.bak'
SELECT @.fName
BACKUP DATABASE [a] TO DISK = @.fName WITH INIT ,
NOUNLOAD ,
NAME = N'a BackUp',
NOSKIP ,
STATS = 10,
NOFORMAT
that will backup to
C:\2005_01_13_12_50_25.bak
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Monday, February 13, 2012

Backup job failed-SVP2

I have a job that has run fine for quite a while now. It backs up db and
trans logs file and then deletes bak and log files older than 2 days. I
noticed that since 4/23/07, it hadn't deleted the bak files nor the trans
log files either. I also remembered putting SVP2 on it about that time.
I'm running SS2005 on Server 2003. The job has 4 'nodes' Back Up Databse
(full)/ Back Up Databse Trans log/databse cleanup/trans log cleanup. I
noticed that the backup jobs connection says, "Target Server Connection" but
the "maintenance" jobs (the ones that delete the old bak and trans log files
that is bombing) was run as "SACONNECT". Does anyone know why that would
have changed with SVP2? Honestly, I'm not sure what it was prior to SVP2
going in.
What IS the difference between "Target server connection", "SACONNECT", and
"Local server connection"? I just want the one that has the ability to
delete older files in the backup folders.
You didn't mention if there are any errors or what's in the
history for the maintenance plan but this could be related
to some known issues with SP2. The issues are related to the
clean up tasks.
You should still check for logs for errors when the
maintenance plan runs. And then you should try to figure out
what version of SP2 you are running on the server as well as
your client side and see if you are affected by the issues
with SP2. See the following article:
Microsoft SQL Server 2005 Service Pack 2 issue: Cleanup
tasks run at different intervals than intended
http://support.microsoft.com/kb/933508
-Sue
On Mon, 7 May 2007 10:06:40 -0400, "Peter Lux"
<pete.lux@.theheritagegrp.com> wrote:

>I have a job that has run fine for quite a while now. It backs up db and
>trans logs file and then deletes bak and log files older than 2 days. I
>noticed that since 4/23/07, it hadn't deleted the bak files nor the trans
>log files either. I also remembered putting SVP2 on it about that time.
>I'm running SS2005 on Server 2003. The job has 4 'nodes' Back Up Databse
>(full)/ Back Up Databse Trans log/databse cleanup/trans log cleanup. I
>noticed that the backup jobs connection says, "Target Server Connection" but
>the "maintenance" jobs (the ones that delete the old bak and trans log files
>that is bombing) was run as "SACONNECT". Does anyone know why that would
>have changed with SVP2? Honestly, I'm not sure what it was prior to SVP2
>going in.
>What IS the difference between "Target server connection", "SACONNECT", and
>"Local server connection"? I just want the one that has the ability to
>delete older files in the backup folders.
>
|||Hi Peter,
Could you please mail me (changliw_at_microsoft_dot_com) the SQL error logs
for further research?
By default, the error logs were in the folder: %ProgramFiles%\Microsoft SQL
Server\MSSQL\LOG.
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||"Charles Wang[MSFT]" <changliw@.online.microsoft.com> wrote in message
news:vvlQF1RkHHA.1144@.TK2MSFTNGHUB02.phx.gbl...
> Hi Peter,
> Could you please mail me (changliw_at_microsoft_dot_com) the SQL error
> logs
> for further research?
Charles.. I sent it.
|||Hi Pete,
Thanks for your email response.
After looked through the error logs, I found that your database back files
were stored separately in the subdirectories of MSSQLBackups. I am afraid
that that is the trick.Maintenance tasks in SQL Server 2005 cannot delete
subdirectories. I recommend that you create a separate Maintenance cleanup
for each database.
For more information, please refer to:
Back up Database Task (Maintenance Plan)
http://msdn2.microsoft.com/en-us/library/ms189647.aspx
( refer to the section Create a sub-directory for each database).
If you have any other questions or concerns, please feel free to let me
know. It is my pleasure to be of assistance.
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||SP1 fixed the subfolder delete issue. After applying SP1,
there is a checkbox on the Maintenance Cleanup Task called
"Include first-level subfolders". You select that to delete
files in subfolders. However, You can't configure it using
the wizard. You have to create the Maintenance Plan and then
go back and modify the Maintenance Cleanup Task afterward.
-Sue
On Wed, 09 May 2007 07:19:38 GMT,
changliw@.online.microsoft.com (Charles Wang[MSFT]) wrote:

>Hi Pete,
>Thanks for your email response.
>After looked through the error logs, I found that your database back files
>were stored separately in the subdirectories of MSSQLBackups. I am afraid
>that that is the trick.Maintenance tasks in SQL Server 2005 cannot delete
>subdirectories. I recommend that you create a separate Maintenance cleanup
>for each database.
>For more information, please refer to:
>Back up Database Task (Maintenance Plan)
>http://msdn2.microsoft.com/en-us/library/ms189647.aspx
>( refer to the section Create a sub-directory for each database).
>If you have any other questions or concerns, please feel free to let me
>know. It is my pleasure to be of assistance.
>Best regards,
>Charles Wang
>Microsoft Online Community Support
>================================================= ====
>Get notification to my posts through email? Please refer to:
>http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
>ications
>If you are using Outlook Express, please make sure you clear the check box
>"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
>
>Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
>where an initial response from the community or a Microsoft Support
>Engineer within 1 business day is acceptable. Please note that each follow
>up response may take approximately 2 business days as the support
>professional working with you may need further investigation to reach the
>most efficient resolution. The offering is not appropriate for situations
>that require urgent, real-time or phone-based interactions or complex
>project analysis and dump analysis issues. Issues of this nature are best
>handled working with a dedicated Microsoft Support Engineer by contacting
>Microsoft Customer Support Services (CSS) at
>http://msdn.microsoft.com/subscriptions/support/default.aspx.
>================================================= =====
>When responding to posts, please "Reply to Group" via
>your newsreader so that others may learn and benefit
>from this issue.
>================================================= =====
>This posting is provided "AS IS" with no warranties, and confers no rights.
>================================================= =====
>
|||Hi Sue,
Thanks for your pointing out. I am sorry that I missed that since I checked
a SQL Server 2005 instance with no SP1.
Pete, could you please check the content of the File Extention? The correct
conent should be like ".trn;.bak". Please check if the dot was missed.
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

backup job can't remove old .BAK from disk

Hello,
I have a full database backup job that I run nightly on large database. The
database size is approx 37 GB. This job was created using the maintenance
plan wizard in Enterprise Manager. The maintenance plan is set up to retain 1
days worth of .BAK files on the server.
My problem is that occasionally(not all or the time) this backup job fails.
After taking a closer look I found that the database is actually being backed
up properly but the job fails because it is not able to delete the old backup
from the previous day. This can cause the disk drive to fill to capacity if
not monitored closely.
I have other database backup jobs that were created using maintenance plans
that work just fine.
Is there a reason why this database backup job is sometimes unable to delete
old backup files?
This has been causing me headaches for some time and I'd appreciate any
feedback you may have...
Thanks,
John
Could you please explain how do you delete the old backup file?
Are you using VB Scripts,...?
Ed
"John P" wrote:

> Hello,
> I have a full database backup job that I run nightly on large database. The
> database size is approx 37 GB. This job was created using the maintenance
> plan wizard in Enterprise Manager. The maintenance plan is set up to retain 1
> days worth of .BAK files on the server.
> My problem is that occasionally(not all or the time) this backup job fails.
> After taking a closer look I found that the database is actually being backed
> up properly but the job fails because it is not able to delete the old backup
> from the previous day. This can cause the disk drive to fill to capacity if
> not monitored closely.
> I have other database backup jobs that were created using maintenance plans
> that work just fine.
> Is there a reason why this database backup job is sometimes unable to delete
> old backup files?
> This has been causing me headaches for some time and I'd appreciate any
> feedback you may have...
> Thanks,
> John
|||Get rid of the maint plan and code it yourself. You only keep 1 copy so
you can just delete it before the backup.
It would be quicker to write the job than to have posted your question
.
I assume you are copying the backup somewhere otherwise if the backup
fails or is corrupt you are left without a backup and can lose the
database.
I try to keep at least 3 backups on disk and will zip them if they are
large.
Nigel Rivett
www.nigelrivett.net
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
|||Check your scheduling. Chances are, the Tape Backup client you are using on
this server or the Anti-Virus software is running scheduled jobs around the
same time as your disk database backup. All of these task try and need to
gain exclusive access to the files; so, it is better to have their
respective schedules staggard.
You probably see the problem against this database more often than the
others because of its size: the larger the file the longer the duration so
the higher the probability that there will be a conflict.
Sincerely,
Anthony Thomas

"Ed" <Ed@.discussions.microsoft.com> wrote in message
news:836CA9D0-E58B-49E6-A537-F4208EF376B2@.microsoft.com...
Could you please explain how do you delete the old backup file?
Are you using VB Scripts,...?
Ed
"John P" wrote:

> Hello,
> I have a full database backup job that I run nightly on large database.
The
> database size is approx 37 GB. This job was created using the maintenance
> plan wizard in Enterprise Manager. The maintenance plan is set up to
retain 1
> days worth of .BAK files on the server.
> My problem is that occasionally(not all or the time) this backup job
fails.
> After taking a closer look I found that the database is actually being
backed
> up properly but the job fails because it is not able to delete the old
backup
> from the previous day. This can cause the disk drive to fill to capacity
if
> not monitored closely.
> I have other database backup jobs that were created using maintenance
plans
> that work just fine.
> Is there a reason why this database backup job is sometimes unable to
delete
> old backup files?
> This has been causing me headaches for some time and I'd appreciate any
> feedback you may have...
> Thanks,
> John
|||"Nigel Rivett" <sqlnr@.hotmail.com> wrote in message
news:%23v0oMCi2EHA.1392@.tk2msftngp13.phx.gbl...
> Get rid of the maint plan and code it yourself. You only keep 1 copy so
> you can just delete it before the backup.
>
Umm, can I recommend deleting it AFTER a successful backup.
Otherwise you risk deleting your one good backup and having the new one
fail. :-)

> It would be quicker to write the job than to have posted your question
> .
> I assume you are copying the backup somewhere otherwise if the backup
> fails or is corrupt you are left without a backup and can lose the
> database.
> I try to keep at least 3 backups on disk and will zip them if they are
> large.
> Nigel Rivett
> www.nigelrivett.net
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

backup job can't remove old .BAK from disk

Hello,
I have a full database backup job that I run nightly on large database. The
database size is approx 37 GB. This job was created using the maintenance
plan wizard in Enterprise Manager. The maintenance plan is set up to retain 1
days worth of .BAK files on the server.
My problem is that occasionally(not all or the time) this backup job fails.
After taking a closer look I found that the database is actually being backed
up properly but the job fails because it is not able to delete the old backup
from the previous day. This can cause the disk drive to fill to capacity if
not monitored closely.
I have other database backup jobs that were created using maintenance plans
that work just fine.
Is there a reason why this database backup job is sometimes unable to delete
old backup files?
This has been causing me headaches for some time and I'd appreciate any
feedback you may have...
Thanks,
JohnCould you please explain how do you delete the old backup file?
Are you using VB Scripts,...?
Ed
"John P" wrote:
> Hello,
> I have a full database backup job that I run nightly on large database. The
> database size is approx 37 GB. This job was created using the maintenance
> plan wizard in Enterprise Manager. The maintenance plan is set up to retain 1
> days worth of .BAK files on the server.
> My problem is that occasionally(not all or the time) this backup job fails.
> After taking a closer look I found that the database is actually being backed
> up properly but the job fails because it is not able to delete the old backup
> from the previous day. This can cause the disk drive to fill to capacity if
> not monitored closely.
> I have other database backup jobs that were created using maintenance plans
> that work just fine.
> Is there a reason why this database backup job is sometimes unable to delete
> old backup files?
> This has been causing me headaches for some time and I'd appreciate any
> feedback you may have...
> Thanks,
> John|||Check your scheduling. Chances are, the Tape Backup client you are using on
this server or the Anti-Virus software is running scheduled jobs around the
same time as your disk database backup. All of these task try and need to
gain exclusive access to the files; so, it is better to have their
respective schedules staggard.
You probably see the problem against this database more often than the
others because of its size: the larger the file the longer the duration so
the higher the probability that there will be a conflict.
Sincerely,
Anthony Thomas
"Ed" <Ed@.discussions.microsoft.com> wrote in message
news:836CA9D0-E58B-49E6-A537-F4208EF376B2@.microsoft.com...
Could you please explain how do you delete the old backup file?
Are you using VB Scripts,...?
Ed
"John P" wrote:
> Hello,
> I have a full database backup job that I run nightly on large database.
The
> database size is approx 37 GB. This job was created using the maintenance
> plan wizard in Enterprise Manager. The maintenance plan is set up to
retain 1
> days worth of .BAK files on the server.
> My problem is that occasionally(not all or the time) this backup job
fails.
> After taking a closer look I found that the database is actually being
backed
> up properly but the job fails because it is not able to delete the old
backup
> from the previous day. This can cause the disk drive to fill to capacity
if
> not monitored closely.
> I have other database backup jobs that were created using maintenance
plans
> that work just fine.
> Is there a reason why this database backup job is sometimes unable to
delete
> old backup files?
> This has been causing me headaches for some time and I'd appreciate any
> feedback you may have...
> Thanks,
> John|||I have a similar situation where my backup area can only
hold one backup file. I use a two step job and avoid the
Maintenance Plan wizard. The first step uses xp_cmdshell
to delete the previous day's backup file, the second backs
up the database with the 'backup database x to disk ='
command. Later in the evening my backup folder is copied
to tape. I build the date into the backup file name. So
I have to create a variable with the delete command and
path and correct file name for xp_cmdshell.
>--Original Message--
>Hello,
>I have a full database backup job that I run nightly on
large database. The
>database size is approx 37 GB. This job was created using
the maintenance
>plan wizard in Enterprise Manager. The maintenance plan
is set up to retain 1
>days worth of .BAK files on the server.
>My problem is that occasionally(not all or the time) this
backup job fails.
>After taking a closer look I found that the database is
actually being backed
>up properly but the job fails because it is not able to
delete the old backup
>from the previous day. This can cause the disk drive to
fill to capacity if
>not monitored closely.
>I have other database backup jobs that were created using
maintenance plans
>that work just fine.
>Is there a reason why this database backup job is
sometimes unable to delete
>old backup files?
>This has been causing me headaches for some time and I'd
appreciate any
>feedback you may have...
>Thanks,
>John
>.
>|||We have a space problem, but more because of our Storage Administration
team.
The default behaviour of the Maintenance Plans is to backup up and then
verify each database in the plan. Only after all backups are completed,
without error, the file delete portion runs for yesterday's backup. So, you
need space for at least 2 Full backups and any retained transaction log
backups in between.
The way we've coded it is to go ahead and set the Maintenance Plans, but
then code another job that runs several times per day checking the Archive
Bit on the prior backup files. Whenever the tape client runs, it will reset
this bit allowing our job to remove it. This reduces our space requirements
to just 1 set of Full backups and intra-day transaction log backups.
Also, we write our backups to dedicated disk partitions that are compressed.
You might also consider something like SQL Litespeed, which further
compresses the database backup files but integrates nicely withing the
Maintenance Plans already created.
Hope this helps.
Sincerely,
Anthony Thomas
"randy" <randydoub@.yahoo.com> wrote in message
news:1beb01c4dc68$9f66cb00$a301280a@.phx.gbl...
I have a similar situation where my backup area can only
hold one backup file. I use a two step job and avoid the
Maintenance Plan wizard. The first step uses xp_cmdshell
to delete the previous day's backup file, the second backs
up the database with the 'backup database x to disk ='
command. Later in the evening my backup folder is copied
to tape. I build the date into the backup file name. So
I have to create a variable with the delete command and
path and correct file name for xp_cmdshell.
>--Original Message--
>Hello,
>I have a full database backup job that I run nightly on
large database. The
>database size is approx 37 GB. This job was created using
the maintenance
>plan wizard in Enterprise Manager. The maintenance plan
is set up to retain 1
>days worth of .BAK files on the server.
>My problem is that occasionally(not all or the time) this
backup job fails.
>After taking a closer look I found that the database is
actually being backed
>up properly but the job fails because it is not able to
delete the old backup
>from the previous day. This can cause the disk drive to
fill to capacity if
>not monitored closely.
>I have other database backup jobs that were created using
maintenance plans
>that work just fine.
>Is there a reason why this database backup job is
sometimes unable to delete
>old backup files?
>This has been causing me headaches for some time and I'd
appreciate any
>feedback you may have...
>Thanks,
>John
>.
>

Sunday, February 12, 2012

backup issue

To all,
As always, I appreciate your help.
In an active/active cluster environment, I have a 68GB
database. Creates a 63GB .BAK file to a separate drive at
night that is on one of the physical nodes of the cluster,
but the physical drive is not assigned to the cluster.
The .BAK is only thing on the drive.
After performing chkdsk maintenance, I got deleting
indexing entry...MFT file. (I think this may be related to
Microsoft's KB327009)
So I've rebooted a couple times performing chkdsk /f and
the disk comes back clean. I backup the db again manually,
doing a restore verify of course, says it's good. At night
when the maintenance job runs, in the morning it says the
file is not a valid backup set. I run chkdsk and get
errors. At night we have a 3rd party backup program that
kicks off and around the same time I have this error in my
system logs: Event ID 12503 - The Distributed Link
Tracking log was corrupt on volume Z: and has been re-
created. This log is used to automatically repair file
links, such as Shell Shortcuts and OLE links, when for
some reason those links become broken.
I have deleted and re-created the job, and this past week.
I've been running the job manually in the evening, the job
will run once successfully at night, but if I allow it to
backup through the jobs the following night. I get that
it's not a valid backup set again. Confusing huh?
Has anyone experienced such a thing? And if so, please
share how you fixed it? If not, any suggestions are
greatly appreciated, because I'm fresh out of ideas.
Thanks,
JosieJosie,
Hello!
Looking at your problem, it appears to me that you could be looking at some
disk corruption. The best place to start would be the Event logs and see
if:-
1. You see any corruption or hardware errors
2. Did the backups actually complete successfully?
3. Is the database corrupt? (Run checkdb)
With SQL Server backups, we usually have commands such as RESTORE
VERIFYONLY and RESTORE HEADERONLY to verify the state of a backup device. A
backup can be deemed as successful only after it's been fully restored, and
a checkdb is run on it.
I'd suggest you look at the event logs, and maybe get your hardware vendors
engaged as well. Have you tried backing up the db to another drive?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

backup issue

To all,
As always, I appreciate your help.
In an active/active cluster environment, I have a 68GB
database. Creates a 63GB .BAK file to a separate drive at
night that is on one of the physical nodes of the cluster,
but the physical drive is not assigned to the cluster.
The .BAK is only thing on the drive.
After performing chkdsk maintenance, I got deleting
indexing entry...MFT file. (I think this may be related to
Microsoft's KB327009)
So I've rebooted a couple times performing chkdsk /f and
the disk comes back clean. I backup the db again manually,
doing a restore verify of course, says it's good. At night
when the maintenance job runs, in the morning it says the
file is not a valid backup set. I run chkdsk and get
errors. At night we have a 3rd party backup program that
kicks off and around the same time I have this error in my
system logs: Event ID 12503 - The Distributed Link
Tracking log was corrupt on volume Z: and has been re-
created. This log is used to automatically repair file
links, such as Shell Shortcuts and OLE links, when for
some reason those links become broken.
I have deleted and re-created the job, and this past week.
I've been running the job manually in the evening, the job
will run once successfully at night, but if I allow it to
backup through the jobs the following night. I get that
it's not a valid backup set again. Confusing huh?
Has anyone experienced such a thing? And if so, please
share how you fixed it? If not, any suggestions are
greatly appreciated, because I'm fresh out of ideas.
Thanks,
Josie
Josie,
Hello!
Looking at your problem, it appears to me that you could be looking at some
disk corruption. The best place to start would be the Event logs and see
if:-
1. You see any corruption or hardware errors
2. Did the backups actually complete successfully?
3. Is the database corrupt? (Run checkdb)
With SQL Server backups, we usually have commands such as RESTORE
VERIFYONLY and RESTORE HEADERONLY to verify the state of a backup device. A
backup can be deemed as successful only after it's been fully restored, and
a checkdb is run on it.
I'd suggest you look at the event logs, and maybe get your hardware vendors
engaged as well. Have you tried backing up the db to another drive?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

backup issue

To all,
As always, I appreciate your help.
In an active/active cluster environment, I have a 68GB
database. Creates a 63GB .BAK file to a separate drive at
night that is on one of the physical nodes of the cluster,
but the physical drive is not assigned to the cluster.
The .BAK is only thing on the drive.
After performing chkdsk maintenance, I got deleting
indexing entry...MFT file. (I think this may be related to
Microsoft's KB327009)
So I've rebooted a couple times performing chkdsk /f and
the disk comes back clean. I backup the db again manually,
doing a restore verify of course, says it's good. At night
when the maintenance job runs, in the morning it says the
file is not a valid backup set. I run chkdsk and get
errors. At night we have a 3rd party backup program that
kicks off and around the same time I have this error in my
system logs: Event ID 12503 - The Distributed Link
Tracking log was corrupt on volume Z: and has been re-
created. This log is used to automatically repair file
links, such as Shell Shortcuts and OLE links, when for
some reason those links become broken.
I have deleted and re-created the job, and this past week.
I've been running the job manually in the evening, the job
will run once successfully at night, but if I allow it to
backup through the jobs the following night. I get that
it's not a valid backup set again. Confusing huh?
Has anyone experienced such a thing? And if so, please
share how you fixed it? If not, any suggestions are
greatly appreciated, because I'm fresh out of ideas.
Thanks,
JosieJosie,
Hello!
Looking at your problem, it appears to me that you could be looking at some
disk corruption. The best place to start would be the Event logs and see
if:-
1. You see any corruption or hardware errors
2. Did the backups actually complete successfully?
3. Is the database corrupt? (Run checkdb)
With SQL Server backups, we usually have commands such as RESTORE
VERIFYONLY and RESTORE HEADERONLY to verify the state of a backup device. A
backup can be deemed as successful only after it's been fully restored, and
a checkdb is run on it.
I'd suggest you look at the event logs, and maybe get your hardware vendors
engaged as well. Have you tried backing up the db to another drive?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Backup intermittently fails. OS Error:32

Hi,
We've been having an usual problem with our SQL server
backup. The database is around 41Gb, which does a full
database dump to a .bak daily, and then transaction log
dumps every 15mins. However, intermittently the full
backup will fail with the following:
nightlyrun.log
Msg 3201, Level 16, State 1, Server EARTH, Line 24
Cannot open backup device 'dratlas_backup'. Device error
or
device off-line. See the SQL Server error log for more
details.
Msg 3013, Level 16, State 1, Server EARTH, Line 24
BACKUP DATABASE is terminating abnormally.
ERRORLOG
2004-04-28 02:27:58.27 spid58 DBCC CHECKDB (hrlink)
executed by sa found 0 errors and repaired 0 errors.
2004-04-28 02:28:00.77 backup Database log truncated:
Database: hrlink.
2004-04-28 02:28:13.16 spid58
BackupDiskFile::CreateMedia: Backup
device '\\jupiter\dump$\dratlas_backup.bak' failed to
create. Operating system error = 32(error not found).
2004-04-28 02:28:13.18 backup BACKUP failed to
complete the command
The network share is always 100% available to the SQL
server on a 1Gb core network. As I said, this is
intermittent, and may fail once a week, or five times a
week, and nothing has changed on the servers or network.
The knowledge base does not include any information about
the OS error or Msg 3201
Any help will be much appreciated.
Thankyou.
Regards,
David
A single network interruption can an error such as this. With a 41GB file
being backed up over the network there is plenty of time for this to occur.
Another common cause is if you are reusing an existing device (either
appending or initing) and you have a tape backup trying to backup that
device at the same time. If these files are backed up to tape by a
different process you may want to check the timing of it compared to the
backup failure times.
Andrew J. Kelly SQL MVP
"David Meldrum" <david.meldrum@.skilled.com.au> wrote in message
news:526d01c42cb4$07a18da0$a301280a@.phx.gbl...
> Hi,
> We've been having an usual problem with our SQL server
> backup. The database is around 41Gb, which does a full
> database dump to a .bak daily, and then transaction log
> dumps every 15mins. However, intermittently the full
> backup will fail with the following:
> nightlyrun.log
> Msg 3201, Level 16, State 1, Server EARTH, Line 24
> Cannot open backup device 'dratlas_backup'. Device error
> or
> device off-line. See the SQL Server error log for more
> details.
> Msg 3013, Level 16, State 1, Server EARTH, Line 24
> BACKUP DATABASE is terminating abnormally.
> ERRORLOG
> 2004-04-28 02:27:58.27 spid58 DBCC CHECKDB (hrlink)
> executed by sa found 0 errors and repaired 0 errors.
> 2004-04-28 02:28:00.77 backup Database log truncated:
> Database: hrlink.
> 2004-04-28 02:28:13.16 spid58
> BackupDiskFile::CreateMedia: Backup
> device '\\jupiter\dump$\dratlas_backup.bak' failed to
> create. Operating system error = 32(error not found).
> 2004-04-28 02:28:13.18 backup BACKUP failed to
> complete the command
> The network share is always 100% available to the SQL
> server on a 1Gb core network. As I said, this is
> intermittent, and may fail once a week, or five times a
> week, and nothing has changed on the servers or network.
> The knowledge base does not include any information about
> the OS error or Msg 3201
> Any help will be much appreciated.
> Thankyou.
> Regards,
> David

Backup intermittently fails. OS Error:32

Hi,
We've been having an usual problem with our SQL server
backup. The database is around 41Gb, which does a full
database dump to a .bak daily, and then transaction log
dumps every 15mins. However, intermittently the full
backup will fail with the following:
nightlyrun.log
Msg 3201, Level 16, State 1, Server EARTH, Line 24
Cannot open backup device 'dratlas_backup'. Device error
or
device off-line. See the SQL Server error log for more
details.
Msg 3013, Level 16, State 1, Server EARTH, Line 24
BACKUP DATABASE is terminating abnormally.
ERRORLOG
2004-04-28 02:27:58.27 spid58 DBCC CHECKDB (hrlink)
executed by sa found 0 errors and repaired 0 errors.
2004-04-28 02:28:00.77 backup Database log truncated:
Database: hrlink.
2004-04-28 02:28:13.16 spid58
BackupDiskFile::CreateMedia: Backup
device '\\jupiter\dump$\dratlas_backup.bak' failed to
create. Operating system error = 32(error not found).
2004-04-28 02:28:13.18 backup BACKUP failed to
complete the command
The network share is always 100% available to the SQL
server on a 1Gb core network. As I said, this is
intermittent, and may fail once a week, or five times a
week, and nothing has changed on the servers or network.
The knowledge base does not include any information about
the OS error or Msg 3201
Any help will be much appreciated.
Thankyou.
Regards,
DavidA single network interruption can an error such as this. With a 41GB file
being backed up over the network there is plenty of time for this to occur.
Another common cause is if you are reusing an existing device (either
appending or initing) and you have a tape backup trying to backup that
device at the same time. If these files are backed up to tape by a
different process you may want to check the timing of it compared to the
backup failure times.
--
Andrew J. Kelly SQL MVP
"David Meldrum" <david.meldrum@.skilled.com.au> wrote in message
news:526d01c42cb4$07a18da0$a301280a@.phx.gbl...
> Hi,
> We've been having an usual problem with our SQL server
> backup. The database is around 41Gb, which does a full
> database dump to a .bak daily, and then transaction log
> dumps every 15mins. However, intermittently the full
> backup will fail with the following:
> nightlyrun.log
> Msg 3201, Level 16, State 1, Server EARTH, Line 24
> Cannot open backup device 'dratlas_backup'. Device error
> or
> device off-line. See the SQL Server error log for more
> details.
> Msg 3013, Level 16, State 1, Server EARTH, Line 24
> BACKUP DATABASE is terminating abnormally.
> ERRORLOG
> 2004-04-28 02:27:58.27 spid58 DBCC CHECKDB (hrlink)
> executed by sa found 0 errors and repaired 0 errors.
> 2004-04-28 02:28:00.77 backup Database log truncated:
> Database: hrlink.
> 2004-04-28 02:28:13.16 spid58
> BackupDiskFile::CreateMedia: Backup
> device '\\jupiter\dump$\dratlas_backup.bak' failed to
> create. Operating system error = 32(error not found).
> 2004-04-28 02:28:13.18 backup BACKUP failed to
> complete the command
> The network share is always 100% available to the SQL
> server on a 1Gb core network. As I said, this is
> intermittent, and may fail once a week, or five times a
> week, and nothing has changed on the servers or network.
> The knowledge base does not include any information about
> the OS error or Msg 3201
> Any help will be much appreciated.
> Thankyou.
> Regards,
> David

Backup intermittently fails. OS Error:32

Hi,
We've been having an usual problem with our SQL server
backup. The database is around 41Gb, which does a full
database dump to a .bak daily, and then transaction log
dumps every 15mins. However, intermittently the full
backup will fail with the following:
nightlyrun.log
Msg 3201, Level 16, State 1, Server EARTH, Line 24
Cannot open backup device 'dratlas_backup'. Device error
or
device off-line. See the SQL Server error log for more
details.
Msg 3013, Level 16, State 1, Server EARTH, Line 24
BACKUP DATABASE is terminating abnormally.
ERRORLOG
2004-04-28 02:27:58.27 spid58 DBCC CHECKDB (hrlink)
executed by sa found 0 errors and repaired 0 errors.
2004-04-28 02:28:00.77 backup Database log truncated:
Database: hrlink.
2004-04-28 02:28:13.16 spid58
BackupDiskFile::CreateMedia: Backup
device '\\jupiter\dump$\dratlas_backup.bak' failed to
create. Operating system error = 32(error not found).
2004-04-28 02:28:13.18 backup BACKUP failed to
complete the command
The network share is always 100% available to the SQL
server on a 1Gb core network. As I said, this is
intermittent, and may fail once a week, or five times a
week, and nothing has changed on the servers or network.
The knowledge base does not include any information about
the OS error or Msg 3201
Any help will be much appreciated.
Thankyou.
Regards,
DavidA single network interruption can an error such as this. With a 41GB file
being backed up over the network there is plenty of time for this to occur.
Another common cause is if you are reusing an existing device (either
appending or initing) and you have a tape backup trying to backup that
device at the same time. If these files are backed up to tape by a
different process you may want to check the timing of it compared to the
backup failure times.
Andrew J. Kelly SQL MVP
"David Meldrum" <david.meldrum@.skilled.com.au> wrote in message
news:526d01c42cb4$07a18da0$a301280a@.phx.gbl...
> Hi,
> We've been having an usual problem with our SQL server
> backup. The database is around 41Gb, which does a full
> database dump to a .bak daily, and then transaction log
> dumps every 15mins. However, intermittently the full
> backup will fail with the following:
> nightlyrun.log
> Msg 3201, Level 16, State 1, Server EARTH, Line 24
> Cannot open backup device 'dratlas_backup'. Device error
> or
> device off-line. See the SQL Server error log for more
> details.
> Msg 3013, Level 16, State 1, Server EARTH, Line 24
> BACKUP DATABASE is terminating abnormally.
> ERRORLOG
> 2004-04-28 02:27:58.27 spid58 DBCC CHECKDB (hrlink)
> executed by sa found 0 errors and repaired 0 errors.
> 2004-04-28 02:28:00.77 backup Database log truncated:
> Database: hrlink.
> 2004-04-28 02:28:13.16 spid58
> BackupDiskFile::CreateMedia: Backup
> device '\\jupiter\dump$\dratlas_backup.bak' failed to
> create. Operating system error = 32(error not found).
> 2004-04-28 02:28:13.18 backup BACKUP failed to
> complete the command
> The network share is always 100% available to the SQL
> server on a 1Gb core network. As I said, this is
> intermittent, and may fail once a week, or five times a
> week, and nothing has changed on the servers or network.
> The knowledge base does not include any information about
> the OS error or Msg 3201
> Any help will be much appreciated.
> Thankyou.
> Regards,
> David

Backup in a file and retention

Hi,
I backup a database SQL 2005 Express Edition, with this command :
BACKUP DATABASE [mSuite] TO DISK = N'E:\BackupSQL\Backup-mSuite.bak' WITH
RETAINDAYS = 21, NOFORMAT, NOINIT, NAME = N'mSuite-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD, STATS = 10
I would like to know if one option can erase old backup (expired backup ) in
the backup file ?
Thanks in advance,
--
Gilles> I would like to know if one option can erase old backup (expired backup )
> in
> the backup file ?
You can overwrite the entire backup file by specifying INIT instead of
NOINIT. You will also need to specify FORMAT instead of NOFORMAT if the
target backup file contains unexpired backups.
If you objective is to keep a rolling set of the most recent backups, you'll
need create a new backup each day and delete the oldest backup file.
Hope this helps.
Dan Guzman
SQL Server MVP
"Gilles" <Gilles@.discussions.microsoft.com> wrote in message
news:139F95E2-6005-47BF-974D-56612F8110BF@.microsoft.com...
> Hi,
> I backup a database SQL 2005 Express Edition, with this command :
> BACKUP DATABASE [mSuite] TO DISK = N'E:\BackupSQL\Backup-mSuite.bak' WITH
> RETAINDAYS = 21, NOFORMAT, NOINIT, NAME = N'mSuite-Full Database Backup',
> SKIP, NOREWIND, NOUNLOAD, STATS = 10
> I would like to know if one option can erase old backup (expired backup )
> in
> the backup file ?
> Thanks in advance,
> --
> Gilles|||Hi Dan,
Thanks for this information.
--
Gilles
"Dan Guzman" wrote:
> > I would like to know if one option can erase old backup (expired backup )
> > in
> > the backup file ?
> You can overwrite the entire backup file by specifying INIT instead of
> NOINIT. You will also need to specify FORMAT instead of NOFORMAT if the
> target backup file contains unexpired backups.
> If you objective is to keep a rolling set of the most recent backups, you'll
> need create a new backup each day and delete the oldest backup file.
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Gilles" <Gilles@.discussions.microsoft.com> wrote in message
> news:139F95E2-6005-47BF-974D-56612F8110BF@.microsoft.com...
> > Hi,
> >
> > I backup a database SQL 2005 Express Edition, with this command :
> >
> > BACKUP DATABASE [mSuite] TO DISK = N'E:\BackupSQL\Backup-mSuite.bak' WITH
> > RETAINDAYS = 21, NOFORMAT, NOINIT, NAME = N'mSuite-Full Database Backup',
> > SKIP, NOREWIND, NOUNLOAD, STATS = 10
> >
> > I would like to know if one option can erase old backup (expired backup )
> > in
> > the backup file ?
> >
> > Thanks in advance,
> >
> > --
> > Gilles
>