Job with TSQL script does not work 
Author Message
 Job with TSQL script does not work

I have Transact-SQL script with string:
EXECUTE ("INSERT INTO <Local Table> exec <Remote
Server>.master.dbo.sp_sqlexec 'select * From <Remote Database>.dbo.<Remote
Table>'")
Remote and Local servers (NT4+SQL7+SP2 ) is connecting over the Internet.
All work fine wia SQL Server Query Analyzer.
But when I make new Job in SQL server Agent with This script(owner-sa,Run as
user <self>) Job failed.
Remote Server has user sa, and Remote Server Properties <Map Remote Logins
to sa>.
Can anyone help me ?
Thanks.
Yuriy.


Mon, 09 Jun 2003 00:03:56 GMT
 Job with TSQL script does not work

Which account is being used by the SQL Server Agent service? Make sure it's
not using a system account. If that's the case, change it to a domain
account!
--
HTH,
Vyas
Check out my page for SQL Server, ASP, VB resources,Replication FAQ and
MORE:
http://vyaskn.tripod.com/index.htm
Review of SQL Server 2000's "Federated database servers" feature:
http://vyaskn.tripod.com/federated.htm
Interesting code samples (include SQL stored procedures, VB programs):
http://vyaskn.tripod.com/code.htm


Quote:
> I have Transact-SQL script with string:
> EXECUTE ("INSERT INTO <Local Table> exec <Remote
> Server>.master.dbo.sp_sqlexec 'select * From <Remote Database>.dbo.<Remote
> Table>'")
> Remote and Local servers (NT4+SQL7+SP2 ) is connecting over the Internet.
> All work fine wia SQL Server Query Analyzer.
> But when I make new Job in SQL server Agent with This script(owner-sa,Run
as
> user <self>) Job failed.
> Remote Server has user sa, and Remote Server Properties <Map Remote Logins
> to sa>.
> Can anyone help me ?
> Thanks.
> Yuriy.



Thu, 12 Jun 2003 22:50:14 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Job with TSQL script does nrt work

2. SQL script that works in 7.0 not working in 2000

3. TSQL debugger not working - sql server 2000

4. CASE not works in TSQL

5. TSQL OR NOT TSQL this is the ?

6. SQL statement not doing its job

7. Herlp: LIKE in SQL doe not work anymore

8. not doing my job

9. How can I script db from tsql script?

10. TSQL question - what am I doing wrong?

11. Scripting Does Not Work in EM after SQL 2K Client upgrade


 
Powered by phpBB® Forum Software