Amazon Ad

Thursday 22 August 2013

How to run SQL server job based on linked server T-SQL

Hi Guys,

I was facing problem while running a job based on the linked server. I was having two sql servers and was implementing the concept of distributed databases.

I created a stored procedures which takes the data from my server database to remote server database. I wanted to create a job for this so that after every 1 hour my database is synchronized.

I did the following -:

Check which user is associated with the SQL server agent service, usually it is

NT Service\SQLSERVERAGENT

Now Create a new job

1. Add mapping user as
NT Service\SQLSERVERAGENT and for remote server give the user name and password.

2. Make sure the owner user is the same user who is having
administrator rights.

3. Do not add any user in the run as user textbox.

4. Add your step and the T-SQL command.

5. Execute the Job

That's it folks

Thanks
Ritesh

No comments:

Post a Comment

Comments are welcome, Please join me on my Linked In account

http://in.linkedin.com/pub/ritesh-tandon/21/644/33b

How to implement Captcha v3 in ASP.NET

 I was facing an issue of dom parsing in my website. I finally resolved it by using Google Captcha V3. Step 1: Get your keys from https:...