cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Work Around Incorrect Schema Issue When Creating AdminStudio Database Manually From Scripts

How to Work Around Incorrect Schema Issue When Creating AdminStudio Database Manually From Scripts

Synopsis:

You may run into issues creating tables with the correct dbo schema when running the SQL Scripts manually.

 

Description:

This can happen if the Default Schema being used is something other than dbo.

A symptom of this would be seeing the table created something like nondboschema.ASCMPackageData instead of dbo.ASCMPackageData.

This can break the proper execution of scripts manually and if ignored could affect the creation of the database properly.

 

A solution to this would be to set the user's default schema used to dbo.

 

Example:

This SQL statement can be used and added to the beginning of the adminstudio SQL scripts given to set the schema to dbo:

ALTER USER [DOMAIN\USERNAME] WITH DEFAULT_SCHEMA=dbo EXECUTE AS USER='DOMAIN\USERNAME'

 

This SQL statement can be used to check the schema used:

SELECT SCHEMA_NAME()

 

 Additional Information:

Here is a link to our documentation on Creating New Application Catalogs Using Scripts.

https://docs.flexera.com/adminstudio2019r2sp1/adminstudio.htm#helplibrary/ASIDETaskCreateUsingScripts.htm#applicationcatalogs_3514464006_1091964%3FTocPath%3DManaging%2520Applications%2520and%2520Application%2520Catalog%2520Databases%7CManaging%2520Application%2520Catalogs%7CCreating%2520New%2520Appl...

Labels (1)
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Jun 25, 2020 01:16 PM
Updated by:
Contributors