Migration Guide : Migrating from Version 13.0.1 : Change in the use of AbtDatabaseLogonSpec class>>#id:password:server:
Change in the use of AbtDatabaseLogonSpec class>>#id:password:server:
The API AbtDatabaseLogonSpec class>>#id:password:server: used to ignore the server: keyword parameter. Now if it is set, it will be used to construct an EasyConnect syntax string including the server / dataSource pair.
logonSpec := AbtDatabaseLogonSpec
     id: 'id'
     password: 'password'
     server: 'oracle'. 
Reason for Change
The main reason for this change is to make it easier for the user to connect to a database.
Previously, with an entry in tnsnames.ora:
INSTTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = test.instantiations.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = instantiationsTest)
)
)
you could (and still can) either use the tns name as the data source:
| conSpec logonSpec conn |
conSpec := AbtDatabaseConnectionSpec
forDbmClass: #AbtOracle10DatabaseManager
databaseName: 'INSTTEST'.
logonSpec := AbtDatabaseLogonSpec new
id: 'username'
password: 'password'
server: nil.
conn := conSpec connectUsingAlias: 'test' logonSpec: logonSpec .
or, you could skip using TNS, and use the EasyConnect syntax with both server and service name in the databaseName:
| conSpec logonSpec conn |
conSpec := AbtDatabaseConnectionSpec
forDbmClass: #AbtOracle10DatabaseManager
databaseName: 'test.instantiations.com:1521/instantiationsTest'.
logonSpec := AbtDatabaseLogonSpec new
id: 'username'
password: 'password'
server: nil.
conn := conSpec connectUsingAlias: 'test' logonSpec: logonSpec .
Now, it also works to specify the service name and server separately, which is a bit nicer for keeping the two separate.
For instance, if there are separate test/prod DB environments, you can then only change the logonSpec to specify which environment to use.
| conSpec logonSpec conn |
conSpec := AbtDatabaseConnectionSpec
forDbmClass: #AbtOracle10DatabaseManager
databaseName: 'instantiationsTest'.
logonSpec := AbtDatabaseLogonSpec new
id: 'username'
password: 'password'
server: 'test.instantiations.com:1521'.
conn := conSpec connectUsingAlias: 'test' logonSpec: logonSpec .
Action Required
If you connect to your database using AbtDatabaseLogonSpec class>>#id:password:server: and use the server keyword parameter descriptively, you will need to set it to nil.
logonSpec := AbtDatabaseLogonSpec
     id: 'id'
     password: 'password'
     server> nil. 
 
 
Last modified date: 07/16/2025