Setting a user's default database (default schema) on ASA

Teradata's database names translate to schema names on the target system. Teradata allows for users to have a custom default database name configured, which will be used when looking up unqualified objects. Hyper-Q supports SQL DW's DEFAULT_SCHEMA property for users to provide the same functionality and allow legacy applications to run unchanged.

To set a user's DEFAULT_SCHEMA property, run the following statement on ASA:

ALTER USER <username> WITH DEFAULT_SCHEMA = <new default schema>;

To query a user's DEFAULT_SCHEMA property, run the following statement on ASA:

SELECT default_schema_name FROM sys.database_principals WHERE type = 'S' AND name = '<username>';

For more information, please refer to https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-user-transact-sql?view=azure-sqldw-latest

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.