blob: c3a492aa87808e509c124042bf642c227aa0c748 [file] [log] [blame]
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -08001gsql
2====
3
4NAME
5----
6gsql - Administrative interface to idle database
7
8SYNOPSIS
9--------
10[verse]
11'java' -jar gerrit.war 'gsql' -d <SITE_PATH>
12
13DESCRIPTION
14-----------
15Interactive query support against the configured SQL database.
16All SQL statements are supported, including SELECT, UPDATE, INSERT,
17DELETE and ALTER.
18
19This command is primarily intended to access a local H2 database
20which is not currently open by a Gerrit daemon. To access an open
21database use link:cmd-gsql.html[gerrit gsql] over SSH.
22
23OPTIONS
24-------
25
26-d::
27\--site-path::
28 Location of the gerrit.config file, and all other per-site
Edwin Kempinf1acbb82011-09-15 12:49:42 +020029 configuration data, supporting libraries and log files.
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080030
31CONTEXT
32-------
33This command can only be run on a server which has direct
34connectivity to the metadata database, and local access to the
35managed Git repositories.
36
37EXAMPLES
38--------
39To 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
54GERRIT
55------
56Part of link:index.html[Gerrit Code Review]