posts from diigo 06/30/2012

    • EXEC master..xp_cmdshell 'bcp Daatabase.[dbo].[Table] in "TableContent.dat" -T -c -S$(TargetServer)

        

       
      This is a scenario we had at a client recently, where they used the BCP utility to bulk insert lots of data into a few tables as part of the deployment.   
      To be able to run BCP against different target servers (dev, test etc) in my build, I used the SQLCMD variable.

        

      When you publish your database from Visual Studio, it will prompt you to give the variables a value. But when deploying from a build, the value need  
      to be set per configuration. This is done by opening the publish profile file for the target environment and store that value there:  

Posted from Diigo. The rest of my favorite links are here.

Advertisements

About sandykwok

Live with dream and passion Pursue the desire deep in my heart. A girl love fancy food,communicating with each other and go hiking. Sometimes got lost in thinking serious things.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s