Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Reset database

Author  Topic 

IanKM
Starting Member

18 Posts

Posted - 2011-10-18 : 06:59:58
Hi there

I hope you don't mind but I there i have a couple of questions. firstly is there a way of resetting the database to start from fresh.

Also i for one of my fields i want to use an int with the max value of 3 is there a way of doing this no biggie if there isn't i can make sure that no value over 3 is added.

FYI im using sql Server 2008 and SQL SMSE 2008

i hope that some1 can help regards

Kind regards Ian

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-10-18 : 07:10:13
Depends what you mean - just drop and recreate or restore from backup maybe.

Check constraint for the max value.



==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

IanKM
Starting Member

18 Posts

Posted - 2011-10-18 : 10:48:04
Hi Nigel

drop and re-create would probably what i want. is there an easy way to do that

regards
Go to Top of Page

chris_cs
Posting Yak Master

223 Posts

Posted - 2011-10-18 : 11:27:51
You could use DROP DATABASE nameOfDB (Making sure you have a full backup first!!!!)

Look in BOL for the Restore command to then restore the database from your backup.

----------------------------
Junior DBA learning the ropes
Go to Top of Page
   

- Advertisement -