Populating SQL Server database APP schema
Go to Admin -> Data Centre -> Application Updates section and click the "Dump special App schema table data to .csv files" link. Extract the files to the appropriate directory accessible by MS SQL Server.
The following tables must be populated in the APP schema:
SITE
SITE_TYPE
USER_GROUP
USER_GROUP_MEMBERSHIP
USER_GROUP_ROLE
USER_INFO
Use the following BULK INSERT statement for USER_GROUP, USER_GROUP_MEMBERSHIP, and USER_GROUP_ROLE - these are tables without Identity fields (autogenerated id's). Modify the table name, file name, and path.
BULK INSERT APP.SITE FROM 'C:\tcc\updates\current\SITE.csv' WITH ( FIELDTERMINATOR = '~', ROWTERMINATOR = '\n' , DATAFILETYPE='char' )
Use this BULK INSERT statement for all of those tables for SITE, SITE_TYPE, and USER_INFO. Modify the table name, file name, and path.
BULK INSERT APP.SITE FROM 'C:\tcc\updates\current\SITE.csv' WITH ( KEEPIDENTITY, FIELDTERMINATOR = '~', ROWTERMINATOR = '\n' , DATAFILETYPE='char' )
The KEEPIDENTITY keyword enables the population of identity fields from the BULK INSERT command.
- Printer-friendly version
- Login to post comments
- PDF version