April 30, 2008 at 4:24 am
Our client is having a database and its size is around 4GB and it is still growing.
Now my problem is
When i want to execute a Sql batch file (Which contains various DDL and DML commands), it may be of thousands of lines.
And while executing, mean while if any exception or arise ,then it leaves my database in inconsisten state.
What i want is to restore database to its as is positon means at the state before excuting SQL batch file.
Then what could be the possible solution in this case.
I dont want to take full backup before executing this batch file.
Database is Sql server 2000
May 1, 2008 at 8:48 am
Have you ever try to set ISOLATION LEVEL? Its syntax is below.
SET TRANSACTION ISOLATION LEVEL
{ READ COMMITTED
| READ UNCOMMITTED
| REPEATABLE READ
| SERIALIZABLE
}
May 2, 2008 at 8:57 am
Personally, if I am modifying a production database, I ALWAYS take a full backup prior to the execution of the scripts. What is the rational to "I dont want to take full backup before executing this batch file", especially if your script may be thousands of lines? Time alloted for a backup? How do you revert back if something goes terribly wrong but you don't find the issue until later?
-- You can't be late until you show up.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply