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.
| Author |
Topic |
|
bharatg
Starting Member
6 Posts |
Posted - 2005-04-04 : 12:41:44
|
| I have a few bcp statements from multiple tables that i execute from a driver (e.g. a script). What I want to achieve is rollback in case any of those statements fail while importing data. For e.g. if import into table 1-3 is successful, but that to table 4 fails for whatever reasons, I would like rollback for inserted data in tables 1-3.Any ideas on how this can be achieved? Does bcp have any thing to support multiple tables?Thanks,Bharat |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-04-04 : 23:41:36
|
| I don't know of a way to do this with bcp. (Anyone else????)You can do this with BULK INSERT though IF the database is set to full recovery mode. A word of warning on this though...by having the server in full recovery mode, you are still having to write the entire operation to the log files. This can create quite an additional load and a possible bottleneck on the server.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|