| Author |
Topic |
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-14 : 10:36:35
|
| I'm on a roll today.I'm try9ing to BCP out some data. the bcp function reports it's running sucessfully, but i'm not seeing the output in any of the locations i'm specifying. The report provided looks thusly, but no data appears in the location:*** Connected to DCSOSSCTS server MNI database. *** Executing command: EXEC master..xp_cmdshell 'bcp [MNI].[dbo].CFG_MNI_ID_TYPE format nul -n -x -S DCSOSSCTS -f C:\\CFG_MNI_ID_TYPE.xml -T -k'*** Connected to DCSOSSCTS server MNI database. *** Executing command: EXEC master..xp_cmdshell 'bcp [MNI].[dbo].[CFG_MNI_ID_TYPE] out C:\\CFG_MNI_ID_TYPE.dat -n -k -T -f C:\\CFG_MNI_ID_TYPE.xml -S DCSOSSCTS'Warning: -f overrides -n.Starting copy...3 rows copied.Network packet size (bytes): 4096Clock Time (ms.) Total : 1 Average : (3000.00 rows per sec.)ideas? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-14 : 10:40:38
|
| is db installed on your machine? as per above statement file will be present in path C:\\CFG_MNI_ID_TYPE.xml of machine where SQL Server is installed------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-14 : 10:48:50
|
| That's it. Thank u |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-14 : 10:52:56
|
welcome if you want it to be saved to your machine specify UNC path like\\yourmachinename\folder\...------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-14 : 11:31:29
|
| for a number of less than exciting reasons, i am stuck doing these bcps from across the network. Some of them are taking some time to complete. While the resources of the box i'm running them from does not appear to be taxed, i would like to keep an eye on the server from which the data is being pulled. Is there any way for me to view the resource utilization on that source server without being able to install any convoluted 3rd party app on that server? Both are server 2008R2 |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2012-02-14 : 12:15:54
|
| use perfmon to monitor resource utilization.Network might be the problem, but can't say yet that it IS the problem.What's the network speed? Measure the transfer rate with a file of known size.When you say some take time, how much time? Have you checked for blocking on the SQL Server? Does the query execute fast in SSMS? How big is the file? |
 |
|
|
WJHamel
Aged Yak Warrior
651 Posts |
Posted - 2012-02-14 : 12:30:01
|
| Only three rows in that particular table, buy many more in the others. Since doing this across the network is the only option available to me, and they want this done, the other users are going to have to suck it while i get this done. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-02-14 : 15:22:44
|
quote: Since doing this across the network is the only option available to me
Not exactly. You can bcp to a local drive on the SQL Server and then ROBOCOPY the file to your UNC path. It's better to kick off robocopy from one of the machines involved in the copy. Robocopy is very fast, is kinder on network bandwidth, can do restartable copies, and has tons of other handy features. Learn it, your life will be better.You can also zip the file before you copy it and save space that way. It may seem pointless for 3 row files, but it's almost required for files of 100 MB or more. 7zip is a freeware utility that gives excellent compression and has a free command line utility. Winzip and WinRar are not free, but they also have command line utilities. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|