Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 1 | gsql |
| 2 | ==== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | gsql - Administrative interface to idle database |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | [verse] |
| 11 | 'java' -jar gerrit.war 'gsql' -d <SITE_PATH> |
| 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | Interactive query support against the configured SQL database. |
| 16 | All SQL statements are supported, including SELECT, UPDATE, INSERT, |
| 17 | DELETE and ALTER. |
| 18 | |
| 19 | This command is primarily intended to access a local H2 database |
| 20 | which is not currently open by a Gerrit daemon. To access an open |
| 21 | database use link:cmd-gsql.html[gerrit gsql] over SSH. |
| 22 | |
| 23 | OPTIONS |
| 24 | ------- |
| 25 | |
| 26 | -d:: |
| 27 | \--site-path:: |
| 28 | Location of the gerrit.config file, and all other per-site |
Edwin Kempin | f1acbb8 | 2011-09-15 12:49:42 +0200 | [diff] [blame] | 29 | configuration data, supporting libraries and log files. |
Shawn O. Pearce | 7c5941b | 2009-11-17 20:47:04 -0800 | [diff] [blame] | 30 | |
| 31 | CONTEXT |
| 32 | ------- |
| 33 | This command can only be run on a server which has direct |
| 34 | connectivity to the metadata database, and local access to the |
| 35 | managed Git repositories. |
| 36 | |
| 37 | EXAMPLES |
| 38 | -------- |
| 39 | To manually correct a user's SSH user name: |
| 40 | |
| 41 | ==== |
| 42 | $ java -jar gerrit.war gsql |
| 43 | Welcome to Gerrit Code Review v2.0.25 |
| 44 | (PostgreSQL 8.3.8) |
| 45 | |
| 46 | Type '\h' for help. Type '\r' to clear the buffer. |
| 47 | |
| 48 | gerrit> update accounts set ssh_user_name = 'alice' where account_id=1; |
| 49 | UPDATE 1; 1 ms |
| 50 | gerrit> \q |
| 51 | Bye |
| 52 | ==== |
| 53 | |
| 54 | GERRIT |
| 55 | ------ |
| 56 | Part of link:index.html[Gerrit Code Review] |