SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Power Shell Connection with Isolation level
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

10 Posts

Posted - 03/07/2013 :  17:07:58  Show Profile  Reply with Quote
Is it possible to set an isolation level when connecting with powershell. This is for SQL 2008r2. I want to connect at the snapshot level then issue several BCP out statements (one per table)
Is it possible?


Embarcadero/SQL Server/and now... Informatica

Most Valuable Yak

15720 Posts

Posted - 03/07/2013 :  17:25:05  Show Profile  Visit robvolk's Homepage  Reply with Quote
You'd have to use bcp with the queryout option and specify the isolation level in the query expression, for each bcp that you run. I'm not even sure SET TRANSACTION ISOLATION LEVEL will work in that context, but it definitely can't be set one time for an entire batch of bcp commands.

Another option is to set the database to READ COMMITTED SNAPSHOT, that way you'll get snapshot isolation by default.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000