Showing posts with label reset. Show all posts
Showing posts with label reset. Show all posts

Friday, March 30, 2012

How can i reset the Primary key field numbers to zero before uploading my site to the prod

I have been testing my database application for a while now. As a result i have a lot of records already with their respective identity field values. What i want to do is to reset this field to 0 (zero) before i deploy the aplication. I have tried deleting all the records and entered one to see if the id will be 1 but it still starts from where it was before i deleted the records. Any ideas.DBCC CHECKIDENT (tableName, RESEED, 0)|||

usingtruncate tablewill help you.

thanks,

satish.

sql

How can I reset a database surrogate PK using SSIS?

I have a database surrogate key that increments so rapidly (+5000 every 30 mins). I need my SSIS package to reset this database surrogate key to avoid reaching an upper limit value for that field.

How can I do that using SSIS package?

thanks,

Aref

A quick Google revelas that you can use DBCC CHECKIDENT to do this

http://www.mssqlcity.com/FAQ/Devel/reset_identity_column.htm

You can issue the command using the Execute SQL Task.

-Jamie

Wednesday, March 28, 2012

How Can I recover the SA password?

Hi
I´m the SQL administrator, and I want recover the SA password, I do not want
reset it, I want recover.
Thanks and have a nice dayI've never done it but here:
http://www.derkeiler.com/Newsgroups/microsoft.public.sqlserver.security/200=
3-03/0790.html
On Oct 10, 3:24 pm, Oseas Millan
<OseasMil...@.discussions.microsoft.com> wrote:
> Hi
> I=B4m the SQL administrator, and I want recover the SA password, I do not= want
> reset it, I want recover.
> Thanks and have a nice day|||Thanks Pawn.
Let me try
"Pawn" wrote:
> I've never done it but here:
> http://www.derkeiler.com/Newsgroups/microsoft.public.sqlserver.security/2003-03/0790.html
> On Oct 10, 3:24 pm, Oseas Millan
> <OseasMil...@.discussions.microsoft.com> wrote:
> > Hi
> >
> > I´m the SQL administrator, and I want recover the SA password, I do not want
> > reset it, I want recover.
> >
> > Thanks and have a nice day
>
>