显示标签为“installation”的博文。显示所有博文
显示标签为“installation”的博文。显示所有博文

2012年3月29日星期四

bcp.exe installation

(This was originally in the sqlserver.programming group but I moved it to a
more appropriate place)
I'm using the bcp utility to create a text file from a view. The text file
is used by a 3rd party program for other processing.
bcp installs on the server machine with sql 2k (or in my case MSDE) just
fine but of course it's not automatically on any of the client machines. But
that's where I need it because those are the users that create and make use
of this text file.
My qustion is how to install bcp on the client machines without installing
MSDE. I thought it would work to just copy the file to an appropriate
location but apparently it needs to be installed. How do I go about that?
Thanks,
Keith
Never mind. I found a very nice inexpensive 3rd party control for use with
Delphi that will export datasources to all sorts of output formats. This is
a better solution since now I have no need at all for bcp.
Keith

2012年3月25日星期日

BCP Syntax

Please I need some help with bcp syntax. I have the default installation of SQL Express on my system. Also, I'm using windows authentication. Here are some syntax tried:

bcp database.dbo.table out "c:\table.dat" -U? -P? -c

I'm not sure what the user name and password should be but I've tried my windows user id and password without any success.

bcp database.dbo.table out "c:\table.dat" -T -c

I'm not sure if this is a trusted connection,

Do I have to be in App_data directory where my database reside.

There are 2 authentication modes that bcp supports:

a) SQL Server authentication in which case you have to specify your SQL Server login and password, say your SQL Server login ID is foo and password is bar then you should specify -Ufoo -Pbar.

b) If you can login to SQL Server using Windows authentication, then just specify -T and it will used Trusted connection.

Thanks

2012年2月13日星期一

Batch file to restart SQL

Hey all.. I am wanting my SQL Server installation to restart its services at a time I define in the Scheduled Tasks feature of the server its on

I need help with command line commands to:
- Stop SQL Server Agent service
- Stop and Start SQL Server service
- Restart SQL Server Agent service

Thanks in advance

from the command prompt:

>net stop MSSQLSERVER
>net start MSSQLSERVER

>net stop / start SQLSERVERAGENT