blob: 4986522191e81a0f72c0ec2d0ce0a36e07001657 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= gsql
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -08002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== NAME
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -08004gsql - Administrative interface to idle database
5
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08006== SYNOPSIS
Michael Ochmanna8434612016-07-08 10:58:27 +02007[verse]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08008--
Michael Ochmanna8434612016-07-08 10:58:27 +02009_java_ -jar gerrit.war _gsql_
10 -d <SITE_PATH>
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080011--
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080012
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080013== DESCRIPTION
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080014Interactive query support against the configured SQL database.
15All SQL statements are supported, including SELECT, UPDATE, INSERT,
16DELETE and ALTER.
17
18This command is primarily intended to access a local H2 database
19which is not currently open by a Gerrit daemon. To access an open
20database use link:cmd-gsql.html[gerrit gsql] over SSH.
21
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080022== OPTIONS
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080023
24-d::
Yuxuan 'fishy' Wang77e15082013-12-09 15:43:25 -080025--site-path::
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080026 Location of the gerrit.config file, and all other per-site
Edwin Kempinf1acbb82011-09-15 12:49:42 +020027 configuration data, supporting libraries and log files.
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080028
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080029== CONTEXT
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080030This command can only be run on a server which has direct
31connectivity to the metadata database, and local access to the
32managed Git repositories.
33
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080034== EXAMPLES
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080035To manually correct a user's SSH user name:
36
Michael Ochmannb99feab2016-07-06 14:10:22 +020037----
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080038 $ java -jar gerrit.war gsql
39 Welcome to Gerrit Code Review v2.0.25
40 (PostgreSQL 8.3.8)
41
42 Type '\h' for help. Type '\r' to clear the buffer.
43
Robin Rosenberg524a3032012-10-14 14:24:36 +020044 gerrit> update accounts set ssh_user_name = 'alice' where account_id=1;
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080045 UPDATE 1; 1 ms
46 gerrit> \q
47 Bye
Michael Ochmannb99feab2016-07-06 14:10:22 +020048----
Shawn O. Pearce7c5941b2009-11-17 20:47:04 -080049
50GERRIT
51------
52Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070053
54SEARCHBOX
55---------