eol_premium
Package
The package eol_premium
simplifies handling of Exact Online Premium environment.
The following elements are available:
get_database_credentials
: retrieve the SQL Server credentials for the Premium environment using the Exact Online credentials.open
: add a data container to the current open database containing the SQL Server database of Exact Online Premium.
Retrieval of database credentials is for Invantive-internal use only.
Open Exact Online Premium SQL Server database
To attach the SQL Server database of Exact Online Premium use a PSQL-block on the package eol_premium
as shown below:
declare
l_server varchar2;
l_database varchar2;
l_user_name varchar2;
l_password varchar2;
--
l_result bool;
begin
--
-- Retrieve SQL Server credentials.
--
select server
, database
, user_name
, password
into l_server
, l_database
, l_user_name
, l_password
from table
( eol_premium.get_database_credentials
( 'john.doe@acme.com'
, 'secret'
--
-- Either specify: TOTP secret key,
--
, null
--
-- or the current validation code associated with the TOTP secret key.
--
, '987654'
)
)
;
--
-- Set provider attributes.
--
set [premium-db-host] l_server;
set [premium-db-name] l_database;
set [premium-db-user] l_user_name;
set [premium-db-password] l_password;
--
-- Open Premium database.
--
l_result := eol_premium.open();
--
-- Return result.
--
dbms_output.put_line('Connecting successful: ' || l_result);
end;