Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Paschi
New Member.
936 views

SQL-Access

How can I access an SQL table located on another server/instance with an SQL login user/password?

With the assignment in the configuration file, such as
MPStamm Server. Demo. VFinanz. MPStamm
it works. But how can I add user and password to the linkage with server/Instance?

Tags (1)
0 Likes
6 Replies
Micro Focus Expert
Micro Focus Expert

RE: SQL-Access

which COBOL product are you using? Visual COBOL (if so, this post should be placed in the Visual COBOL portion of the forum), AcuCOBOL, and if so, Acu4GL for MSSQL or AcuSQL?
0 Likes
Paschi
New Member.

RE: SQL-Access

Acu4GL for MSSQL
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: SQL-Access

The configuration variables:
DEFAULT-CONNECTION value-is-the -server-name
A-MSSQL-LOGIN login-name
A-MSSQL-PASSWD password-value
A-MSSQL-DATABASE - database name
A-MSSQL-LOCK-DB - the lock database name
0 Likes
Paschi
New Member.

RE: SQL-Access

I am aware of these variables.
If I have two different connections in the identical program, can I reset the variables before the table is open? In that case, it solves my problem.
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: SQL-Access

[deleted]
0 Likes
DougP Outstanding Contributor.
Outstanding Contributor.

RE: SQL-Access

Acu4GL makes a connection to only one server, and that connection cannot be reset to a different server. You can access tables on another server with an alias, "MYTABLE OTHERSERVER.DBNAME.DBO.MYTABLE" but I don't think that will work if the credentials are different. What you should probably do is create a Linked Server to the second server within the first server.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.