Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Dynamic MS Sql Connection String
Topic Summary: Is a dynamic connection string for ms sql possible in BPA
Created On: 06/30/2015 08:04 AM
Status: Read Only
Linear : Threading : Single : Branch
 Dynamic MS Sql Connection String   - TonGordon - 06/30/2015 08:04 AM  
 Dynamic MS Sql Connection String   - Valentineo McGowan - 07/01/2015 12:34 PM  
 Dynamic MS Sql Connection String   - TonGordon - 07/02/2015 05:22 AM  
 Dynamic MS Sql Connection String   - Leonard Amabile - 07/04/2015 06:46 PM  
 Dynamic MS Sql Connection String   - TonGordon - 07/08/2015 12:22 PM  
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Leonard Amabile, on Monday, July 6, 2015 12:14 PM

The GetComputerName() function will not work in the MS SQL Data Link Properties. However, once you have created a connection string, you can replace portions with a variable or expression.

 06/30/2015 08:04 AM
User is offline View Users Profile Print this message

Author Icon
Journeyman (50-99)

Posts: 87
Joined: 05/17/2011

We have a goal in our organization of just changing the Agent on the Workflow and having that job run correctly on our dev/uat/prod lifecycle machines. I understand how to do that for disk references by using agent variables to handle the drive references for running programs and file references. But I'm having a little trouble having the connection string to our ms sql databases dynamically point to the correct database server based on the agent machine. When I build the task with no agent machine assigned not much choice comes up in terms of connection strings. When I go into the task through the Workflow editor with an Agent assigned I get the Agent Connection strings for that environment. But that makes me suspicious that if I changed the Agent in the Workflow whether it would work at runtime and switch over to the other database server. So is this possible and if so how do you specify the connection string so it can be dynamic? Or to put this question a little differently, if I had two identically named pre-defined connection strings (say defaultDBServer) on two agents, if I switched the Agents on the task, would that switch the database the task connected to?

 Category Survey
AutoMate BPA Server 9 version:
Windows version:

Edited: 07/01/2015 at 07:00 AM by TonGordon
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 2994 guests browsing this forum, which makes a total of 2994 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog