Version: 10.2.1c and 10.2.1c SP3 |
Responder Overview > Implement Responder > Implementation Scripts - SQL Server |
The following implementation scripts must be run on your Responder SQLServer database to add the correct tables, views, and indices. When performing a new Responder implementation execute ONLY the Implementation Scripts. Do NOT execute any Upgrade 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.
- 01_RxTables.sql (Responder)
- 02_ArcJoinViews.sql (Responder)
- 03_ArchiveTables.sql (Archive)
- 04_GenerateGrants.sql (Responder and Archive)
- 05_SnapshotIsolation.sql (Responder and Archive)
If your SDE tables reside in a database other than SDE, you will need to edit the script to set the correct database name. For example, if your database is named DB, then the following would change: FROM SDE.SDE.GDB_ITEMS It would become: FROM DB.SDE.GDB_ITEMS Be sure to search the script for all instances of SDE.SDE. and modify to include the correct database name. |
-- 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 assign permissions to tables and views. The next few steps describe how to perform the modifications you can 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 ;
The final script (05_SnapshotIsolation.sql) requires that the user executing it have sysadmin privileges. To execute the script, only the connection running the script should connect to the database. If any other connections are present, the query will try to execute indefinitely.