View previous topic :: View next topic |
Author |
Message |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Wed Jan 10, 2007 11:34 am Post subject: ODBC connection from batch file fails with Automize |
|
|
User Support Request:
We are calling batch file from windows scheduler and its working fine, but the same batch file when we are calling from the atomize we are getting an odbc connection failed error. I am sending you the attachment of the error.
(error = ODBC - Connection to remove failed) |
|
Back to top |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Wed Jan 10, 2007 11:36 am Post subject: |
|
|
1) Is the engine running in NT service mode or desktop context? if Yes, Is the service running under same account as logon user?
2) Does the batch file run correctly from Automize when engine is running in Desktop context? |
|
Back to top |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Wed Jan 10, 2007 11:36 am Post subject: |
|
|
user reply:
1) I didn’t understand your question how I need to check whether NT service mode or desktop context.
2) The batch files gets called from the automize but its giving me the odbc error, but when I am running the same batch file from the NT scheduler or double clicking the batch files, I don’t get the odbc error. The problem is not the odbc connection because its running from the NT scheduler. When automize calls the same batch files I am getting the odbc error.
3) Kindly solve this issue at the earliest. The production was affected because of this issue.
Last edited by melvin on Wed Jan 10, 2007 11:38 am; edited 1 time in total |
|
Back to top |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Wed Jan 10, 2007 11:38 am Post subject: |
|
|
1) Seems like you are running without NT service which makes this issue easier to resolve.
2) which task are you using? command or wincommand? There is no problem with the command or wincommand tasks. they have been around for years now. It is a likely a matter of either system or user environment that is not being passed via Automize.
3) send us the following:
a) Help menu / email support generator - select your task in the tasks to analyze field. then click on the ZIP button and email us the support.zip file
b) Describe your batch file or send it to us. does it call another executable that then runs the ODBC connection? or are the ODBC commands in the batch file itself?
4) You say production was effected by this issue? Does this mean that the task was running correctly in the past ? when has it stopped running? what changes were done recently that could have resulted in this task failing to run. |
|
Back to top |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Wed Jan 10, 2007 11:41 am Post subject: |
|
|
User reply:
1) I recently installed NT service for the automize and from the day i have installed the service the automize is not working.
2) I am running the command task.
3) The batch file just calls the dts. the batchfile name is xx.bat
dtsrun /s xx /u user /p pass /n remove
The dts calls odbc connection. The dts runs fine when i am running manually from sqlserver or by double clicking the batch files but i am getting odbc error when i am calling from automize.
Kindly solve this issue at the earliest. |
|
Back to top |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Wed Jan 10, 2007 11:41 am Post subject: |
|
|
1) Then definitely it is a NT service related issue.
2) You have started the NT service using the SYSTEM account. This account does not have access to network resources. Addditionally, your ODBC is likely setup as USER DSN and not SYSTEM DSN?
3) Change the NT service account to 'administrator' which is your normal
desktop logon account. enter you logon password in this account setup in service control manager. Then restart the service. |
|
Back to top |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Fri Jan 12, 2007 7:24 am Post subject: |
|
|
user reply:
I have changed NT service account to administrator account. The batch file contains an exe and dts transfer. When i changed to NT service account both exe and dts are not working. When I changed the service to local system account the exe in the batch file is running but the dts transfer getting odbc error. The user name and password for the NT service account is the right one because I am getting the failure email messages.
Last edited by Robert on Fri Jan 12, 2007 7:26 am; edited 1 time in total |
|
Back to top |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Fri Jan 12, 2007 7:25 am Post subject: |
|
|
1) the 3rd party exe works from windows scheduler and automize in regular context (without NT service)
2) therefore the issue is runing the task in NT service context. There is
some permissions/security/environment issue between NT service and the exe.
3) CHECKS: answer each one with yes/no
a) Is it USER DSN or SYSTEM DSN that ODBC is setup with?
b) What user account was the USER DSN created with?
c) does this user account in b) above have admin previleges?
d) is this the same user account that was logged on when automize was
installed ?
e) is this the same user account that is currently logged on?
f) is this the same user account that the Automize NT service is started
with?
3) setup and run both command and wincommand tasks to run this exe
4) then create and send us your support.zip again |
|
Back to top |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Sat Jan 13, 2007 10:26 am Post subject: |
|
|
User Reply:
We are not using USER DSN; we are using only system DSN. We have created System DSN with administrator account with all privileges. Exe, DSN, automize all installed with administrator account. |
|
Back to top |
|
 |
Robert Site Admin
Joined: 25 May 2006 Posts: 1140
|
Posted: Sat Jan 13, 2007 10:27 am Post subject: |
|
|
Try and setup a USER DSN. The service is started with a user account, and I am not sure it would be allowed to access a system DSN? |
|
Back to top |
|
 |
melvin Site Admin
Joined: 25 May 2006 Posts: 635 Location: Santa Barbara, california
|
Posted: Sat Jan 13, 2007 5:19 pm Post subject: |
|
|
The user replied that it does not work for them in all cases.
1) We have successfully tested an ODBC connection via Automize both in Desktop context and NT service mode.
2) We have successfully tested connecting to an ODBC database with both user DSN and system DSN, when Automize is run as a Service.
3) The NT service should be started by an admin user account that was logged on when Automize was installed, and the same admin account should be used to setup the user DSN.
The users have a custom batch file and 3rd party visual basic exectuable that connects to the ODBC database. Unfortunately there is nothing we can do to help from our end with regards to a 3rd party executable. |
|
Back to top |
|
 |
|