Friday, March 23, 2012
How can I back up to a device with out over writing the last backu
database's to a device,,which works fine but it over writes the files in the
directory. The code i am using is
BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , N
AME =
N'my backup', NOSKIP , STATS = 10, NOFORMAT
Can anyone please help me with this, I tried using a mapped drive but that
does not work. Is there any way I can use a maint plan to back up to a devic
e
and not over write the last back up file? in the use this directory can I us
e
the unc?It WILL overwrite the old since you give same name to the backup file. You
must figure out another way to work for you. My backup will write to a
folder depend on what day of the week. So I always have a 7 days of backup.
hth,
"DAVID S" <DAVIDS@.discussions.microsoft.com> wrote in message
news:254A39AA-C621-43B9-A12B-78AFCBF23F8F@.microsoft.com...
>I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> database's to a device,,which works fine but it over writes the files in
> the
> directory. The code i am using is
> BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD ,
NAME =
> N'my backup', NOSKIP , STATS = 10, NOFORMAT
> Can anyone please help me with this, I tried using a mapped drive but that
> does not work. Is there any way I can use a maint plan to back up to a
> device
> and not over write the last back up file? in the use this directory can I
> use
> the unc?
>|||The answer to my question is yes you can use the unc path in the use this
dircetory. but I still don't know about the device over write problem.
"DAVID S" wrote:
> I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> database's to a device,,which works fine but it over writes the files in t
he
> directory. The code i am using is
> BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD ,
NAME =
> N'my backup', NOSKIP , STATS = 10, NOFORMAT
> Can anyone please help me with this, I tried using a mapped drive but tha
t
> does not work. Is there any way I can use a maint plan to back up to a dev
ice
> and not over write the last back up file? in the use this directory can I
use
> the unc?
>|||NOINIT means append and INIT means overwrite. Your statement posted will app
end.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DAVID S" <DAVIDS@.discussions.microsoft.com> wrote in message
news:254A39AA-C621-43B9-A12B-78AFCBF23F8F@.microsoft.com...
>I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> database's to a device,,which works fine but it over writes the files in t
he
> directory. The code i am using is
> BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD ,
NAME =
> N'my backup', NOSKIP , STATS = 10, NOFORMAT
> Can anyone please help me with this, I tried using a mapped drive but that
> does not work. Is there any way I can use a maint plan to back up to a dev
ice
> and not over write the last back up file? in the use this directory can I
use
> the unc?
>
How can I back up to a device with out over writing the last backu
database's to a device,,which works fine but it over writes the files in the
directory. The code i am using is
BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME =
N'my backup', NOSKIP , STATS = 10, NOFORMAT
Can anyone please help me with this, I tried using a mapped drive but that
does not work. Is there any way I can use a maint plan to back up to a device
and not over write the last back up file? in the use this directory can I use
the unc?
It WILL overwrite the old since you give same name to the backup file. You
must figure out another way to work for you. My backup will write to a
folder depend on what day of the week. So I always have a 7 days of backup.
hth,
"DAVID S" <DAVIDS@.discussions.microsoft.com> wrote in message
news:254A39AA-C621-43B9-A12B-78AFCBF23F8F@.microsoft.com...
>I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> database's to a device,,which works fine but it over writes the files in
> the
> directory. The code i am using is
> BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME =
> N'my backup', NOSKIP , STATS = 10, NOFORMAT
> Can anyone please help me with this, I tried using a mapped drive but that
> does not work. Is there any way I can use a maint plan to back up to a
> device
> and not over write the last back up file? in the use this directory can I
> use
> the unc?
>
|||The answer to my question is yes you can use the unc path in the use this
dircetory. but I still don't know about the device over write problem.
"DAVID S" wrote:
> I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> database's to a device,,which works fine but it over writes the files in the
> directory. The code i am using is
> BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME =
> N'my backup', NOSKIP , STATS = 10, NOFORMAT
> Can anyone please help me with this, I tried using a mapped drive but that
> does not work. Is there any way I can use a maint plan to back up to a device
> and not over write the last back up file? in the use this directory can I use
> the unc?
>
|||NOINIT means append and INIT means overwrite. Your statement posted will append.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DAVID S" <DAVIDS@.discussions.microsoft.com> wrote in message
news:254A39AA-C621-43B9-A12B-78AFCBF23F8F@.microsoft.com...
>I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> database's to a device,,which works fine but it over writes the files in the
> directory. The code i am using is
> BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME =
> N'my backup', NOSKIP , STATS = 10, NOFORMAT
> Can anyone please help me with this, I tried using a mapped drive but that
> does not work. Is there any way I can use a maint plan to back up to a device
> and not over write the last back up file? in the use this directory can I use
> the unc?
>
How can I back up to a device with out over writing the last backu
database's to a device,,which works fine but it over writes the files in the
directory. The code i am using is
BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME = N'my backup', NOSKIP , STATS = 10, NOFORMAT
Can anyone please help me with this, I tried using a mapped drive but that
does not work. Is there any way I can use a maint plan to back up to a device
and not over write the last back up file? in the use this directory can I use
the unc?It WILL overwrite the old since you give same name to the backup file. You
must figure out another way to work for you. My backup will write to a
folder depend on what day of the week. So I always have a 7 days of backup.
hth,
"DAVID S" <DAVIDS@.discussions.microsoft.com> wrote in message
news:254A39AA-C621-43B9-A12B-78AFCBF23F8F@.microsoft.com...
>I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> database's to a device,,which works fine but it over writes the files in
> the
> directory. The code i am using is
> BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME => N'my backup', NOSKIP , STATS = 10, NOFORMAT
> Can anyone please help me with this, I tried using a mapped drive but that
> does not work. Is there any way I can use a maint plan to back up to a
> device
> and not over write the last back up file? in the use this directory can I
> use
> the unc?
>|||The answer to my question is yes you can use the unc path in the use this
dircetory. but I still don't know about the device over write problem.
"DAVID S" wrote:
> I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> database's to a device,,which works fine but it over writes the files in the
> directory. The code i am using is
> BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME => N'my backup', NOSKIP , STATS = 10, NOFORMAT
> Can anyone please help me with this, I tried using a mapped drive but that
> does not work. Is there any way I can use a maint plan to back up to a device
> and not over write the last back up file? in the use this directory can I use
> the unc?
>|||Have you thought of using RETAINDAYS parameter in your backup statement.
Check BOL...
Thanks
GYK
"DAVID S" wrote:
> The answer to my question is yes you can use the unc path in the use this
> dircetory. but I still don't know about the device over write problem.
> "DAVID S" wrote:
> > I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> > database's to a device,,which works fine but it over writes the files in the
> > directory. The code i am using is
> >
> > BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME => > N'my backup', NOSKIP , STATS = 10, NOFORMAT
> >
> > Can anyone please help me with this, I tried using a mapped drive but that
> > does not work. Is there any way I can use a maint plan to back up to a device
> > and not over write the last back up file? in the use this directory can I use
> > the unc?
> >
> >|||Yes and it did not work.. but thank you for responding
"GYK" wrote:
> Have you thought of using RETAINDAYS parameter in your backup statement.
> Check BOL...
> Thanks
> GYK
> "DAVID S" wrote:
> > The answer to my question is yes you can use the unc path in the use this
> > dircetory. but I still don't know about the device over write problem.
> >
> > "DAVID S" wrote:
> >
> > > I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> > > database's to a device,,which works fine but it over writes the files in the
> > > directory. The code i am using is
> > >
> > > BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME => > > N'my backup', NOSKIP , STATS = 10, NOFORMAT
> > >
> > > Can anyone please help me with this, I tried using a mapped drive but that
> > > does not work. Is there any way I can use a maint plan to back up to a device
> > > and not over write the last back up file? in the use this directory can I use
> > > the unc?
> > >
> > >|||Try removing the name = N'my backup'... leave it blank and try...
Thanks
GYK
"DAVID S" wrote:
> Yes and it did not work.. but thank you for responding
> "GYK" wrote:
> > Have you thought of using RETAINDAYS parameter in your backup statement.
> > Check BOL...
> >
> > Thanks
> > GYK
> >
> > "DAVID S" wrote:
> >
> > > The answer to my question is yes you can use the unc path in the use this
> > > dircetory. but I still don't know about the device over write problem.
> > >
> > > "DAVID S" wrote:
> > >
> > > > I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> > > > database's to a device,,which works fine but it over writes the files in the
> > > > directory. The code i am using is
> > > >
> > > > BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME => > > > N'my backup', NOSKIP , STATS = 10, NOFORMAT
> > > >
> > > > Can anyone please help me with this, I tried using a mapped drive but that
> > > > does not work. Is there any way I can use a maint plan to back up to a device
> > > > and not over write the last back up file? in the use this directory can I use
> > > > the unc?
> > > >
> > > >|||NOINIT means append and INIT means overwrite. Your statement posted will append.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"DAVID S" <DAVIDS@.discussions.microsoft.com> wrote in message
news:254A39AA-C621-43B9-A12B-78AFCBF23F8F@.microsoft.com...
>I am using sql2000 sp3 on windows 2003 server. I am trying to back up my
> database's to a device,,which works fine but it over writes the files in the
> directory. The code i am using is
> BACKUP DATABASE [mydb] TO [mydbbackup] WITH NOINIT , NOUNLOAD , NAME => N'my backup', NOSKIP , STATS = 10, NOFORMAT
> Can anyone please help me with this, I tried using a mapped drive but that
> does not work. Is there any way I can use a maint plan to back up to a device
> and not over write the last back up file? in the use this directory can I use
> the unc?
>
How can I avoid table lock in SQL2000?
I have a very large table (16Mil+ records), for which I want to delete
about 8 Million records. There are a few indexes on this table.
Is there a way that I can run either a query or a series of queries
that will run against each record and delete based on criteria (date)?
If I do a single DELETE query, it will take forever, lock the table,
and my app that runs against it will stop INSERTING, which is bad.
If I do a cursor, I think it locks the table also, so that won't do,
right?
Any help would be appreciated.
Glenn Dekhayser
Contentcatcher.comOn 15 Feb 2005 13:19:01 -0800, "gdekhayser" <gdekhayser@.voyantinc.com> wrote:
>To any and all;
>I have a very large table (16Mil+ records), for which I want to delete
>about 8 Million records. There are a few indexes on this table.
>Is there a way that I can run either a query or a series of queries
>that will run against each record and delete based on criteria (date)?
> If I do a single DELETE query, it will take forever, lock the table,
>and my app that runs against it will stop INSERTING, which is bad.
>If I do a cursor, I think it locks the table also, so that won't do,
>right?
>Any help would be appreciated.
>Glenn Dekhayser
>Contentcatcher.com
With a table that size, have you thought of partitioning it by date? Then,
locks would be held only on the partition(s) that overlap the date range you
are deleting.|||Right, but I need to deal with the records in place before I can do
that...don't I? Once I get the table down in size to something
rational, then I can partition it...|||gdekhayser (gdekhayser@.voyantinc.com) writes:
> I have a very large table (16Mil+ records), for which I want to delete
> about 8 Million records. There are a few indexes on this table.
> Is there a way that I can run either a query or a series of queries
> that will run against each record and delete based on criteria (date)?
> If I do a single DELETE query, it will take forever, lock the table,
> and my app that runs against it will stop INSERTING, which is bad.
> If I do a cursor, I think it locks the table also, so that won't do,
> right?
First of all, if there is no index on this date column, you can never
avoid the table lock.
If there is a clustered index on the date column, you should be able
to say DELETE tbl "WHERE date < @.somedateinthepast" and still have
your insertes coming through. Then again, if you delete day by day,
it may still be leaner.
If there is a non-clustered index on date, it depends on how many
rows there are per date. If there are too many rows per date, a
DELETE per date could table-scan. You could force an index, but
plenty of rows would be locked, for some time.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||For the future, you should consider partitioning , as deleting n
records is o(n) while dropping a table (or truncating it) is O(1).
For now , I would recommend deleting with rowcount< some number ,
probably in the low thousands, which should leave the table in a fairly
operational state while you do it.
Of course after such a massive delete, the table will be in a terribly
fragmented state internally, so the next step is to rebuild the
indexes.
another alternative is to create another table with the same schema but
without the indexes, insert into it the rows that you do want to keep
(the complement of the 'to be deleted') and then build the indexes. you
can then drop the old table and rename the new one.
hope this helps
Tzvika
gdekhayser wrote:
> To any and all;
> I have a very large table (16Mil+ records), for which I want to
delete
> about 8 Million records. There are a few indexes on this table.
> Is there a way that I can run either a query or a series of queries
> that will run against each record and delete based on criteria
(date)?
> If I do a single DELETE query, it will take forever, lock the table,
> and my app that runs against it will stop INSERTING, which is bad.
> If I do a cursor, I think it locks the table also, so that won't do,
> right?
> Any help would be appreciated.
> Glenn Dekhayser
> Contentcatcher.com|||Erland- I wish I would have read your post earlier. I would have
thought that removing the indexes would make the delete faster. I
goofed and left the 4 indexes in place, the date one wasn't clustered.
I really wouldn't have cared about the row locks if I forced an index,
as they were going to be deleted anyway and not accessed.
I ended up just performing the delete- and watching my logs grow REAL
large.
I now have 3 log files where I really only want one- is there a way to
condense back into one log file when you're split into 3?|||gdekhayser (gdekhayser@.voyantinc.com) writes:
> Erland- I wish I would have read your post earlier. I would have
> thought that removing the indexes would make the delete faster.
Yeah, removing the indexes not useful for the DELETE would have speedied
things up a little. It may not be a good idea to drop the clustered index
though.
> I ended up just performing the delete- and watching my logs grow REAL
> large.
> I now have 3 log files where I really only want one- is there a way to
> condense back into one log file when you're split into 3?
Well, you can say ALTER DATABASE REMOVE FILE, but you would have to
truncate the log first. Maybe the best is to use WITH TRUNCATE_ONLY
and the take a full backup of the database. I guess that then you
should be able to remove some of the files.
But I will have to admit that I have never had reason to drop a log
file, so I am just speculating here.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
Wednesday, March 21, 2012
How can i attach a SQLServer2005 db to an instance of SQLServer 2000?
Short answer: you can't :-(
Once you have attached it to SQL Server 2005 it is no longer compatible with the SQL Server 2000 file format.
Wednesday, March 7, 2012
how about the "spinloop" in sql2000
I'm not sure what your specific question is, but SPINLOOP is an internal wait type in SQL Server for a synchronization object. My experience suggests that you should not see this on a frequent basis on your server unless there are other, more serious problems. I'd recommend getting in touch with SQL Product Support to investigate if this is the case.
Thanks,
Ryan Stonecipher
Microsoft SQL Server Storage Engine.
<msnews.microsoft.com> wrote in message news:eTo$YO8QEHA.1276@.TK2MSFTNGP11.phx.gbl...
thx
how about the "spinloop" in sql2000
t type in SQL Server for a synchronization object. My experience suggests t
hat you should not see this on a frequent basis on your server unless there
are other, more serious problems. I'd recommend getting in touch with SQL P
roduct Support to investigate if this is the case.
Thanks,
Ryan Stonecipher
Microsoft SQL Server Storage Engine.
<msnews.microsoft.com> wrote in message news:eTo$YO8QEHA.1276@.TK2MSFTNGP11.p
hx.gbl...
thx
how about the "spinloop" in sql2000
--=_NextPart_000_0060_01C443E7.6BA15CA0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
I'm not sure what your specific question is, but SPINLOOP is an internal =wait type in SQL Server for a synchronization object. My experience =suggests that you should not see this on a frequent basis on your server =unless there are other, more serious problems. I'd recommend getting in =touch with SQL Product Support to investigate if this is the case.
Thanks,
Ryan Stonecipher
Microsoft SQL Server Storage Engine.
<msnews.microsoft.com> wrote in message =news:eTo$YO8QEHA.1276@.TK2MSFTNGP11.phx.gbl...
thx
--=_NextPart_000_0060_01C443E7.6BA15CA0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
I'm not sure what your specific =question is, but SPINLOOP is an internal wait type in SQL Server for a synchronization object. My experience suggests that you should not see this on a =frequent basis on your server unless there are other, more serious =problems. I'd recommend getting in touch with SQL Product Support to investigate if =this is the case.
Thanks,
Ryan Stonecipher
Microsoft SQL Server Storage Engine.
wrote in message news:eTo$YO8QEHA.1276=@.TK2MSFTNGP11.phx.gbl...
thx
--=_NextPart_000_0060_01C443E7.6BA15CA0--
Friday, February 24, 2012
Hotfix contents
Does anyone know a source for the contents of the SQL Hotfix which updates SQL2000 to version 8.00.919? I have the hotfix and ran it on a development SQL server but I cannot find a definitive list of the contents. I've been given one article from microsof
t (http://support.microsoft.com/default...b;en-us;837957) but I believe there are more fixes contained therein (I'd hope so at >17mb). I couldn't find anything on knowledge base or technet.
Thanks
DaveK
http://www.sqlporn.co.uk
If you look at the list of files in 837957, I can certainly see that the
updated files add up to at least 17mb uncompressed.
Keep in mind that a certain patch level does not contain just that patch,
but it is cumulative (so that if you thought you needed to apply 918, for
example, you wouldn't have to because it's already there). I keep a list of
the hotfixes at http://www.aspfaq.com/2160 so you can browse through those
other KBs to see what other symptoms were fixed between build 760 and build
919.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"DaveK" <anonymous@.discussions.microsoft.com> wrote in message
news:5BD0BDC4-A4D1-422B-9785-1BF224E167EF@.microsoft.com...
> Hi,
> Does anyone know a source for the contents of the SQL Hotfix which updates
SQL2000 to version 8.00.919? I have the hotfix and ran it on a development
SQL server but I cannot find a definitive list of the contents. I've been
given one article from microsoft
(http://support.microsoft.com/default...b;en-us;837957) but I
believe there are more fixes contained therein (I'd hope so at >17mb). I
couldn't find anything on knowledge base or technet.
> Thanks
> DaveK
> http://www.sqlporn.co.uk
Hotfix contents
Does anyone know a source for the contents of the SQL Hotfix which updates SQL2000 to version 8.00.919? I have the hotfix and ran it on a development SQL server but I cannot find a definitive list of the contents. I've been given one article from microsoft (http://support.microsoft.com/default.aspx?scid=kb;en-us;837957) but I believe there are more fixes contained therein (I'd hope so at >17mb). I couldn't find anything on knowledge base or technet
Thank
Dave
http://www.sqlporn.co.ukIf you look at the list of files in 837957, I can certainly see that the
updated files add up to at least 17mb uncompressed.
Keep in mind that a certain patch level does not contain just that patch,
but it is cumulative (so that if you thought you needed to apply 918, for
example, you wouldn't have to because it's already there). I keep a list of
the hotfixes at http://www.aspfaq.com/2160 so you can browse through those
other KBs to see what other symptoms were fixed between build 760 and build
919.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"DaveK" <anonymous@.discussions.microsoft.com> wrote in message
news:5BD0BDC4-A4D1-422B-9785-1BF224E167EF@.microsoft.com...
> Hi,
> Does anyone know a source for the contents of the SQL Hotfix which updates
SQL2000 to version 8.00.919? I have the hotfix and ran it on a development
SQL server but I cannot find a definitive list of the contents. I've been
given one article from microsoft
(http://support.microsoft.com/default.aspx?scid=kb;en-us;837957) but I
believe there are more fixes contained therein (I'd hope so at >17mb). I
couldn't find anything on knowledge base or technet.
> Thanks
> DaveK
> http://www.sqlporn.co.uk
Hotfix contents
Does anyone know a source for the contents of the SQL Hotfix which updates S
QL2000 to version 8.00.919? I have the hotfix and ran it on a development SQ
L server but I cannot find a definitive list of the contents. I've been give
n one article from microsof
t (http://support.microsoft.com/defaul...kb;en-us;837957) but I bel
ieve there are more fixes contained therein (I'd hope so at >17mb). I couldn
't find anything on knowledge base or technet.
Thanks
DaveK
http://www.sqlporn.co.ukIf you look at the list of files in 837957, I can certainly see that the
updated files add up to at least 17mb uncompressed.
Keep in mind that a certain patch level does not contain just that patch,
but it is cumulative (so that if you thought you needed to apply 918, for
example, you wouldn't have to because it's already there). I keep a list of
the hotfixes at http://www.aspfaq.com/2160 so you can browse through those
other KBs to see what other symptoms were fixed between build 760 and build
919.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"DaveK" <anonymous@.discussions.microsoft.com> wrote in message
news:5BD0BDC4-A4D1-422B-9785-1BF224E167EF@.microsoft.com...
> Hi,
> Does anyone know a source for the contents of the SQL Hotfix which updates
SQL2000 to version 8.00.919? I have the hotfix and ran it on a development
SQL server but I cannot find a definitive list of the contents. I've been
given one article from microsoft
(http://support.microsoft.com/defaul...kb;en-us;837957) but I
believe there are more fixes contained therein (I'd hope so at >17mb). I
couldn't find anything on knowledge base or technet.
> Thanks
> DaveK
> http://www.sqlporn.co.uk