Identifying variables overriden, not inherited

Paul Watson (101 posts)
November 5, 2015 07:20 AM
Accepted Answer

When we recently promoted a set of jobs to production, it took a while to find that there were variables specified somewhat deep into the job set. There is a reason they were set there. It is not a good reason, but it was required at the time.

The question is, in what ways can I find where variables are set rather than inherited?

The DailySummary container has 20 jobs in it. The DailySummary container defines the variable CONTEXT to have the value Prod.

The only way I know to find out if the variable has been overridden is to 1) open each and every job, 2) check the Variables tab, 3) select the Steps tab, 4) open each and every step, and 5) check each and every step variable set.

As you might imagine, this is somewhat time consuming and mouse intensive. Is there an easier and/or faster way?

Bill Staff (599 posts)
November 5, 2015 09:09 AM
Accepted Answer

Assuming this is adTempus 3 you can use the following database query to get a list of all variables that have been defined/overridden at the group, job, or step level:

select v.variablename,v.variablevalue,g.name as GroupLevel_GroupName,j1.name as JobLevel_JobName,j2.name as StepLevel_JobName,js.stepnumber as StepLevel_StepNumber
from JobVariable v left outer join jobGroup g on v.owner=g.oid
left outer join job j1 on v.owner=j1.oid
left outer join jobstep js on v.owner=js.oid left outer join job j2 on js.owner=j2.oid
order by v.variablename

The query for adTempus 4 would be a little different.

Paul Watson (101 posts)
November 5, 2015 11:40 AM
Accepted Answer

Thanks for a quick reply, Bill. Gets pretty deep pretty fast.

When I try to use adtdbutil.exe, the message appears:

Cannot connect to database: Cannot open database "adtempus_CURRENTHOSTNAME" requested by the login. The login failed.

This machine was originally running adTempus with a different hostname. Would specifying "adtempus_PREVIOUSHOSTNAME" do any good? If so, how do I specify it?

Bill Staff (599 posts)
November 5, 2015 12:45 PM
Accepted Answer
It's connecting to the correct database but you don't have permission to log on. Try running the tool As Administrator.
Paul Watson (101 posts)
November 5, 2015 02:18 PM
Accepted Answer
Thanks, Bill. I don't have permission and will need to ask someone else to do it.
Bill Staff (599 posts)
November 6, 2015 12:49 PM
Accepted Answer

If you're using your own SQL Server instance, you'll need to get help from someone with permission.

If you're using SQL Server Express installed by adTempus, for older versions of SQL Server you can connect if you are an Administrator. For newer versions, only the user who installed the software will have been configured with permissions for the database. If you can't get that user to log in for you, you'll need to make yourself a SQL Server administrator. Let me know if you need to do this and I will get instructions together.

Replies are disabled for this topic.