15 LIBNAME myLib OLEDB PROPERTIES=('initial catalog'=MyCat) DATASOURCE='MySvr' PROVIDER=SQLNCLIxx.x SCHEMA=dbo
15 ! connection=shared;
ERROR: Error trying to establish connection: Unable to Initialize: Invalid authorization specification
ERROR: Error in the LIBNAME statement.
The fix was to provide a valid connection string, eg as follows (in this particular case):
LIBNAME myLib OLEDB PROPERTIES=(
'Persist Security Info'=True
Given that this libname statement was being built dynamically from metadata, it was necessary to stick those properties into the server definition, as follows:
- Open SMC
- Expand Server Manager
- Expand the relevant Server (as specified in the Library definition)
- In the properties of the underlying Connection, select the Options tab
- Select OLE DB Connection Information Options
- Stick in the relevant properties as per the libname statement, including brackets.