Showing posts with label job. Show all posts
Showing posts with label job. Show all posts

Friday, March 30, 2012

How do I Allow SQL DB dump job through a firewall?

We recently moved a SQL box into a DMZ but we still want to allow a Database
dump job to be allowed. What protocol and port needs to be opened for the
following job to run:
BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1' WITH
INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMAT
Network file shares are accessed via the SMB (Server Message Block)
protocol. I have no clue what ports are used.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> We recently moved a SQL box into a DMZ but we still want to allow a
Database
> dump job to be allowed. What protocol and port needs to be opened for the
> following job to run:
> BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
WITH
> INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMAT
|||Hi
I would not let SQL Server "push" though the firewall. Dump the DB locally
to the SQL Server's drive and then have a task from behind the firewall come
and pick the file up.
If you push, and your box gets compromised, the hacker has access through to
your internal network as those ports are open to a supposedly "trusted"
server.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Network file shares are accessed via the SMB (Server Message Block)
> protocol. I have no clue what ports are used.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
> news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> Database
the[vbcol=seagreen]
> WITH
NOFORMAT
>
|||That is a great idea. Why didn't I think of that?
I'll try to setup a process that grabs the database on a regular basis after
it has dumped locally but I need to generate e-mail alerts if the dump fails
for any reason so I need to open it up to a certain extent anyway. Actually,
opening to SMTP traffic only seems much better then what I was trying to
accomplish previously.
Thanks again for the suggestion!
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> I would not let SQL Server "push" though the firewall. Dump the DB locally
> to the SQL Server's drive and then have a task from behind the firewall come
> and pick the file up.
> If you push, and your box gets compromised, the hacker has access through to
> your internal network as those ports are open to a supposedly "trusted"
> server.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
> news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> the
> NOFORMAT
>
>

How do I Allow SQL DB dump job through a firewall?

We recently moved a SQL box into a DMZ but we still want to allow a Database
dump job to be allowed. What protocol and port needs to be opened for the
following job to run:
BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1' W
ITH
INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMATNetwork file shares are accessed via the SMB (Server Message Block)
protocol. I have no clue what ports are used.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> We recently moved a SQL box into a DMZ but we still want to allow a
Database
> dump job to be allowed. What protocol and port needs to be opened for the
> following job to run:
> BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
WITH
> INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMAT|||Hi
I would not let SQL Server "push" though the firewall. Dump the DB locally
to the SQL Server's drive and then have a task from behind the firewall come
and pick the file up.
If you push, and your box gets compromised, the hacker has access through to
your internal network as those ports are open to a supposedly "trusted"
server.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> Network file shares are accessed via the SMB (Server Message Block)
> protocol. I have no clue what ports are used.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
> news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> Database
the[vbcol=seagreen]
> WITH
NOFORMAT[vbcol=seagreen]
>|||That is a great idea. Why didn't I think of that?
I'll try to setup a process that grabs the database on a regular basis after
it has dumped locally but I need to generate e-mail alerts if the dump fails
for any reason so I need to open it up to a certain extent anyway. Actually,
opening to SMTP traffic only seems much better then what I was trying to
accomplish previously.
Thanks again for the suggestion!
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> I would not let SQL Server "push" though the firewall. Dump the DB locally
> to the SQL Server's drive and then have a task from behind the firewall co
me
> and pick the file up.
> If you push, and your box gets compromised, the hacker has access through
to
> your internal network as those ports are open to a supposedly "trusted"
> server.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
> news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> the
> NOFORMAT
>
>sql

How do I Allow SQL DB dump job through a firewall?

We recently moved a SQL box into a DMZ but we still want to allow a Database
dump job to be allowed. What protocol and port needs to be opened for the
following job to run:
BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1' WITH
INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMATNetwork file shares are accessed via the SMB (Server Message Block)
protocol. I have no clue what ports are used.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> We recently moved a SQL box into a DMZ but we still want to allow a
Database
> dump job to be allowed. What protocol and port needs to be opened for the
> following job to run:
> BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
WITH
> INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10, NOFORMAT|||Hi
I would not let SQL Server "push" though the firewall. Dump the DB locally
to the SQL Server's drive and then have a task from behind the firewall come
and pick the file up.
If you push, and your box gets compromised, the hacker has access through to
your internal network as those ports are open to a supposedly "trusted"
server.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> Network file shares are accessed via the SMB (Server Message Block)
> protocol. I have no clue what ports are used.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
> news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> > We recently moved a SQL box into a DMZ but we still want to allow a
> Database
> > dump job to be allowed. What protocol and port needs to be opened for
the
> > following job to run:
> > BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
> WITH
> > INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10,
NOFORMAT
>|||That is a great idea. Why didn't I think of that?
I'll try to setup a process that grabs the database on a regular basis after
it has dumped locally but I need to generate e-mail alerts if the dump fails
for any reason so I need to open it up to a certain extent anyway. Actually,
opening to SMTP traffic only seems much better then what I was trying to
accomplish previously.
Thanks again for the suggestion!
"Mike Epprecht (SQL MVP)" wrote:
> Hi
> I would not let SQL Server "push" though the firewall. Dump the DB locally
> to the SQL Server's drive and then have a task from behind the firewall come
> and pick the file up.
> If you push, and your box gets compromised, the hacker has access through to
> your internal network as those ports are open to a supposedly "trusted"
> server.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "Geoff N. Hiten" <SRDBA@.Careerbuilder.com> wrote in message
> news:Odz5U609EHA.2552@.TK2MSFTNGP09.phx.gbl...
> > Network file shares are accessed via the SMB (Server Message Block)
> > protocol. I have no clue what ports are used.
> >
> > --
> > Geoff N. Hiten
> > Microsoft SQL Server MVP
> > Senior Database Administrator
> > Careerbuilder.com
> >
> > I support the Professional Association for SQL Server
> > www.sqlpass.org
> >
> > "Paul Cyr" <PaulCyr@.discussions.microsoft.com> wrote in message
> > news:AEF08916-1733-458F-AE03-C9C6BC771624@.microsoft.com...
> > > We recently moved a SQL box into a DMZ but we still want to allow a
> > Database
> > > dump job to be allowed. What protocol and port needs to be opened for
> the
> > > following job to run:
> > > BACKUP DATABASE [Database1] TO DISK = N'\\server1\DBBACKUP\Database1'
> > WITH
> > > INIT , NOUNLOAD , NAME = N'Database1', NOSKIP , STATS = 10,
> NOFORMAT
> >
> >
>
>

Monday, March 26, 2012

how disable MSX server generated job

I have some jobs that when I want to delete or disable it I get bellow error
Msg:
"Error 14274 : cannot add, update, or delete a job that originated from an
MSX server"
what it means? how can I delete this job?
Thanks
TarvirdiIf memory servers, go into the MSDB.dbo.SysJobs table and update the
originating_server column to be that of the name the job currently resides
on. You should then be able to do whatever you want.
"Tarvirdi" wrote:

> I have some jobs that when I want to delete or disable it I get bellow err
or
> Msg:
> "Error 14274 : cannot add, update, or delete a job that originated from an
> MSX server"
> what it means? how can I delete this job?
> Thanks
> Tarvirdi
>
>

how disable MSX server generated job

I have some jobs that when I want to delete or disable it I get bellow error
Msg:
"Error 14274 : cannot add, update, or delete a job that originated from an
MSX server"
what it means? how can I delete this job?
Thanks
TarvirdiIf memory servers, go into the MSDB.dbo.SysJobs table and update the
originating_server column to be that of the name the job currently resides
on. You should then be able to do whatever you want.
"Tarvirdi" wrote:
> I have some jobs that when I want to delete or disable it I get bellow error
> Msg:
> "Error 14274 : cannot add, update, or delete a job that originated from an
> MSX server"
> what it means? how can I delete this job?
> Thanks
> Tarvirdi
>
>

Friday, March 23, 2012

How could I obtain the domain name from SQL?

Dear fellows,
I would need from T-SQL job or through any friendly-user function (VB
front-end app) the aforementioned value.
With EXEC xp_cmdshell 'IPCONFIG /ALL' I get values such as HOST NAME or
IP Adress. Problem is the following: if oneself launch IPCONFIG /ALL from a
DOS session it is obtained DNS suffixes list with values hoped: domain,
Active Directory and so on. But launched from Query Analyzer due to it
returns more than a row appear as NULL value.
Does anyone know how/where it is available?
Best regards,> But launched from Query Analyzer due to it
> returns more than a row appear as NULL value.
Is this the only problem?
CREATE TABLE #foo(cmd VARCHAR(1024))
INSERT #foo EXEC master..xp_cmdshell 'IPCONFIG /ALL'
SELECT * FROM #foo WHERE cmd IS NOT NULL
DROP TABLE #foo|||Dear Aaron,
Is this the only problem?
No!
Your solution not works because of appers the line empty.
Thanks a lot for your support,
"Aaron Bertrand [SQL Server MVP]" wrote:

> Is this the only problem?
>
> CREATE TABLE #foo(cmd VARCHAR(1024))
> INSERT #foo EXEC master..xp_cmdshell 'IPCONFIG /ALL'
> SELECT * FROM #foo WHERE cmd IS NOT NULL
> DROP TABLE #foo
>
>|||> Your solution not works because of appers the line empty.
Okay, so is this really that difficult?
SELECT * FROM #foo WHERE cmd > ''

Wednesday, March 21, 2012

How come my SQL Server Job won't run?

Hi - I just created a job in SQL Server using Management Studio. This is the
first time I've tried to build a job. The job failed to execute at the
scheduled time and it fails when I start it manually. Looking at the Job
History, the error message says, "Executed as user:NT AUTHORITY\SYSTEM. Login
failed for user 'domain\mycomputer$.[SQLSTATE 28000] (Error 18456). The step
failed."
I tried to pick a different user from the Run as drop down in the Job step
properties window, but the drop down is empty. Does anyone know what might
be going on here?
--
Thanks,
JeffHi Jeff,
What is your job supposed to do? On the job history expand the job steps and
look for additional error messages every step. If applicable also check the
SQL Server error log.
You can also try the Advanced page on the Job Step section and specify an
output file. Then run the job again and see if you can find some additional
error information there.
Perhaps you do not need to change the 'Run as' section until you know what
the problem is.
Hope this helps,
Ben Nevarez
Senior Database Administrator
"Jeff Stroope" wrote:
> Hi - I just created a job in SQL Server using Management Studio. This is the
> first time I've tried to build a job. The job failed to execute at the
> scheduled time and it fails when I start it manually. Looking at the Job
> History, the error message says, "Executed as user:NT AUTHORITY\SYSTEM. Login
> failed for user 'domain\mycomputer$.[SQLSTATE 28000] (Error 18456). The step
> failed."
> I tried to pick a different user from the Run as drop down in the Job step
> properties window, but the drop down is empty. Does anyone know what might
> be going on here?
> --
> Thanks,
> Jeff|||Jeff,
I just ran into someone getting the same error message. Are you by any
change running something like the following TSQL step?
exec xp_cmdshell 'bcp xxx.dbo.yyy out xxx.fil -T'
In the other case, it seems that shelling out and then logging back in as a
Trusted Connection raised the error.
In their case, changing the SQL Server service from running as Local System
to running as a domain login resolved the problem. (Of course, you need to
have or create a domain account with the proper permissions.)
RLF
"Jeff Stroope" <JeffStroope@.discussions.microsoft.com> wrote in message
news:D5B0F3ED-5538-4E89-8A97-E985003A981F@.microsoft.com...
> Hi - I just created a job in SQL Server using Management Studio. This is
> the
> first time I've tried to build a job. The job failed to execute at the
> scheduled time and it fails when I start it manually. Looking at the Job
> History, the error message says, "Executed as user:NT AUTHORITY\SYSTEM.
> Login
> failed for user 'domain\mycomputer$.[SQLSTATE 28000] (Error 18456). The
> step
> failed."
> I tried to pick a different user from the Run as drop down in the Job step
> properties window, but the drop down is empty. Does anyone know what
> might
> be going on here?
> --
> Thanks,
> Jeff|||Hi Ben - the job is supposed to run a stored procedure. The job only has one
step, which is "execute sp_storedProcedure". I'll try the output file and
see what happens.
--
Thanks,
Jeff
"Ben Nevarez" wrote:
> Hi Jeff,
> What is your job supposed to do? On the job history expand the job steps and
> look for additional error messages every step. If applicable also check the
> SQL Server error log.
> You can also try the Advanced page on the Job Step section and specify an
> output file. Then run the job again and see if you can find some additional
> error information there.
> Perhaps you do not need to change the 'Run as' section until you know what
> the problem is.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
>
> "Jeff Stroope" wrote:
> > Hi - I just created a job in SQL Server using Management Studio. This is the
> > first time I've tried to build a job. The job failed to execute at the
> > scheduled time and it fails when I start it manually. Looking at the Job
> > History, the error message says, "Executed as user:NT AUTHORITY\SYSTEM. Login
> > failed for user 'domain\mycomputer$.[SQLSTATE 28000] (Error 18456). The step
> > failed."
> >
> > I tried to pick a different user from the Run as drop down in the Job step
> > properties window, but the drop down is empty. Does anyone know what might
> > be going on here?
> > --
> > Thanks,
> >
> > Jeff|||Thanks Russell - no, I'm just trying execute a stored procedure that queries
some tables in a database on a linked server and then populates tables on the
job server.
--
Thanks,
Jeff
"Russell Fields" wrote:
> Jeff,
> I just ran into someone getting the same error message. Are you by any
> change running something like the following TSQL step?
> exec xp_cmdshell 'bcp xxx.dbo.yyy out xxx.fil -T'
> In the other case, it seems that shelling out and then logging back in as a
> Trusted Connection raised the error.
> In their case, changing the SQL Server service from running as Local System
> to running as a domain login resolved the problem. (Of course, you need to
> have or create a domain account with the proper permissions.)
> RLF
>
> "Jeff Stroope" <JeffStroope@.discussions.microsoft.com> wrote in message
> news:D5B0F3ED-5538-4E89-8A97-E985003A981F@.microsoft.com...
> > Hi - I just created a job in SQL Server using Management Studio. This is
> > the
> > first time I've tried to build a job. The job failed to execute at the
> > scheduled time and it fails when I start it manually. Looking at the Job
> > History, the error message says, "Executed as user:NT AUTHORITY\SYSTEM.
> > Login
> > failed for user 'domain\mycomputer$.[SQLSTATE 28000] (Error 18456). The
> > step
> > failed."
> >
> > I tried to pick a different user from the Run as drop down in the Job step
> > properties window, but the drop down is empty. Does anyone know what
> > might
> > be going on here?
> > --
> > Thanks,
> >
> > Jeff
>
>|||Jeff,
OK, but you still have an execution context issue since you are going to
another server. A couple more questions:
1. Who is the job owner of the SQL Agent job? Your login? The 'sa'
account? NT AUTHORITY\SYSTEM? A domain login? A SQL Server login?
2. How do you have your security set on the linked server? Check the
security tab of the linked server definition. Local login impersonation?
The login's current security context? A specific login?
You might be able to manipulate the linked server definition to get this to
work for you. But, as is, I suspect that the local system account is at the
root of the problem for the job you have defined.
RLF
"Jeff Stroope" <JeffStroope@.discussions.microsoft.com> wrote in message
news:FA4BED9F-1877-4B01-ADA5-3F1B49027EC9@.microsoft.com...
> Thanks Russell - no, I'm just trying execute a stored procedure that
> queries
> some tables in a database on a linked server and then populates tables on
> the
> job server.
> --
> Thanks,
> Jeff
>
> "Russell Fields" wrote:
>> Jeff,
>> I just ran into someone getting the same error message. Are you by any
>> change running something like the following TSQL step?
>> exec xp_cmdshell 'bcp xxx.dbo.yyy out xxx.fil -T'
>> In the other case, it seems that shelling out and then logging back in as
>> a
>> Trusted Connection raised the error.
>> In their case, changing the SQL Server service from running as Local
>> System
>> to running as a domain login resolved the problem. (Of course, you need
>> to
>> have or create a domain account with the proper permissions.)
>> RLF
>>
>> "Jeff Stroope" <JeffStroope@.discussions.microsoft.com> wrote in message
>> news:D5B0F3ED-5538-4E89-8A97-E985003A981F@.microsoft.com...
>> > Hi - I just created a job in SQL Server using Management Studio. This
>> > is
>> > the
>> > first time I've tried to build a job. The job failed to execute at the
>> > scheduled time and it fails when I start it manually. Looking at the
>> > Job
>> > History, the error message says, "Executed as user:NT AUTHORITY\SYSTEM.
>> > Login
>> > failed for user 'domain\mycomputer$.[SQLSTATE 28000] (Error 18456). The
>> > step
>> > failed."
>> >
>> > I tried to pick a different user from the Run as drop down in the Job
>> > step
>> > properties window, but the drop down is empty. Does anyone know what
>> > might
>> > be going on here?
>> > --
>> > Thanks,
>> >
>> > Jeff
>>|||Hi,
Did you find the solution for this. Even I am facing similar problem.
I am trying to configure a linked server with the following settings
sp_addlinkedserver 'Linked Server Name', 'SQL Server'
sp_addlinkedsrvlogin @.rmtsrvname = 'Linked Server Name'
, @.useself = 'FALSE'
, @.locallogin = 'Domain\LoginName'
, @.rmtuser = 'DatabaseUserName'
, @.rmtpassword = 'DatabaseUSerPassword'
If I run the query against this linked server I get the perfect result.
Now I have scheduled a Job which runs on sa account. It always throws the
error:
Executed as user: NT AUTHORITY\SYSTEM. Login failed for user
'DOMAIN\MACHINENAME'. [SQLSTATE 28000] (Error 18456).
Let me know on what I am doing wrong.|||Praveen,
What you have said is, if the linked server is accessed by login
'Domain\LoginName' then log in remotely as 'DatabaseUserName' using
'DatabaseUSerPassword'. If the linked server is accessed by any other
login, then that login's security context.
If I understood correctly, you said that the job runs as 'sa', which is a
local SQL Server login and has no domain rights. You messages refer to NT
AUTHORITY\SYSTEM and 'DOMAIN\MACHINENAME', to which you do not seem to have
granted any special rights to the 'Linked Server Name' server.
Also, it appears that the SQL Server service is running as the local system
account, but a best practice is to run the SQL Server service as a domain
account and not as local system. You can see that a domain account would be
handier for accessing anything not on the local server. (If I properly
understood your setup.)
Perhaps you could add:
sp_addlinkedsrvlogin @.rmtsrvname = 'Linked Server Name'
, @.useself = 'FALSE'
, @.locallogin = 'sa'
, @.rmtuser = 'DatabaseUserName'
, @.rmtpassword = 'DatabaseUSerPassword'
FWIW,
RLF
"Praveen" <Praveen@.discussions.microsoft.com> wrote in message
news:67D35848-9BB7-49E8-B128-B26E040F7D8E@.microsoft.com...
> Hi,
> Did you find the solution for this. Even I am facing similar problem.
> I am trying to configure a linked server with the following settings
> sp_addlinkedserver 'Linked Server Name', 'SQL Server'
> sp_addlinkedsrvlogin @.rmtsrvname = 'Linked Server Name'
> , @.useself = 'FALSE'
> , @.locallogin = 'Domain\LoginName'
> , @.rmtuser = 'DatabaseUserName'
> , @.rmtpassword = 'DatabaseUSerPassword'
>
> If I run the query against this linked server I get the perfect result.
> Now I have scheduled a Job which runs on sa account. It always throws the
> error:
> Executed as user: NT AUTHORITY\SYSTEM. Login failed for user
> 'DOMAIN\MACHINENAME'. [SQLSTATE 28000] (Error 18456).
> Let me know on what I am doing wrong.
>|||Russell,
Now I have removed all the logins and had defaulted to DatabaseUserName and
DatabaseUserPassword for all the logins.
What I did was [this is in SQL Server 2005]
1. Right click Linked Servers -> New Linked Server
2. General tab:
Linked Server: Name of the SQL Server. Let us call this as 'Linked Server'
Server type: SQL Server
3. Security tab:
No Local Server Logins were added. Add selected the option "Be made using
this security context" in the list of options. Remote Login and Password are
DatabaseUserName and DatabaseUserPassword.
This setup I believe that regardless of the access account from the source
machine [machine from which i am querying the linked server] it always trys
to connect as DatabaseUserName to the linked server.
This works perfectly fine on any query made to the linked server. I can
access table objects, sysobjects of Linked Server from the Source Machine.
The same queries if I make them in the Stored Procedure and schedule to
execute the SP as a Job doesn't works.
Executed as user: NT AUTHORITY\SYSTEM. Server 'LinkedServerName is not
configured for RPC. [SQLSTATE 42000] (Error 7411). The step failed.
The difference between direct query and the job is that in direct query is
through the Window authentication mode, which is "Domain\UserName" account
whereas through job in Source machine sa account.
With the setup of Linked server I believe it should always go through the
DatabaseUserName and DatabasePassword credentials.
What is the wrong here?|||Praveen,
Yes, with a hardwired remote Login and Password I would expect all access
to be through that login. What now? Well, you are now getting the message:
Server 'LinkedServerName is not configured for RPC.
Please look at the Linked Server Properties, the Server Options tab. Make
sure the RPC settings are TRUE.
RLF
"Praveen" <Praveen@.discussions.microsoft.com> wrote in message
news:2C20479D-7A59-4910-8647-A334E8EF4A95@.microsoft.com...
> Russell,
> Now I have removed all the logins and had defaulted to DatabaseUserName
> and
> DatabaseUserPassword for all the logins.
> What I did was [this is in SQL Server 2005]
> 1. Right click Linked Servers -> New Linked Server
> 2. General tab:
> Linked Server: Name of the SQL Server. Let us call this as 'Linked
> Server'
> Server type: SQL Server
> 3. Security tab:
> No Local Server Logins were added. Add selected the option "Be made
> using
> this security context" in the list of options. Remote Login and Password
> are
> DatabaseUserName and DatabaseUserPassword.
> This setup I believe that regardless of the access account from the source
> machine [machine from which i am querying the linked server] it always
> trys
> to connect as DatabaseUserName to the linked server.
> This works perfectly fine on any query made to the linked server. I can
> access table objects, sysobjects of Linked Server from the Source Machine.
> The same queries if I make them in the Stored Procedure and schedule to
> execute the SP as a Job doesn't works.
> Executed as user: NT AUTHORITY\SYSTEM. Server 'LinkedServerName is not
> configured for RPC. [SQLSTATE 42000] (Error 7411). The step failed.
> The difference between direct query and the job is that in direct query is
> through the Window authentication mode, which is "Domain\UserName" account
> whereas through job in Source machine sa account.
> With the setup of Linked server I believe it should always go through the
> DatabaseUserName and DatabasePassword credentials.
> What is the wrong here?
>

How come my SQL Server Job won't run?

Hi - I just created a job in SQL Server using Management Studio. This is the
first time I've tried to build a job. The job failed to execute at the
scheduled time and it fails when I start it manually. Looking at the Job
History, the error message says, "Executed as user:NT AUTHORITY\SYSTEM. Login
failed for user 'domain\mycomputer$.[SQLSTATE 28000] (Error 18456). The step
failed."
I tried to pick a different user from the Run as drop down in the Job step
properties window, but the drop down is empty. Does anyone know what might
be going on here?
Thanks,
Jeff
Hi Jeff,
What is your job supposed to do? On the job history expand the job steps and
look for additional error messages every step. If applicable also check the
SQL Server error log.
You can also try the Advanced page on the Job Step section and specify an
output file. Then run the job again and see if you can find some additional
error information there.
Perhaps you do not need to change the 'Run as' section until you know what
the problem is.
Hope this helps,
Ben Nevarez
Senior Database Administrator
"Jeff Stroope" wrote:

> Hi - I just created a job in SQL Server using Management Studio. This is the
> first time I've tried to build a job. The job failed to execute at the
> scheduled time and it fails when I start it manually. Looking at the Job
> History, the error message says, "Executed as user:NT AUTHORITY\SYSTEM. Login
> failed for user 'domain\mycomputer$.[SQLSTATE 28000] (Error 18456). The step
> failed."
> I tried to pick a different user from the Run as drop down in the Job step
> properties window, but the drop down is empty. Does anyone know what might
> be going on here?
> --
> Thanks,
> Jeff
|||Jeff,
I just ran into someone getting the same error message. Are you by any
change running something like the following TSQL step?
exec xp_cmdshell 'bcp xxx.dbo.yyy out xxx.fil -T'
In the other case, it seems that shelling out and then logging back in as a
Trusted Connection raised the error.
In their case, changing the SQL Server service from running as Local System
to running as a domain login resolved the problem. (Of course, you need to
have or create a domain account with the proper permissions.)
RLF
"Jeff Stroope" <JeffStroope@.discussions.microsoft.com> wrote in message
news:D5B0F3ED-5538-4E89-8A97-E985003A981F@.microsoft.com...
> Hi - I just created a job in SQL Server using Management Studio. This is
> the
> first time I've tried to build a job. The job failed to execute at the
> scheduled time and it fails when I start it manually. Looking at the Job
> History, the error message says, "Executed as user:NT AUTHORITY\SYSTEM.
> Login
> failed for user 'domain\mycomputer$.[SQLSTATE 28000] (Error 18456). The
> step
> failed."
> I tried to pick a different user from the Run as drop down in the Job step
> properties window, but the drop down is empty. Does anyone know what
> might
> be going on here?
> --
> Thanks,
> Jeff
|||Hi Ben - the job is supposed to run a stored procedure. The job only has one
step, which is "execute sp_storedProcedure". I'll try the output file and
see what happens.
Thanks,
Jeff
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Hi Jeff,
> What is your job supposed to do? On the job history expand the job steps and
> look for additional error messages every step. If applicable also check the
> SQL Server error log.
> You can also try the Advanced page on the Job Step section and specify an
> output file. Then run the job again and see if you can find some additional
> error information there.
> Perhaps you do not need to change the 'Run as' section until you know what
> the problem is.
> Hope this helps,
> Ben Nevarez
> Senior Database Administrator
>
> "Jeff Stroope" wrote:
|||Thanks Russell - no, I'm just trying execute a stored procedure that queries
some tables in a database on a linked server and then populates tables on the
job server.
Thanks,
Jeff
"Russell Fields" wrote:

> Jeff,
> I just ran into someone getting the same error message. Are you by any
> change running something like the following TSQL step?
> exec xp_cmdshell 'bcp xxx.dbo.yyy out xxx.fil -T'
> In the other case, it seems that shelling out and then logging back in as a
> Trusted Connection raised the error.
> In their case, changing the SQL Server service from running as Local System
> to running as a domain login resolved the problem. (Of course, you need to
> have or create a domain account with the proper permissions.)
> RLF
>
> "Jeff Stroope" <JeffStroope@.discussions.microsoft.com> wrote in message
> news:D5B0F3ED-5538-4E89-8A97-E985003A981F@.microsoft.com...
>
>
|||Jeff,
OK, but you still have an execution context issue since you are going to
another server. A couple more questions:
1. Who is the job owner of the SQL Agent job? Your login? The 'sa'
account? NT AUTHORITY\SYSTEM? A domain login? A SQL Server login?
2. How do you have your security set on the linked server? Check the
security tab of the linked server definition. Local login impersonation?
The login's current security context? A specific login?
You might be able to manipulate the linked server definition to get this to
work for you. But, as is, I suspect that the local system account is at the
root of the problem for the job you have defined.
RLF
"Jeff Stroope" <JeffStroope@.discussions.microsoft.com> wrote in message
news:FA4BED9F-1877-4B01-ADA5-3F1B49027EC9@.microsoft.com...[vbcol=seagreen]
> Thanks Russell - no, I'm just trying execute a stored procedure that
> queries
> some tables in a database on a linked server and then populates tables on
> the
> job server.
> --
> Thanks,
> Jeff
>
> "Russell Fields" wrote:
|||Hi,
Did you find the solution for this. Even I am facing similar problem.
I am trying to configure a linked server with the following settings
sp_addlinkedserver 'Linked Server Name', 'SQL Server'
sp_addlinkedsrvlogin @.rmtsrvname = 'Linked Server Name'
, @.useself = 'FALSE'
, @.locallogin = 'Domain\LoginName'
, @.rmtuser = 'DatabaseUserName'
, @.rmtpassword = 'DatabaseUSerPassword'
If I run the query against this linked server I get the perfect result.
Now I have scheduled a Job which runs on sa account. It always throws the
error:
Executed as user: NT AUTHORITY\SYSTEM. Login failed for user
'DOMAIN\MACHINENAME'. [SQLSTATE 28000] (Error 18456).
Let me know on what I am doing wrong.
|||Praveen,
What you have said is, if the linked server is accessed by login
'Domain\LoginName' then log in remotely as 'DatabaseUserName' using
'DatabaseUSerPassword'. If the linked server is accessed by any other
login, then that login's security context.
If I understood correctly, you said that the job runs as 'sa', which is a
local SQL Server login and has no domain rights. You messages refer to NT
AUTHORITY\SYSTEM and 'DOMAIN\MACHINENAME', to which you do not seem to have
granted any special rights to the 'Linked Server Name' server.
Also, it appears that the SQL Server service is running as the local system
account, but a best practice is to run the SQL Server service as a domain
account and not as local system. You can see that a domain account would be
handier for accessing anything not on the local server. (If I properly
understood your setup.)
Perhaps you could add:
sp_addlinkedsrvlogin @.rmtsrvname = 'Linked Server Name'
, @.useself = 'FALSE'
, @.locallogin = 'sa'
, @.rmtuser = 'DatabaseUserName'
, @.rmtpassword = 'DatabaseUSerPassword'
FWIW,
RLF
"Praveen" <Praveen@.discussions.microsoft.com> wrote in message
news:67D35848-9BB7-49E8-B128-B26E040F7D8E@.microsoft.com...
> Hi,
> Did you find the solution for this. Even I am facing similar problem.
> I am trying to configure a linked server with the following settings
> sp_addlinkedserver 'Linked Server Name', 'SQL Server'
> sp_addlinkedsrvlogin @.rmtsrvname = 'Linked Server Name'
> , @.useself = 'FALSE'
> , @.locallogin = 'Domain\LoginName'
> , @.rmtuser = 'DatabaseUserName'
> , @.rmtpassword = 'DatabaseUSerPassword'
>
> If I run the query against this linked server I get the perfect result.
> Now I have scheduled a Job which runs on sa account. It always throws the
> error:
> Executed as user: NT AUTHORITY\SYSTEM. Login failed for user
> 'DOMAIN\MACHINENAME'. [SQLSTATE 28000] (Error 18456).
> Let me know on what I am doing wrong.
>
|||Russell,
Now I have removed all the logins and had defaulted to DatabaseUserName and
DatabaseUserPassword for all the logins.
What I did was [this is in SQL Server 2005]
1. Right click Linked Servers -> New Linked Server
2. General tab:
Linked Server: Name of the SQL Server. Let us call this as 'Linked Server'
Server type: SQL Server
3. Security tab:
No Local Server Logins were added. Add selected the option "Be made using
this security context" in the list of options. Remote Login and Password are
DatabaseUserName and DatabaseUserPassword.
This setup I believe that regardless of the access account from the source
machine [machine from which i am querying the linked server] it always trys
to connect as DatabaseUserName to the linked server.
This works perfectly fine on any query made to the linked server. I can
access table objects, sysobjects of Linked Server from the Source Machine.
The same queries if I make them in the Stored Procedure and schedule to
execute the SP as a Job doesn't works.
Executed as user: NT AUTHORITY\SYSTEM. Server 'LinkedServerName is not
configured for RPC. [SQLSTATE 42000] (Error 7411). The step failed.
The difference between direct query and the job is that in direct query is
through the Window authentication mode, which is "Domain\UserName" account
whereas through job in Source machine sa account.
With the setup of Linked server I believe it should always go through the
DatabaseUserName and DatabasePassword credentials.
What is the wrong here?
|||Praveen,
Yes, with a hardwired remote Login and Password I would expect all access
to be through that login. What now? Well, you are now getting the message:
Server 'LinkedServerName is not configured for RPC.
Please look at the Linked Server Properties, the Server Options tab. Make
sure the RPC settings are TRUE.
RLF
"Praveen" <Praveen@.discussions.microsoft.com> wrote in message
news:2C20479D-7A59-4910-8647-A334E8EF4A95@.microsoft.com...
> Russell,
> Now I have removed all the logins and had defaulted to DatabaseUserName
> and
> DatabaseUserPassword for all the logins.
> What I did was [this is in SQL Server 2005]
> 1. Right click Linked Servers -> New Linked Server
> 2. General tab:
> Linked Server: Name of the SQL Server. Let us call this as 'Linked
> Server'
> Server type: SQL Server
> 3. Security tab:
> No Local Server Logins were added. Add selected the option "Be made
> using
> this security context" in the list of options. Remote Login and Password
> are
> DatabaseUserName and DatabaseUserPassword.
> This setup I believe that regardless of the access account from the source
> machine [machine from which i am querying the linked server] it always
> trys
> to connect as DatabaseUserName to the linked server.
> This works perfectly fine on any query made to the linked server. I can
> access table objects, sysobjects of Linked Server from the Source Machine.
> The same queries if I make them in the Stored Procedure and schedule to
> execute the SP as a Job doesn't works.
> Executed as user: NT AUTHORITY\SYSTEM. Server 'LinkedServerName is not
> configured for RPC. [SQLSTATE 42000] (Error 7411). The step failed.
> The difference between direct query and the job is that in direct query is
> through the Window authentication mode, which is "Domain\UserName" account
> whereas through job in Source machine sa account.
> With the setup of Linked server I believe it should always go through the
> DatabaseUserName and DatabasePassword credentials.
> What is the wrong here?
>

Monday, March 19, 2012

How can you tell what DTS package a job step is running?

How can you tell what DTS package a Job step is running when it looks like this?

DTSRun /~Z0xBEA63421A37A7AA7175D23C17BA2CB8CEC94DCC69159320C62777706E248EFDD4BF43C93709C9FCEF2982201C4D26B7EAFF25816E9F0E7C51467E5C2446BE35FBA02E809F523C5D19F6AC91416E5ED3B79BE27B7991980910679EBF4C311A9A33AED799A9C53BB7BFDAEDE7EEBC6ECE9001D0E6218956A578C40FC

The GUID does not appear to be related to what DTS shows in the Package or Version GUIDS of the DTS packages. And yet the job runs from what I am told.

SQL Server 2000 msdb.dbo.sysjobsteps

The value "DTSRun /~Z0xBEA63421...." is in the command column. The table also has a step_name column which appears in the job. The default step_name is the name of the DTS package but it could have been renamed.

If so turn on profiler and find the package execution line with the package name

exec msdb..sp_get_dtspackage N'MyPackage'

|||If you can enable the dTS package log then you can see the status.|||

The /~Z paramater is an encrypted command line version. Microsoft does this in case it needs to pass a password.

The job step and job name is by default the name of the package. If these have been changed that will make it harder.

If you have the command line and run it from a command prompt it will display in the command window which DTS package is running. I would recommend using this information to change the command line to use the /S /E /N commands so that it's easier to see which package is running.

How can you prevent the data changes message during editing a

Hi David,
I think you are right that this is not a server's job. I assumed that the
server has the original record available in the Deleted version of the recor
d
in a trigger - but this is probably not the record state the user first read
into a form.
My problem is that I have a big application (a mail-order processing system)
written in Access 2000 FE (.mdb) file with lots of forms with bound ODBC
server tables/queries. I have 850 queries and a lot of code. Up to now I use
d
pessimistic locking but this is not possible anymore (I think) because if I
link via ODBC to SQL server I do not have the option to lock pessimisticly
anymore.
In principle I could use the optimistic locking but how can I deal with data
changes in a record made by other users/jobs. If I cannot lock, a job or
program could "get caught out" as well and how would the program then know
what to do (from the choices: copy the data to the clipboard, overwrite or
loose it). I really think Microsoft should solve this problem by changing th
e
bound forms so that only the changed fields get updated and overwrite by
default - may with an option to switch this behaviour on and off...
It should never get to that stage, it must be prevented via short time locks
that a record gets changed during a read and update transaction.
It is okay to assume that if a user field change clashes with another user
field change the last writing user "wins" provided only the changed fields
will be updated.
If I could I would like to leave everything in ODBC or DAO and convert
slowly to stored procedures and use ADO, ... otherwise it would be a mega jo
b
to convert all in one go. I might have to do this if there is no way around
the locking problem.
Do you or anybody else know a way around it - it would be like light in the
dark tunnel for me!
Thanks.
Oliver
"David Gugick" wrote:

> Oliver wrote:
> I don't agree with your assessment. This is an application programming
> issue and not one for the database to manage on its own. You're
> suggesting that the server update a row that has been updated in the
> interim by another process just because the columns being updated are
> not the same. I would argue that there's no way for SQL Server to know
> if changing a single column value in a row would somehow affect business
> rules and know whether or not the proposed row changes are valid.
> Many applications can deal with this scenario by assuming the last
> update should be the most current. In that scenario, there is no
> additional programming required. If you need to manage concurrency and
> changes to a row by another session to avoid overwriting those changes,
> you should use a timestamp. You pass the timestamp value with the other
> column values to your stored procedure and the procedure does the work.
> The application should be able to handle the condition where the row was
> not updated because an error was raised and then requery the data and
> inform the end-user. All your DML should be done in stored procedures.
> In the case where there is no end-user, your application code should log
> an error condition that can be managed manually in an interactive
> fashion or it could requery the data, assuming this is something it can
> work around.
> For a nightly batch process, you could lock the entire table within your
> transaction.
>
> I'm not sure what you are describing here. A change is a change.
> Presumably, you have a stored procedure to manage each type of change to
> your data. Maybe you can elaborate on this part a little more.
>
> --
> David Gugick - SQL Server MVP
> Quest Software
>Oliver wrote:
> Hi David,
> I think you are right that this is not a server's job. I assumed that
> the server has the original record available in the Deleted version
> of the record in a trigger - but this is probably not the record
> state the user first read into a form.
> Oliver
Can't you use either the dbOptimistic or dbOptimisticValue LockEdit
parameter on the Recordset? I think dbOptimisticValue does a column by
column value comparison before updating. It's been a long time since
I've looked at DAO, so this might be a better question for an Access
newsgroup.

> I really think Microsoft
> should solve this problem by changing the bound forms so that only
> the changed fields get updated and overwrite by default - may with an
> option to switch this behaviour on and off...
I think this is a bit of a risk for those users programming using bound
forms (not recommended in my opinion for any important application - but
that's another topic). The point I tried to make in my last post was
that it's too much of a risk to update some columns and not others -
there's no way to know if the relationship between them is important in
some manner.
David Gugick - SQL Server MVP
Quest Software

Sunday, February 19, 2012

How can I troubleshoot eratic, slow SQL Backup job?

I have a SQL 2000 sp3 server running on a server class machine with
local drives.
I'm backing up a 50 gig db from the e partition to the F: partition.
Sometimes the backup takes 20 minutes...sometimes it takes 2.5 hours.
There are no jobs running when the backups execute, no index rebuilds,
no veritas, no virus scans running.
I'll run a backup and it will take 20 minutes. I rerun it again
right away and it takes 2.5 hours.
I run a statistics IO trace, and the only difference is the cumulative
wait time...which is much much higher when the backup takes 2.5 hours.
Any suggestions on how to troubleshoot this? Or why it might be
happening?On Apr 16, 5:51 pm, "Sanctus" <mch...@.hotmail.com> wrote:
> I have a SQL 2000 sp3 server running on a server class machine with
> local drives.
> I'm backing up a 50 gig db from the e partition to the F: partition.
> Sometimes the backup takes 20 minutes...sometimes it takes 2.5 hours.
> There are no jobs running when the backups execute, no index rebuilds,
> no veritas, no virus scans running.
> I'll run a backup and it will take 20 minutes. I rerun it again
> right away and it takes 2.5 hours.
> I run a statistics IO trace, and the only difference is the cumulative
> wait time...which is much much higher when the backup takes 2.5 hours.
> Any suggestions on how to troubleshoot this? Or why it might be
> happening?
Here are some ideas...
E: to F: - are these different drives on a san and does the backup
have to go accross the network - higher network traffic at times?
Network saturation?
Are their heavier user processes at times? Heavy duty queries/long
running transactions?
Is this a dedicated SQL Server, could another application be hogging
the Memory or IO?
As you can see, I am just shooting blind. Maybe some of these ideas
can help you think how to investigate?

How can I troubleshoot eratic, slow SQL Backup job?

I have a SQL 2000 sp3 server running on a server class machine with
local drives.
I'm backing up a 50 gig db from the e partition to the F: partition.
Sometimes the backup takes 20 minutes...sometimes it takes 2.5 hours.
There are no jobs running when the backups execute, no index rebuilds,
no veritas, no virus scans running.
I'll run a backup and it will take 20 minutes. I rerun it again
right away and it takes 2.5 hours.
I run a statistics IO trace, and the only difference is the cumulative
wait time...which is much much higher when the backup takes 2.5 hours.
Any suggestions on how to troubleshoot this? Or why it might be
happening?On Apr 16, 5:51 pm, "Sanctus" <mch...@.hotmail.com> wrote:
> I have a SQL 2000 sp3 server running on a server class machine with
> local drives.
> I'm backing up a 50 gig db from the e partition to the F: partition.
> Sometimes the backup takes 20 minutes...sometimes it takes 2.5 hours.
> There are no jobs running when the backups execute, no index rebuilds,
> no veritas, no virus scans running.
> I'll run a backup and it will take 20 minutes. I rerun it again
> right away and it takes 2.5 hours.
> I run a statistics IO trace, and the only difference is the cumulative
> wait time...which is much much higher when the backup takes 2.5 hours.
> Any suggestions on how to troubleshoot this? Or why it might be
> happening?
Here are some ideas...
E: to F: - are these different drives on a san and does the backup
have to go accross the network - higher network traffic at times?
Network saturation?
Are their heavier user processes at times? Heavy duty queries/long
running transactions?
Is this a dedicated SQL Server, could another application be hogging
the Memory or IO?
As you can see, I am just shooting blind. Maybe some of these ideas
can help you think how to investigate?

How can I troubleshoot eratic, slow SQL Backup job?

I have a SQL 2000 sp3 server running on a server class machine with
local drives.
I'm backing up a 50 gig db from the e partition to the F: partition.
Sometimes the backup takes 20 minutes...sometimes it takes 2.5 hours.
There are no jobs running when the backups execute, no index rebuilds,
no veritas, no virus scans running.
I'll run a backup and it will take 20 minutes. I rerun it again
right away and it takes 2.5 hours.
I run a statistics IO trace, and the only difference is the cumulative
wait time...which is much much higher when the backup takes 2.5 hours.
Any suggestions on how to troubleshoot this? Or why it might be
happening?
On Apr 16, 5:51 pm, "Sanctus" <mch...@.hotmail.com> wrote:
> I have a SQL 2000 sp3 server running on a server class machine with
> local drives.
> I'm backing up a 50 gig db from the e partition to the F: partition.
> Sometimes the backup takes 20 minutes...sometimes it takes 2.5 hours.
> There are no jobs running when the backups execute, no index rebuilds,
> no veritas, no virus scans running.
> I'll run a backup and it will take 20 minutes. I rerun it again
> right away and it takes 2.5 hours.
> I run a statistics IO trace, and the only difference is the cumulative
> wait time...which is much much higher when the backup takes 2.5 hours.
> Any suggestions on how to troubleshoot this? Or why it might be
> happening?
Here are some ideas...
E: to F: - are these different drives on a san and does the backup
have to go accross the network - higher network traffic at times?
Network saturation?
Are their heavier user processes at times? Heavy duty queries/long
running transactions?
Is this a dedicated SQL Server, could another application be hogging
the Memory or IO?
As you can see, I am just shooting blind. Maybe some of these ideas
can help you think how to investigate?