Smart Grid Applications Overview > Responder Overview > Upgrade Existing Responder Implementation > Upgrade Responder Tables > SQLServer > 9.1.2 Upgrade Scripts - SQLServer |
Version: 10.1 |
The following implementation scripts must be run on your Responder SQLServer database to add the correct tables, views, and indices to upgrade Responder to version 9.1.2. When upgrading Responder execute ONLY the Upgrade script(s) that fall between your previous release and the new release to which you are upgrading. Do NOT execute any Implementation Scripts.
Responder requires two databases: Responder and Archive. Some scripts are run on the Responder database and some on the Archive database. In the list below, the database on which the script should be executed is in parentheses.
- 912_01_RxTables_mssql.sql
- 912_02_ArchiveTables_mssql.sql
- 912_03_ArcJoinViews_mssql.sql
- 912_04_GenerateGrants_mssql.sql
Before executing this script, you will need to modify the feature class names within it to match those in your geodatabase. Open the script and ensure that the feature class names in the script match the corresponding feature class names in your geodatabase. If you have done this for a previous release, you may use the prior script and copy/paste the new views into it. This would prevent the need to re-update feature class names for all views. |
-- rx_editor role can edit data in responder or archive schema select 'grant insert, update, delete, select on ' + table_name + ' to rx_editor ;' from information_schema.tables where table_type = 'base table' and table_schema = 'responder' go select 'grant select on ' + table_name + ' to rx_editor ;' from information_schema.tables where table_type = 'view' and table_schema = 'responder' go -- rx_viewer role can view data in responder schema select 'grant select on ' + table_name + ' to rx_viewer ;' from information_schema.tables where table_type = 'base table' and table_schema = 'responder' go select 'grant select on ' + table_name + ' to rx_viewer ;' from information_schema.tables where table_type = 'view' and table_schema = 'responder' go
The table_schema = 'responder' portion above refers to the database owner (Responder). |
The first four lines assign permissions to a role for tables. The second set of four lines assign permissions to a role for views (views can only be assigned the Select permission). The last eight lines perform the same tasks as the first half, but for views rather than tables. You will need a set of lines for each role to which you wish to assign permissions to tables and views. The next few steps describe how to perform the modifications you may wish to make for each role.
You may execute the same script for the Responder database and Archive database. The script MUST be executed on both databases. |
grant insert, update, delete, select on RX_TAG_GROUND_STEPS_HISTORY to rx_editor ; grant insert, update, delete, select on RX_TAGS_AND_GROUNDS to rx_editor ; grant insert, update, delete, select on RX_TAGS_AND_GROUNDS_HISTORY to rx_editor ; grant insert, update, delete, select on RX_TRUCKS to rx_editor ; grant insert, update, delete, select on RX_TRUCKS_HISTORY to rx_editor ; grant insert, update, delete, select on RX_USERS to rx_editor ;(41 row(s) affected)
---------------------------------------------------------------------------------------
grant select on Current_Outages to rx_editor ; grant select on RX_CREW_ASSIGNMENT_COUNT_VIEW to rx_editor ; grant select on RX_CREW_INCDEV_DPD_VIEW to rx_editor ; grant select on RX_CREW_INCDEV_FUS_VIEW to rx_editor ;