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

2012年2月25日星期六

BCP call to import data from computer other than server is this possible?

Hi,

I have written an application which is being used by only 4 people on different computers. The one with SQL Server installed is comp0, then comp1, .... comp4.

Everything was working fine until today when the only user who is authorised (by my application) to perform the data import of BCP files, tried to import the latest BCP files. I am making my bcp command line string and then calling it using the VB Shell call.

If I run the import option from my app on the server it works fine. So at first I thought, ah, the BCP files won't be in the other computers path. I've copied BCP.EXE and BCP.rll but it still doesn't work.

Is it even possible to run BCP from a computer other than the one with SQL Server installed? I really need the import to work on a computer other than the server.

Thanks in advance,

Paul

Hi Paul,

What is the bcp command you are tyring to call exactly?

Thanks

Cris

|||

Hi Cris,

The calls is as follows:

strBCPCommand = "bcp database_name.schema." & _

table_name & _

" in " & _

full_path_of_bcp file & _

" -n -T -Sserver_name\sql -V65"

It all works fine when called from the application or command line on the server.

Thanks,

Paul

2012年2月13日星期一

Batch file to fire Scheduled Job

Hi there,
I am trying to write a batch file that can run a scheduled Job that is
already written in SQL server. I know how to run a package using DTSRun
command from a dos prompt, but, is there any command to fire a scheduled
job. or run a stored procedure.
Thanks in advance,
Sree
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!you can use sp_start_job along with OSQL commandline utility
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"sk" <someone@.hotmail.com> wrote in message
news:%23BpimNekEHA.3536@.TK2MSFTNGP12.phx.gbl...
>
> Hi there,
> I am trying to write a batch file that can run a scheduled Job that is
> already written in SQL server. I know how to run a package using DTSRun
> command from a dos prompt, but, is there any command to fire a scheduled
> job. or run a stored procedure.
> Thanks in advance,
> Sree
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Use osql utility.
Sample syntax:
osql -S MYSERVER -E -d msdb -Q "sp_start_job @.job_name
= 'DB Backup Job for DB Maintenance Plan ''TEST'''"
>--Original Message--
>
>Hi there,
>I am trying to write a batch file that can run a
scheduled Job that is
>already written in SQL server. I know how to run a
package using DTSRun
>command from a dos prompt, but, is there any command to
fire a scheduled
>job. or run a stored procedure.
>Thanks in advance,
>Sree
>*** Sent via Developersdex http://www.developersdex.com
***
>Don't just participate in USENET...get rewarded for it!
>.
>

Batch file to fire Scheduled Job

Hi there,
I am trying to write a batch file that can run a scheduled Job that is
already written in SQL server. I know how to run a package using DTSRun
command from a dos prompt, but, is there any command to fire a scheduled
job. or run a stored procedure.
Thanks in advance,
Sree
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
you can use sp_start_job along with OSQL commandline utility
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"sk" <someone@.hotmail.com> wrote in message
news:%23BpimNekEHA.3536@.TK2MSFTNGP12.phx.gbl...
>
> Hi there,
> I am trying to write a batch file that can run a scheduled Job that is
> already written in SQL server. I know how to run a package using DTSRun
> command from a dos prompt, but, is there any command to fire a scheduled
> job. or run a stored procedure.
> Thanks in advance,
> Sree
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!

2012年2月11日星期六

basic tlog question

whenever a transaction or a SQL statement executes, do the changes get
written to the log file first ? I know they do, but are they also in
memory.. I understand the part where dirty pages are written to disk.. at
checkpoints or lazy writers or thru worker threads...what im a bit confused
is when it talks about writing to disk, is it referring to the data files on
disk or the log files on disk..
Can someone just give me a 2 to 3 liner on the initial part before the data
actually gets written to the disk i.e. disk that contains the data files ?Yes, the log records are written to memory too, to an area called 'log
cache', and SQL Server has a logic to make sure these cached log records are
written to log files, before the associated dirty pages are written to disk.
--
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:e3WwGOvaEHA.3524@.TK2MSFTNGP12.phx.gbl...
> whenever a transaction or a SQL statement executes, do the changes get
> written to the log file first ? I know they do, but are they also in
> memory.. I understand the part where dirty pages are written to disk.. at
> checkpoints or lazy writers or thru worker threads...what im a bit
confused
> is when it talks about writing to disk, is it referring to the data files
on
> disk or the log files on disk..
> Can someone just give me a 2 to 3 liner on the initial part before the
data
> actually gets written to the disk i.e. disk that contains the data files ?
>