Showing posts with label agent. Show all posts
Showing posts with label agent. Show all posts

Friday, March 30, 2012

modified connection in package cionfiguration - sql server agent job refuses to run

Hello,

Here is the following mind-numbing problem I have (and wished I did not have to experience)

A set of 2 SSIS packages is scheduled to run in a sql server agent job on the same server. Both packages use an environment variable that point to a package configuration file. In this file there are 2 connections, one to a sql server with a sql server user id and passwordn, another to an AS400 DB2. Both packages are deployed on the same server in SSIS server under MSDB sql storage, with package protection level set to 'rely on server storage and roles for access control'.

Today the connection to the As400 needed to change, it is now connected to another AS400 server. The packages have been modified to use the new connection. In the configuration file the old connection has been commented out and the new connection string was added, the connection itself was given a new more meaningfull name in the packages.

Running the packages from visual studio 2005 works. After testing I have deployed the packages to SSIS server in MSDB storage.

Now when I start the sql server agent job that runs these packages, the job quits with an error, in the history I see an error message that it failed to connect to the sql server with the given sql server user account.

When I the step in the sql server agent job properties for both packages, under the Tab 'Data sources' I see that it is using the new AS400 connection. I can also see the connectionstring for the sql server with the user id (but no password).

To make it possible for my packages to run (the users are waiting for the data) I have solved it like this:

- under the 'configurations' tab I have added the name of my package configuration file.

- i did this for both packages in both job steps

when I run the job , it works without problems.

Now , my question is: I have hardcoded the pathname for the package configuration file in my job. Instead of the package using the environment variable to find th epackage configuration file. I would prefer my packages , when in a sql server agent job to also use the environment variable. What can I do to make this happen?

Flabbergasted as always,

Hello,

I have found the cause of the problem and the answer to my question.

I forgot to mention one of the steps of the modification: the package configuration file was moved to another drive, to centralize all configuration files on the same drive and folder. The environment variable fior the config file had been changed to point to the new and correct location, the config file had been deleted from the old location. But the SSIS server had NOT been restarted.

therefore the probable reason of the problem was: when the job was run, the package was given the in memory environment variable value from SSIS server and did not find the package configuration file, it then used the connections string information kept in the package. but in a package the password is never stored, so it could not connect to the sql server. It may also have received the connection from the sql server agent job (in the 'Data sources' tab under the job step properties) but in there the password is not kept either.

I have copied the package configuration file back to the old drive and folder and removed the package configuration file name from the 'Connections' tab in the job step properties. After that the job ran without problems.

Conclusion: I have to restart the SSIS service to read the environment variable again , so that it reads from the config files in the new folder.

question : is there some other way to force SSIS to read environment variables?

It is hard to think of a sentence that contains the words 'developer-friendly' and 'SSIS' (without negation). Sentences that contain the words 'mind-boggling', 'blistering barnacles' or 'cumbersome' together with 'SSIS' are easier to think of.

|||

I would agree with Jan Dhondt.SSIS package execution is not consistent under different environment and may function abnormally. Very fundamental issues have not been dealt with, the result is sleepless nights for developers like me.

This is what I am stuck with:

I have a SSIS package, which dynamically connects to a flat file data source and loads the data to an OLE DB destination.

The package when executed from the command prompt, with the 'dtExec' utility, and executed from structured file storage works fine and loads the data from any folder location without any error. It also executes fine, when executed from Query designer or SQL Agent Job, if the flat file data source resides in the same directory as the package or any of sub directories of the saved package; but when the package is executed from the Query designer or SQL Agent Job, and when the data source file, is not saved in the directory or sub directories same as the package source the package gives throws a strange error:

Code: 0xC001401E

Source: SSISPackage_Data_Import Connection manager "FlatFileConnectionManager"

Description: The file name "\\filepath\Training_090909.txt" specified in the connection was not valid.

Also the variable(varFilename), which dynamically stores the location of the flat file data source, has a valid default value, so it shouldn't give any design time validation error. I don't have a package configuration file.

Any help on this would be appreciated.

Hope that MS would deal with such issues before it is too late.

Thanks

|||

If the package is started from a sql agent job, it may have different credentials than normal, and therefore may not have read access to the txt file. Is this the case?

|||I am trying to run the package in a T-SQL statement.

modified connection in package cionfiguration - sql server agent job refuses to run

Hello,

Here is the following mind-numbing problem I have (and wished I did not have to experience)

A set of 2 SSIS packages is scheduled to run in a sql server agent job on the same server. Both packages use an environment variable that point to a package configuration file. In this file there are 2 connections, one to a sql server with a sql server user id and passwordn, another to an AS400 DB2. Both packages are deployed on the same server in SSIS server under MSDB sql storage, with package protection level set to 'rely on server storage and roles for access control'.

Today the connection to the As400 needed to change, it is now connected to another AS400 server. The packages have been modified to use the new connection. In the configuration file the old connection has been commented out and the new connection string was added, the connection itself was given a new more meaningfull name in the packages.

Running the packages from visual studio 2005 works. After testing I have deployed the packages to SSIS server in MSDB storage.

Now when I start the sql server agent job that runs these packages, the job quits with an error, in the history I see an error message that it failed to connect to the sql server with the given sql server user account.

When I the step in the sql server agent job properties for both packages, under the Tab 'Data sources' I see that it is using the new AS400 connection. I can also see the connectionstring for the sql server with the user id (but no password).

To make it possible for my packages to run (the users are waiting for the data) I have solved it like this:

- under the 'configurations' tab I have added the name of my package configuration file.

- i did this for both packages in both job steps

when I run the job , it works without problems.

Now , my question is: I have hardcoded the pathname for the package configuration file in my job. Instead of the package using the environment variable to find th epackage configuration file. I would prefer my packages , when in a sql server agent job to also use the environment variable. What can I do to make this happen?

Flabbergasted as always,

Hello,

I have found the cause of the problem and the answer to my question.

I forgot to mention one of the steps of the modification: the package configuration file was moved to another drive, to centralize all configuration files on the same drive and folder. The environment variable fior the config file had been changed to point to the new and correct location, the config file had been deleted from the old location. But the SSIS server had NOT been restarted.

therefore the probable reason of the problem was: when the job was run, the package was given the in memory environment variable value from SSIS server and did not find the package configuration file, it then used the connections string information kept in the package. but in a package the password is never stored, so it could not connect to the sql server. It may also have received the connection from the sql server agent job (in the 'Data sources' tab under the job step properties) but in there the password is not kept either.

I have copied the package configuration file back to the old drive and folder and removed the package configuration file name from the 'Connections' tab in the job step properties. After that the job ran without problems.

Conclusion: I have to restart the SSIS service to read the environment variable again , so that it reads from the config files in the new folder.

question : is there some other way to force SSIS to read environment variables?

It is hard to think of a sentence that contains the words 'developer-friendly' and 'SSIS' (without negation). Sentences that contain the words 'mind-boggling', 'blistering barnacles' or 'cumbersome' together with 'SSIS' are easier to think of.

|||

I would agree with Jan Dhondt.SSIS package execution is not consistent under different environment and may function abnormally. Very fundamental issues have not been dealt with, the result is sleepless nights for developers like me.

This is what I am stuck with:

I have a SSIS package, which dynamically connects to a flat file data source and loads the data to an OLE DB destination.

The package when executed from the command prompt, with the 'dtExec' utility, and executed from structured file storage works fine and loads the data from any folder location without any error. It also executes fine, when executed from Query designer or SQL Agent Job, if the flat file data source resides in the same directory as the package or any of sub directories of the saved package; but when the package is executed from the Query designer or SQL Agent Job, and when the data source file, is not saved in the directory or sub directories same as the package source the package gives throws a strange error:

Code: 0xC001401E

Source: SSISPackage_Data_Import Connection manager "FlatFileConnectionManager"

Description: The file name "\\filepath\Training_090909.txt" specified in the connection was not valid.

Also the variable(varFilename), which dynamically stores the location of the flat file data source, has a valid default value, so it shouldn't give any design time validation error. I don't have a package configuration file.

Any help on this would be appreciated.

Hope that MS would deal with such issues before it is too late.

Thanks

|||

If the package is started from a sql agent job, it may have different credentials than normal, and therefore may not have read access to the txt file. Is this the case?

|||I am trying to run the package in a T-SQL statement.sql

Monday, March 19, 2012

Missing What To Start SQLServer Agent in EM

Installed Office service pack and it 'messed' up the Enterprise Manager. Af
ter reinstalling the client tools and the sp3a service pack all worked but s
cheduled jobs. It turns out that the SQL Server Agent is not running. It d
oesn't automatically start
up but can be started from DOS whereby my jobs in turn can execute with no p
roblem.
Would like to know what the proper registry setting for SQLServerAgent under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl
Set\Services\SQLServerAgent should
be for SQL Server 8.0.859 with service pack 3a as suspect that the problem m
ay be there.
Otherwise open to suggestions so that do not have to backup, uninstall, and
reinstall 10 database.....
Thanxs,
dmatta59The first thing to do here is go into the Control Panel -> Admin Tools ->
Services applet & see if the SQLAgent$[instance] service is configured t
o
auto-start. Your post doesn't indicated that you've done that, so make sure
the service's "Startup Type" property is set to "Automatic". If it still
doesn't start automatically, check the Windows Event Log to see what's
wrong.
Regards,
Greg Linwood
SQL Server MVP
"dmatta59" <anonymous@.discussions.microsoft.com> wrote in message
news:6F7A83AF-FE7A-46EF-8F44-50C94788109C@.microsoft.com...
> Installed Office service pack and it 'messed' up the Enterprise Manager.
After reinstalling the client tools and the sp3a service pack all worked but
scheduled jobs. It turns out that the SQL Server Agent is not running. It
doesn't automatically start up but can be started from DOS whereby my jobs
in turn can execute with no problem.
> Would like to know what the proper registry setting for SQLServerAgent
under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControl
Set\Services\SQLServerAgent
should be for SQL Server 8.0.859 with service pack 3a as suspect that the
problem may be there.
> Otherwise open to suggestions so that do not have to backup, uninstall,
and reinstall 10 database.....
> Thanxs,
> dmatta59|||The SqlServerAgent is set to automatic. There used to be an error 8344 Supe
rSocket Error but after the registers were cleaned and errors removed the e
rror no longer appears. When viewing the registry for SQLServerAgent there
was some mention in one of
the previous posts about a "dependancies" which is not present so would app
reciate what the registry would look like for MSSQLSERVER and SQLSERVERAGENT
.
Again it works fine if started from a dos command line but most inconvienent
not to have it start automatically or start from within the EM.
Any suggestions?
dmatta59|||Have resolved the problem. Used scm.exe to install the SQLServerAgent servi
ce using the instructions on the following article:
http://groups.google.com/groups?q=i...tngxa06&rnum=21
**Please note that the in this case the sqlagent -c -v was working from the
dos prompt and the jobs could run properly. The only problem was that the S
QLServerAgent was not automatically starting or couldn't be started within E
M.
Thank you,
dmatta59

Friday, March 9, 2012

missing SQL Server Agent

Hi,

I'm learning SQL 2005 and installed the express ADV edition to my pc. But I miss the Agent service.

Is this included in express? Has it another name after SQL server 2000?

thanks

majid

Looking at the edition comparison page (http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx), it looks like SQL Agent Job Scheduling Service only comes with Workgroup, Standard, and Enterprise.

Thanks,
Sam Lester (MSFT)|||

oh, I see, Thanx

majid

missing sql alert catergory

Hi,
When you go to EM and try to define a new alert
under 'management', 'sql server agent', there should have
two types of alerts in the selection: 'sql server event
alert', and 'sql server performance condition alert'.
One of my server is missing the second type of alert (It's
not in the drop-down box).
Any thought on what happened there and how to get it back?
Thanks a lot.
JJDo you have the SQL Server perfmon counters in perfmon? Any rows in
master..sysperfinfo? Is SQL Server started with the -x switch?
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in message
news:020f01c3a954$1aa89a30$a401280a@.phx.gbl...
> Hi,
> When you go to EM and try to define a new alert
> under 'management', 'sql server agent', there should have
> two types of alerts in the selection: 'sql server event
> alert', and 'sql server performance condition alert'.
> One of my server is missing the second type of alert (It's
> not in the drop-down box).
> Any thought on what happened there and how to get it back?
> Thanks a lot.
> JJ|||thanks, Tibor.
You are right on the target! sql server perfmon counters
are missing in perfmon on this server as well. And there
is nothing in master..sysperfinfo.
How can I get them back without risking potentially harm
the system?
SQL Server started with the -x means 'Disables the keeping
of CPU time and cache-hit ratio statistics. Allows maximum
performance.' right? I did not start sql server
explicitly this way. our server is set to be auto-restart
and I think we are just using the default settings for
startup.
Why should I choose '-x'?
thanks.
JJ
>--Original Message--
>Do you have the SQL Server perfmon counters in perfmon?
Any rows in
>master..sysperfinfo? Is SQL Server started with the -x
switch?
>--
>Tibor Karaszi, SQL Server MVP
>Archive at:
>http://groups.google.com/groups?
oi=djq&as_ugroup=microsoft.public.sqlserver
>
>"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in
message
>news:020f01c3a954$1aa89a30$a401280a@.phx.gbl...
>> Hi,
>> When you go to EM and try to define a new alert
>> under 'management', 'sql server agent', there should
have
>> two types of alerts in the selection: 'sql server event
>> alert', and 'sql server performance condition alert'.
>> One of my server is missing the second type of alert
(It's
>> not in the drop-down box).
>> Any thought on what happened there and how to get it
back?
>> Thanks a lot.
>> JJ
>
>.
>|||JJ,
I was thinking that perhaps the SQL Server was started with the -x switch
and that was the reason the counters was missing. EM, right-click the
server, Startup Parameters.
I suspect, however that the counters aren't properly registered in the
registry. There's an exe files that does this, but I always forget the name
of this file. I didn't find it in the SQL Server directories, so it is
probably in the windows directory somewhere. I suggest that you search the
archives or post a new thread with appropriate subject.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in message
news:058c01c3a97d$22e5d680$a401280a@.phx.gbl...
> thanks, Tibor.
> You are right on the target! sql server perfmon counters
> are missing in perfmon on this server as well. And there
> is nothing in master..sysperfinfo.
> How can I get them back without risking potentially harm
> the system?
> SQL Server started with the -x means 'Disables the keeping
> of CPU time and cache-hit ratio statistics. Allows maximum
> performance.' right? I did not start sql server
> explicitly this way. our server is set to be auto-restart
> and I think we are just using the default settings for
> startup.
> Why should I choose '-x'?
> thanks.
> JJ
> >--Original Message--
> >Do you have the SQL Server perfmon counters in perfmon?
> Any rows in
> >master..sysperfinfo? Is SQL Server started with the -x
> switch?
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >Archive at:
> >http://groups.google.com/groups?
> oi=djq&as_ugroup=microsoft.public.sqlserver
> >
> >
> >"JJ Wang" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:020f01c3a954$1aa89a30$a401280a@.phx.gbl...
> >> Hi,
> >>
> >> When you go to EM and try to define a new alert
> >> under 'management', 'sql server agent', there should
> have
> >> two types of alerts in the selection: 'sql server event
> >> alert', and 'sql server performance condition alert'.
> >>
> >> One of my server is missing the second type of alert
> (It's
> >> not in the drop-down box).
> >>
> >> Any thought on what happened there and how to get it
> back?
> >>
> >> Thanks a lot.
> >>
> >> JJ
> >
> >
> >.
> >