473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Accessing SQL Server 2005 via Scheduled Task

I have a strange problem that I think deals with security on SQL 2005.
I have a scheduled task that runs on a Windows 2000 machine. It calls
a vb script which creates a connection to SQL Server.

We migrated a database from SQL 2000 to 2005 which is on a different
box. I changed the connection in the vb script to use the new sql
server. The original connection to SQL 2000 used the 'sa' account
coded into the connection string , which we don't want to use on the
new server, so I changed the connection string in the script to use
the below login information.

Const strConnection = "Provider=SQLOLEDB;Data
Source=SQLServer;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=database;

I created a domain user and gave it dbo rights on the new database on
SQL 2005 as well as administrative rights on the local machine and the
network. The task runs fine for a while and then it will fail to
start. I have looked in the event log as well as the SQL log and have
not found anything else that ran when my task failed. Once it has
failed, if I manually run the vb script on the 2000 machine, it runs
just fine, but the schedule won't work. If I change the name of the
user that is running the scheduled task, it will begin working again.
I have run the profiler on SQL 2005 and watched the scheduled task
login as the correct user and update the database. There is no
pattern to when the scheduled task will stop running. This has been
happening for a few days now.

This script and scheduled task worked fine for over a year on the
machine when it logged into SQL 2000 and nothing else has changed,
which makes me think it is related to the SQL 2005 server. Any ideas?

May 22 '07 #1
1 7469
Hi

"Myster Edd" <my*******@gmail.comwrote in message
news:11********************@z24g2000prd.googlegrou ps.com...
>I have a strange problem that I think deals with security on SQL 2005.
I have a scheduled task that runs on a Windows 2000 machine. It calls
a vb script which creates a connection to SQL Server.

We migrated a database from SQL 2000 to 2005 which is on a different
box. I changed the connection in the vb script to use the new sql
server. The original connection to SQL 2000 used the 'sa' account
coded into the connection string , which we don't want to use on the
new server, so I changed the connection string in the script to use
the below login information.

Const strConnection = "Provider=SQLOLEDB;Data
Source=SQLServer;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=database;

I created a domain user and gave it dbo rights on the new database on
SQL 2005 as well as administrative rights on the local machine and the
network. The task runs fine for a while and then it will fail to
start. I have looked in the event log as well as the SQL log and have
not found anything else that ran when my task failed. Once it has
failed, if I manually run the vb script on the 2000 machine, it runs
just fine, but the schedule won't work. If I change the name of the
user that is running the scheduled task, it will begin working again.
I have run the profiler on SQL 2005 and watched the scheduled task
login as the correct user and update the database. There is no
pattern to when the scheduled task will stop running. This has been
happening for a few days now.

This script and scheduled task worked fine for over a year on the
machine when it logged into SQL 2000 and nothing else has changed,
which makes me think it is related to the SQL 2005 server. Any ideas?
I assume that the task worked fine when you profiled it on the SQL 2005
server? Have you run a server side trace to trap this being run when it
fails?
How often does this task run?
As this sounds like a windows scheduled task are you using SQL Express?
Have you installed any service packs on the SQL Server (SELECT @@VERSION)?
Does the schedule run on a different machine to the server?
Do you run AV or IDS software on the database server?

John
May 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Colin Steadman | last post by:
We have a number of scheduled tasks on our IIS server that run daily at some point during the early morning. These tasks run as a specific user that has the correct permissions to perform whatever...
3
by: Greg D. Moore \(Strider\) | last post by:
Ok, I thought this one would be easy. I have a stored proc: master.dbo.restore_database_foo This is on database server B. Database server A backs up database foo on a daily basis as a...
5
by: A. Lovhaug | last post by:
I have a console application built in the .NET Framework. This application basically executes an XCopy based on parameters that I pass to it. I use it for creating scripts for backing up folders,...
6
by: John Bowman | last post by:
Hi, I have a C# app that needs to launch the "Add Scheduled Tasks" wizard found in the control panel "Scheduled Tasks" applet. I realize that this "applet" really just opens the tasks folder,...
1
by: NiponW | last post by:
I 'm using SQL Server 2000 Enterprise Edition in Windows 2000 Sever box. Now , message "SQL Server has encountered 1 occurrence(s) of IO requests taking longer than 15 seconds to complete on...
4
by: Geoff Lane | last post by:
Development environment: Windows 2003 Server running IIS6 and the same server running as a domain controller, DNS and DHCP servers. Production environment: Windows 2000 Server SP4 running IIS5...
9
by: Mantorok | last post by:
Hi all C# v2.0 I want to update a server which is in our DMZ, to access this server I always need to enter the admin user id and password. I want to copy some files overnight to this server...
1
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
9
by: jdaelhousen | last post by:
I have a bit of a problem I'm hoping someone can shed some light on... I have a VB.Net console application written in VS 2003 that produces a .exe file that now sits on a Windows 2000 server...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.