Thursday, July 4, 2013

[MS SQL Server] Run a SQL Server Agent job under another account

[MS SQL Server] Run a SQL Server Agent job under another account


Run a SQL Server Agent job under another account

Posted: 04 Jul 2013 04:35 AM PDT

ON my server, SQL Server Agent runs under the NT AUTHORITY\NETWORK SERVICE account. That's usually just fine and I don't want to change it. However, it means that jobs running under the agent cannot access LAN shares. That's what I would like to do in a new job. I figured I could just use an account that I know has access to the share. What I can't figure out is how to do that. I read some MS doc on setting up proxies, but I can't figure out how to make that work.Has anyone done what I'm trying to do? If so, can you give a step-by-step to do it?

Monitoring Blocking Issues

Posted: 04 Jul 2013 02:27 AM PDT

Hi Everyone, Firstly I'd like to wish you all a very happy 4th of July :-D I hope you're all having a good day. I was wondering if anyone could help me with a problem I'm having with blocking on my servers. We have a constant stream of data coming in per minute from multiple gateways and at random times the data flow is blocked. The problem is that it resolves itself by the time I can get onto the system to run sp_who2 and see what's causing the problem. Its been driving me crazy :crazy: The only reason I notice it happens is because I see no current data on the reports I have running on the screen in the office :ermm:Is there any type of monitoring approach someone could recommend that would find the root cause be it a bad trigger or query that is causing this? Would something like DBWarden help? Thanks everyone :-)Kind Regards,Craig

Restoring just a single filegroup for support purposes

Posted: 03 Jul 2013 09:17 AM PDT

We have a large (ish) production database in our data centre which causes a problem when we need to restore a copy for support purposes.Currently we have to take a backup, restore it in the data centre. Drop some large tables. Back it up again and then copy it locally.As this approach isn't ideal (!) I was wondering if we could improve things with the use of filegroups. I could add an additional filegroup to the database and then move the large tables onto the new filegroup. For our support team they could just backup the original filegroup and restore it locally.The only problem I can see is that we might need to create the missing tables in order for our application to function. (ie. we need the tables but not the data).I've done some tests and I can't seem to recreate the table/ drop the old table / drop the old file / drop the old filegroup as the filegroup is offline.For example"Cannot drop the table 'dbo.LargeTable' because at least part of the table resides on an offline filegroup."I tried restoring the database with and without the PARTIAL keyword. I've also tried attaching and detaching the restore database without success.I've attached a script used for my testsAny advice?thanks in advanceDavid

No comments:

Post a Comment

Search This Blog