This content has been marked as final.
Show 2 replies
-
Re: SQLTables - TABLE_OWNER
Petter Skjolden Apr 11, 2018 11:40 AM (in response to Maria Sandorova )This is from the Microsoft SQL Server documentation:
- The following columns have been renamed for ODBC 3.x. The column name changes do not affect backward compatibility because applications bind by column number.
ODBC 2.0 column ODBC 3.x column TABLE_QUALIFIER TABLE_CAT TABLE_OWNER TABLE_SCHEM TABLE_OWNER has been renamed to TABLE_SCHEM and you will find that after executing SQLTables.
To be precise you may want to bring in the two extra tables to get more information and current and accurate ownership: msdb.sys.database_principals and msdb.sys.schemas.
LIB CONNECT TO 'MSSQL'; PRINCIPALS: SQL SELECT name, "principal_id", "type", "type_desc", "default_schema_name", "create_date", "modify_date", "owning_principal_id", sid, "is_fixed_role", "authentication_type", "authentication_type_desc", "default_language_name", "default_language_lcid", "allow_encrypted_value_modifications" FROM msdb.sys."database_principals"; SCHEMAS: SQL SELECT name AS TABLE_SCHEM, // to connect it to the correct field in SQLTABLES later "schema_id", "principal_id" FROM msdb.sys.schemas; SQLTABLES: SQLTables;
-
Re: SQLTables - TABLE_OWNER
Maria Sandorova Apr 11, 2018 12:01 PM (in response to Petter Skjolden )Thank you .