Showing posts with label xxx. Show all posts
Showing posts with label xxx. Show all posts

Sunday, March 25, 2012

Backup Error: sql-dom sql state 4200

When trying to backup a sql2000 database I receive the following error:
"Microsoft SQL-DOM (odbc sqlstate: 42000)
The Volume on device xxx e:\backupfilename.bak belongs to a different media set.
Backup or restore operation terminating abnormally."
Thanks for any help,
JimIf you have no use for the existing backup file, you could
either delete the file from the file system before doing
the backup or add the FORMAT option to the BACKUP
statement.
Linchi
>--Original Message--
>When trying to backup a sql2000 database I receive the
following error:
>"Microsoft SQL-DOM (odbc sqlstate: 42000)
>The Volume on device xxx e:\backupfilename.bak belongs to
a different media set.
>Backup or restore operation terminating abnormally."
>Thanks for any help,
>Jim
>
>.
>

Tuesday, March 20, 2012

Backup DB to File WITH INIT?

I am using:
BACKUP DATABASE XXX TO DISK = @.MyFile
-- If @.MyFile exists, i want to overwrite it. The help file says "Use
the INIT clause to overwrite the backup media, and write the backup as
the first file ... ". This sounds like it will clean-up my entire D-
Drive and then do the backup. It should simply overwrite the specific
file @.MyFile if it exists. I just want to be a 100% sure before I run
this command.
Thanks,
Jay
WITH INIT = delete all the backups in your backup device, which is the .BAK
file you specified. This means, everytime you backup, you only have the
backup from the last time the backup command executed.
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183609141.844241.152410@.d30g2000prg.googlegr oups.com...
> I am using:
> BACKUP DATABASE XXX TO DISK = @.MyFile
> -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> the INIT clause to overwrite the backup media, and write the backup as
> the first file ... ". This sounds like it will clean-up my entire D-
> Drive and then do the backup. It should simply overwrite the specific
> file @.MyFile if it exists. I just want to be a 100% sure before I run
> this command.
> Thanks,
> Jay
>
|||Jay
It will NOT clean your entire drive. Think about it, as if you backup
database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
BOL says
INIT
Specifies that all backup sets should be overwritten, but preserves the
media header. If INIT is specified, any existing backup set data on that
device is overwritten.
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183609141.844241.152410@.d30g2000prg.googlegr oups.com...
> I am using:
> BACKUP DATABASE XXX TO DISK = @.MyFile
> -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> the INIT clause to overwrite the backup media, and write the backup as
> the first file ... ". This sounds like it will clean-up my entire D-
> Drive and then do the backup. It should simply overwrite the specific
> file @.MyFile if it exists. I just want to be a 100% sure before I run
> this command.
> Thanks,
> Jay
>
|||OK, does this mean that if I have older backup files like
(MYDB_20061231.bak, MYDB_20070101.bak....) they all will be deleted?
On Jul 5, 10:18 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Jay
> It will NOT clean your entire drive. Think about it, as if you backup
> database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
> BOL says
> INIT
> Specifies that all backup sets should be overwritten, but preserves the
> media header. If INIT is specified, any existing backup set data on that
> device is overwritten.
> "Jay" <jay6...@.hotmail.com> wrote in message
> news:1183609141.844241.152410@.d30g2000prg.googlegr oups.com...
>
>
>
>
> - Show quoted text -
|||Jay
if MYDB_20061231.bak contains more than one file and you issue BACKUP
DATABASE db to disk='c:\MYDB_20061231.bak' WITH INIT so YES it will be
overwritten
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183614106.316025.235930@.j4g2000prf.googlegro ups.com...
> OK, does this mean that if I have older backup files like
> (MYDB_20061231.bak, MYDB_20070101.bak....) they all will be deleted?
>
> On Jul 5, 10:18 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
>
|||OK - thanks. I got it. I didn't know a backup file can contain more
than one backups.
On Jul 5, 10:58 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Jay
> if MYDB_20061231.bak contains more than one file and you issue BACKUP
> DATABASE db to disk='c:\MYDB_20061231.bak' WITH INIT so YES it will be
> overwritten
> "Jay" <jay6...@.hotmail.com> wrote in message
> news:1183614106.316025.235930@.j4g2000prf.googlegro ups.com...
>
>
>
>
>
>
> - Show quoted text -

Backup DB to File WITH INIT?

I am using:
BACKUP DATABASE XXX TO DISK = @.MyFile
-- If @.MyFile exists, i want to overwrite it. The help file says "Use
the INIT clause to overwrite the backup media, and write the backup as
the first file ... ". This sounds like it will clean-up my entire D-
Drive and then do the backup. It should simply overwrite the specific
file @.MyFile if it exists. I just want to be a 100% sure before I run
this command.
Thanks,
JayWITH INIT = delete all the backups in your backup device, which is the .BAK
file you specified. This means, everytime you backup, you only have the
backup from the last time the backup command executed.
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
> I am using:
> BACKUP DATABASE XXX TO DISK = @.MyFile
> -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> the INIT clause to overwrite the backup media, and write the backup as
> the first file ... ". This sounds like it will clean-up my entire D-
> Drive and then do the backup. It should simply overwrite the specific
> file @.MyFile if it exists. I just want to be a 100% sure before I run
> this command.
> Thanks,
> Jay
>|||Jay
It will NOT clean your entire drive. Think about it, as if you backup
database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
BOL says
INIT
Specifies that all backup sets should be overwritten, but preserves the
media header. If INIT is specified, any existing backup set data on that
device is overwritten.
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
> I am using:
> BACKUP DATABASE XXX TO DISK = @.MyFile
> -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> the INIT clause to overwrite the backup media, and write the backup as
> the first file ... ". This sounds like it will clean-up my entire D-
> Drive and then do the backup. It should simply overwrite the specific
> file @.MyFile if it exists. I just want to be a 100% sure before I run
> this command.
> Thanks,
> Jay
>|||OK, does this mean that if I have older backup files like
(MYDB_20061231.bak, MYDB_20070101.bak....) they all will be deleted?
On Jul 5, 10:18 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Jay
> It will NOT clean your entire drive. Think about it, as if you backup
> database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
> BOL says
> INIT
> Specifies that all backup sets should be overwritten, but preserves the
> media header. If INIT is specified, any existing backup set data on that
> device is overwritten.
> "Jay" <jay6...@.hotmail.com> wrote in message
> news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
>
>
> > I am using:
> > BACKUP DATABASE XXX TO DISK = @.MyFile
> > -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> > the INIT clause to overwrite the backup media, and write the backup as
> > the first file ... ". This sounds like it will clean-up my entire D-
> > Drive and then do the backup. It should simply overwrite the specific
> > file @.MyFile if it exists. I just want to be a 100% sure before I run
> > this command.
> > Thanks,
> > Jay- Hide quoted text -
> - Show quoted text -|||Jay
if MYDB_20061231.bak contains more than one file and you issue BACKUP
DATABASE db to disk='c:\MYDB_20061231.bak' WITH INIT so YES it will be
overwritten
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183614106.316025.235930@.j4g2000prf.googlegroups.com...
> OK, does this mean that if I have older backup files like
> (MYDB_20061231.bak, MYDB_20070101.bak....) they all will be deleted?
>
> On Jul 5, 10:18 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
>> Jay
>> It will NOT clean your entire drive. Think about it, as if you backup
>> database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
>> BOL says
>> INIT
>> Specifies that all backup sets should be overwritten, but preserves the
>> media header. If INIT is specified, any existing backup set data on that
>> device is overwritten.
>> "Jay" <jay6...@.hotmail.com> wrote in message
>> news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
>>
>>
>> > I am using:
>> > BACKUP DATABASE XXX TO DISK = @.MyFile
>> > -- If @.MyFile exists, i want to overwrite it. The help file says "Use
>> > the INIT clause to overwrite the backup media, and write the backup as
>> > the first file ... ". This sounds like it will clean-up my entire D-
>> > Drive and then do the backup. It should simply overwrite the specific
>> > file @.MyFile if it exists. I just want to be a 100% sure before I run
>> > this command.
>> > Thanks,
>> > Jay- Hide quoted text -
>> - Show quoted text -
>|||OK - thanks. I got it. I didn't know a backup file can contain more
than one backups.
On Jul 5, 10:58 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Jay
> if MYDB_20061231.bak contains more than one file and you issue BACKUP
> DATABASE db to disk='c:\MYDB_20061231.bak' WITH INIT so YES it will be
> overwritten
> "Jay" <jay6...@.hotmail.com> wrote in message
> news:1183614106.316025.235930@.j4g2000prf.googlegroups.com...
>
> > OK, does this mean that if I have older backup files like
> > (MYDB_20061231.bak, MYDB_20070101.bak....) they all will be deleted?
> > On Jul 5, 10:18 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> >> Jay
> >> It will NOT clean your entire drive. Think about it, as if you backup
> >> database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
> >> BOL says
> >> INIT
> >> Specifies that all backup sets should be overwritten, but preserves the
> >> media header. If INIT is specified, any existing backup set data on that
> >> device is overwritten.
> >> "Jay" <jay6...@.hotmail.com> wrote in message
> >>news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
> >> > I am using:
> >> > BACKUP DATABASE XXX TO DISK = @.MyFile
> >> > -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> >> > the INIT clause to overwrite the backup media, and write the backup as
> >> > the first file ... ". This sounds like it will clean-up my entire D-
> >> > Drive and then do the backup. It should simply overwrite the specific
> >> > file @.MyFile if it exists. I just want to be a 100% sure before I run
> >> > this command.
> >> > Thanks,
> >> > Jay- Hide quoted text -
> >> - Show quoted text -- Hide quoted text -
> - Show quoted text -

Backup DB to File WITH INIT?

I am using:
BACKUP DATABASE XXX TO DISK = @.MyFile
-- If @.MyFile exists, i want to overwrite it. The help file says "Use
the INIT clause to overwrite the backup media, and write the backup as
the first file ... ". This sounds like it will clean-up my entire D-
Drive and then do the backup. It should simply overwrite the specific
file @.MyFile if it exists. I just want to be a 100% sure before I run
this command.
Thanks,
JayWITH INIT = delete all the backups in your backup device, which is the .BAK
file you specified. This means, everytime you backup, you only have the
backup from the last time the backup command executed.
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
> I am using:
> BACKUP DATABASE XXX TO DISK = @.MyFile
> -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> the INIT clause to overwrite the backup media, and write the backup as
> the first file ... ". This sounds like it will clean-up my entire D-
> Drive and then do the backup. It should simply overwrite the specific
> file @.MyFile if it exists. I just want to be a 100% sure before I run
> this command.
> Thanks,
> Jay
>|||Jay
It will NOT clean your entire drive. Think about it, as if you backup
database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
BOL says
INIT
Specifies that all backup sets should be overwritten, but preserves the
media header. If INIT is specified, any existing backup set data on that
device is overwritten.
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
> I am using:
> BACKUP DATABASE XXX TO DISK = @.MyFile
> -- If @.MyFile exists, i want to overwrite it. The help file says "Use
> the INIT clause to overwrite the backup media, and write the backup as
> the first file ... ". This sounds like it will clean-up my entire D-
> Drive and then do the backup. It should simply overwrite the specific
> file @.MyFile if it exists. I just want to be a 100% sure before I run
> this command.
> Thanks,
> Jay
>|||OK, does this mean that if I have older backup files like
(MYDB_20061231.bak, MYDB_20070101.bak....) they all will be deleted?
On Jul 5, 10:18 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Jay
> It will NOT clean your entire drive. Think about it, as if you backup
> database on C:\ drive BACKUP DATABASE commnad would destroy the OS ?
> BOL says
> INIT
> Specifies that all backup sets should be overwritten, but preserves the
> media header. If INIT is specified, any existing backup set data on that
> device is overwritten.
> "Jay" <jay6...@.hotmail.com> wrote in message
> news:1183609141.844241.152410@.d30g2000prg.googlegroups.com...
>
>
>
>
>
>
> - Show quoted text -|||Jay
if MYDB_20061231.bak contains more than one file and you issue BACKUP
DATABASE db to disk='c:\MYDB_20061231.bak' WITH INIT so YES it will be
overwritten
"Jay" <jay6447@.hotmail.com> wrote in message
news:1183614106.316025.235930@.j4g2000prf.googlegroups.com...
> OK, does this mean that if I have older backup files like
> (MYDB_20061231.bak, MYDB_20070101.bak....) they all will be deleted?
>
> On Jul 5, 10:18 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
>|||OK - thanks. I got it. I didn't know a backup file can contain more
than one backups.
On Jul 5, 10:58 am, "Uri Dimant" <u...@.iscar.co.il> wrote:
> Jay
> if MYDB_20061231.bak contains more than one file and you issue BACKUP
> DATABASE db to disk='c:\MYDB_20061231.bak' WITH INIT so YES it will be
> overwritten
> "Jay" <jay6...@.hotmail.com> wrote in message
> news:1183614106.316025.235930@.j4g2000prf.googlegroups.com...
>
>
>
>
>
>
>
>
>
>
> - Show quoted text -sql

Thursday, March 8, 2012

backup causes file size to grow

I backed up my database using the sql command Backup database xxx to disk = 'yyy'
When it completed the file size of my database approximately tripled. Did I
just corrupt some data? The application appears to continue to run ok. I
have experienced performance problems in the past and assumed it was hardware
related. Maybe my database was just sized too small'?Which file tripled? The database is made up of by default one data file and
one log file. Was it the data or log file that grew? If it was the log
file then you need to know that log backups can not finish during a full
backup. So if your log file was small to begin with and someone did a large
(or lots of ) transactions during the full backup the log file may have had
to grow since it could not be truncated during the full backup.
--
Andrew J. Kelly SQL MVP
"doug" <doug@.discussions.microsoft.com> wrote in message
news:D9566F87-EC93-4950-9B59-0CF936AF0D74@.microsoft.com...
>I backed up my database using the sql command Backup database xxx to disk
>=> 'yyy'
> When it completed the file size of my database approximately tripled. Did
> I
> just corrupt some data? The application appears to continue to run ok. I
> have experienced performance problems in the past and assumed it was
> hardware
> related. Maybe my database was just sized too small'?|||It was the data file (.mdb) that grew. My log file (.ldf) is basically the
same size it was. I went from a 6gb database file to a 20gb database file.
Thanks in advance for any advice.
"Andrew J. Kelly" wrote:
> Which file tripled? The database is made up of by default one data file and
> one log file. Was it the data or log file that grew? If it was the log
> file then you need to know that log backups can not finish during a full
> backup. So if your log file was small to begin with and someone did a large
> (or lots of ) transactions during the full backup the log file may have had
> to grow since it could not be truncated during the full backup.
> --
> Andrew J. Kelly SQL MVP
>
> "doug" <doug@.discussions.microsoft.com> wrote in message
> news:D9566F87-EC93-4950-9B59-0CF936AF0D74@.microsoft.com...
> >I backed up my database using the sql command Backup database xxx to disk
> >=> > 'yyy'
> >
> > When it completed the file size of my database approximately tripled. Did
> > I
> > just corrupt some data? The application appears to continue to run ok. I
> > have experienced performance problems in the past and assumed it was
> > hardware
> > related. Maybe my database was just sized too small'?
>
>|||Are you positive that no one issued an ALTER DATABASE command that may have
grown the file? I have never heard of a db file growing from a backup
before. If it was due to autogrow there should have been lots of log
entries as well.
--
Andrew J. Kelly SQL MVP
"doug" <doug@.discussions.microsoft.com> wrote in message
news:68FFC5B6-9B4B-4194-A360-64FE8B2003AB@.microsoft.com...
> It was the data file (.mdb) that grew. My log file (.ldf) is basically
> the
> same size it was. I went from a 6gb database file to a 20gb database
> file.
> Thanks in advance for any advice.
> "Andrew J. Kelly" wrote:
>> Which file tripled? The database is made up of by default one data file
>> and
>> one log file. Was it the data or log file that grew? If it was the log
>> file then you need to know that log backups can not finish during a full
>> backup. So if your log file was small to begin with and someone did a
>> large
>> (or lots of ) transactions during the full backup the log file may have
>> had
>> to grow since it could not be truncated during the full backup.
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "doug" <doug@.discussions.microsoft.com> wrote in message
>> news:D9566F87-EC93-4950-9B59-0CF936AF0D74@.microsoft.com...
>> >I backed up my database using the sql command Backup database xxx to
>> >disk
>> >=>> > 'yyy'
>> >
>> > When it completed the file size of my database approximately tripled.
>> > Did
>> > I
>> > just corrupt some data? The application appears to continue to run ok.
>> > I
>> > have experienced performance problems in the past and assumed it was
>> > hardware
>> > related. Maybe my database was just sized too small'?
>>|||is this sql 2005, and do you have full-text indexing? If so, expect large
backup files.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"doug" <doug@.discussions.microsoft.com> wrote in message
news:D9566F87-EC93-4950-9B59-0CF936AF0D74@.microsoft.com...
>I backed up my database using the sql command Backup database xxx to disk
>=> 'yyy'
> When it completed the file size of my database approximately tripled. Did
> I
> just corrupt some data? The application appears to continue to run ok. I
> have experienced performance problems in the past and assumed it was
> hardware
> related. Maybe my database was just sized too small'?

backup causes file size to grow

I backed up my database using the sql command Backup database xxx to disk =
'yyy'
When it completed the file size of my database approximately tripled. Did I
just corrupt some data? The application appears to continue to run ok. I
have experienced performance problems in the past and assumed it was hardwar
e
related. Maybe my database was just sized too small'?Which file tripled? The database is made up of by default one data file and
one log file. Was it the data or log file that grew? If it was the log
file then you need to know that log backups can not finish during a full
backup. So if your log file was small to begin with and someone did a large
(or lots of ) transactions during the full backup the log file may have had
to grow since it could not be truncated during the full backup.
Andrew J. Kelly SQL MVP
"doug" <doug@.discussions.microsoft.com> wrote in message
news:D9566F87-EC93-4950-9B59-0CF936AF0D74@.microsoft.com...
>I backed up my database using the sql command Backup database xxx to disk
>=
> 'yyy'
> When it completed the file size of my database approximately tripled. Did
> I
> just corrupt some data? The application appears to continue to run ok. I
> have experienced performance problems in the past and assumed it was
> hardware
> related. Maybe my database was just sized too small'?|||It was the data file (.mdb) that grew. My log file (.ldf) is basically the
same size it was. I went from a 6gb database file to a 20gb database file.
Thanks in advance for any advice.
"Andrew J. Kelly" wrote:

> Which file tripled? The database is made up of by default one data file a
nd
> one log file. Was it the data or log file that grew? If it was the log
> file then you need to know that log backups can not finish during a full
> backup. So if your log file was small to begin with and someone did a lar
ge
> (or lots of ) transactions during the full backup the log file may have ha
d
> to grow since it could not be truncated during the full backup.
> --
> Andrew J. Kelly SQL MVP
>
> "doug" <doug@.discussions.microsoft.com> wrote in message
> news:D9566F87-EC93-4950-9B59-0CF936AF0D74@.microsoft.com...
>
>|||Are you positive that no one issued an ALTER DATABASE command that may have
grown the file? I have never heard of a db file growing from a backup
before. If it was due to autogrow there should have been lots of log
entries as well.
Andrew J. Kelly SQL MVP
"doug" <doug@.discussions.microsoft.com> wrote in message
news:68FFC5B6-9B4B-4194-A360-64FE8B2003AB@.microsoft.com...[vbcol=seagreen]
> It was the data file (.mdb) that grew. My log file (.ldf) is basically
> the
> same size it was. I went from a 6gb database file to a 20gb database
> file.
> Thanks in advance for any advice.
> "Andrew J. Kelly" wrote:
>|||is this sql 2005, and do you have full-text indexing? If so, expect large
backup files.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"doug" <doug@.discussions.microsoft.com> wrote in message
news:D9566F87-EC93-4950-9B59-0CF936AF0D74@.microsoft.com...
>I backed up my database using the sql command Backup database xxx to disk
>=
> 'yyy'
> When it completed the file size of my database approximately tripled. Did
> I
> just corrupt some data? The application appears to continue to run ok. I
> have experienced performance problems in the past and assumed it was
> hardware
> related. Maybe my database was just sized too small'?