Is there a way besides truncate table to reset the identity column of a tabl
e?
Thanks,
JoeLook at DBCC CHECKIDENT in Books Online.
"jaylou" <jaylou@.discussions.microsoft.com> wrote in message
news:109E8A34-65B2-4E8D-8FA3-C99D00C25D20@.microsoft.com...
> Is there a way besides truncate table to reset the identity column of a
> table?
> Thanks,
> Joe
>|||Jaylou,
Yes. DBCC CHECKIDENT ...RESEED argument.
HTH
Jerry
"jaylou" <jaylou@.discussions.microsoft.com> wrote in message
news:109E8A34-65B2-4E8D-8FA3-C99D00C25D20@.microsoft.com...
> Is there a way besides truncate table to reset the identity column of a
> table?
> Thanks,
> Joe
>|||Thank you!
I knew there was something but I couldn't find it.|||Thank you!
I knew there was something but I couldn't find it.
Showing posts with label truncate. Show all posts
Showing posts with label truncate. Show all posts
Wednesday, March 28, 2012
Monday, March 26, 2012
Reseting Identity Seed
hi all..
I want to reset the identity seed value for a table... How can I do that...
one method is to truncate table... but if table is used as parent in foreign
key relationship; it does not allow to truncate the table... any other
method?
Ansari
Check out DBCC CHECKIDENT.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ansari" <mudasar_ansari@.yahoo.com> wrote in message news:uf4BRq4AFHA.4028@.TK2MSFTNGP15.phx.gbl...
> hi all..
>
> I want to reset the identity seed value for a table... How can I do that...
> one method is to truncate table... but if table is used as parent in foreign
> key relationship; it does not allow to truncate the table... any other
> method?
> Ansari
>
>
I want to reset the identity seed value for a table... How can I do that...
one method is to truncate table... but if table is used as parent in foreign
key relationship; it does not allow to truncate the table... any other
method?
Ansari
Check out DBCC CHECKIDENT.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ansari" <mudasar_ansari@.yahoo.com> wrote in message news:uf4BRq4AFHA.4028@.TK2MSFTNGP15.phx.gbl...
> hi all..
>
> I want to reset the identity seed value for a table... How can I do that...
> one method is to truncate table... but if table is used as parent in foreign
> key relationship; it does not allow to truncate the table... any other
> method?
> Ansari
>
>
Reseting Identity Seed
hi all..
I want to reset the identity seed value for a table... How can I do that...
one method is to truncate table... but if table is used as parent in foreign
key relationship; it does not allow to truncate the table... any other
method?
AnsariCheck out DBCC CHECKIDENT.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ansari" <mudasar_ansari@.yahoo.com> wrote in message news:uf4BRq4AFHA.4028@.TK2MSFTNGP15.phx.
gbl...
> hi all..
>
> I want to reset the identity seed value for a table... How can I do that..
.
> one method is to truncate table... but if table is used as parent in forei
gn
> key relationship; it does not allow to truncate the table... any other
> method?
> Ansari
>
>
I want to reset the identity seed value for a table... How can I do that...
one method is to truncate table... but if table is used as parent in foreign
key relationship; it does not allow to truncate the table... any other
method?
AnsariCheck out DBCC CHECKIDENT.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ansari" <mudasar_ansari@.yahoo.com> wrote in message news:uf4BRq4AFHA.4028@.TK2MSFTNGP15.phx.
gbl...
> hi all..
>
> I want to reset the identity seed value for a table... How can I do that..
.
> one method is to truncate table... but if table is used as parent in forei
gn
> key relationship; it does not allow to truncate the table... any other
> method?
> Ansari
>
>
Reseting Identity Seed
hi all..
I want to reset the identity seed value for a table... How can I do that...
one method is to truncate table... but if table is used as parent in foreign
key relationship; it does not allow to truncate the table... any other
method?
AnsariCheck out DBCC CHECKIDENT.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ansari" <mudasar_ansari@.yahoo.com> wrote in message news:uf4BRq4AFHA.4028@.TK2MSFTNGP15.phx.gbl...
> hi all..
>
> I want to reset the identity seed value for a table... How can I do that...
> one method is to truncate table... but if table is used as parent in foreign
> key relationship; it does not allow to truncate the table... any other
> method?
> Ansari
>
>
I want to reset the identity seed value for a table... How can I do that...
one method is to truncate table... but if table is used as parent in foreign
key relationship; it does not allow to truncate the table... any other
method?
AnsariCheck out DBCC CHECKIDENT.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ansari" <mudasar_ansari@.yahoo.com> wrote in message news:uf4BRq4AFHA.4028@.TK2MSFTNGP15.phx.gbl...
> hi all..
>
> I want to reset the identity seed value for a table... How can I do that...
> one method is to truncate table... but if table is used as parent in foreign
> key relationship; it does not allow to truncate the table... any other
> method?
> Ansari
>
>
reset the log file size
hi ,
the log file of a DB has grown in size. i need to now truncate this file and
reset the log file size.
the db has been configured for unrestricted file growth by 10% for the log
file.
how do i do this.
rgds,
anuAnu,
See if the following helps:
http://support.microsoft.com/defaul...kb;en-us;272318
BG, SQL Server MVP
www.SolidQualityLearning.com
"Anuradha" <Anuradha@.discussions.microsoft.com> wrote in message
news:A838D0B8-C48A-4B1B-822F-E0773EBDCEBB@.microsoft.com...
> hi ,
> the log file of a DB has grown in size. i need to now truncate this file
> and
> reset the log file size.
> the db has been configured for unrestricted file growth by 10% for the log
> file.
> how do i do this.
> rgds,
> anu|||What recovery model is the database in?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Anuradha" <Anuradha@.discussions.microsoft.com> wrote in message
news:A838D0B8-C48A-4B1B-822F-E0773EBDCEBB@.microsoft.com...
> hi ,
> the log file of a DB has grown in size. i need to now truncate this file a
nd
> reset the log file size.
> the db has been configured for unrestricted file growth by 10% for the log
> file.
> how do i do this.
> rgds,
> anu
the log file of a DB has grown in size. i need to now truncate this file and
reset the log file size.
the db has been configured for unrestricted file growth by 10% for the log
file.
how do i do this.
rgds,
anuAnu,
See if the following helps:
http://support.microsoft.com/defaul...kb;en-us;272318
BG, SQL Server MVP
www.SolidQualityLearning.com
"Anuradha" <Anuradha@.discussions.microsoft.com> wrote in message
news:A838D0B8-C48A-4B1B-822F-E0773EBDCEBB@.microsoft.com...
> hi ,
> the log file of a DB has grown in size. i need to now truncate this file
> and
> reset the log file size.
> the db has been configured for unrestricted file growth by 10% for the log
> file.
> how do i do this.
> rgds,
> anu|||What recovery model is the database in?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Anuradha" <Anuradha@.discussions.microsoft.com> wrote in message
news:A838D0B8-C48A-4B1B-822F-E0773EBDCEBB@.microsoft.com...
> hi ,
> the log file of a DB has grown in size. i need to now truncate this file a
nd
> reset the log file size.
> the db has been configured for unrestricted file growth by 10% for the log
> file.
> how do i do this.
> rgds,
> anu
Subscribe to:
Posts (Atom)