[[PageOutline(2-5,Contents,pullout)]] = Perform SQL queries on the Trac database == Description This plugin allows you to interact with Trac's project database directly. When installed it adds a "SQL" tab to the Trac project navigation bar. Key features: * perform queries on the project database * view results as raw or formatted (and hyper-linked) output * export result set in CSV * browse the database schema This plugin supports Trac installations with SQLite, MySQL and PostgreSQL database backends. The queries will need to be written differently according to which SQL database is being used. === SQL query screen, example 1 [[Image(sql-query.png, border=2)]] === SQL query screen, example 2 [[Image(sql-query2.png, border=2)]] === SQL schema screen [[Image(sql-schema.png, border=2)]] == Source See github:trac-hacks/tracsql for more details and the source code, or to report issues or request features. == Installation You can install this plugin with: {{{#!sh easy_install tracsql }}} == Configuration This plugin is configured in the `trac.ini` file by enabling and configuring: {{{#!ini [components] tracsql.* = enabled }}} The `TRAC_ADMIN` permission is used to control access to the query pages. By default, the TracSQL plugin connects to the project database. To use an external database, set the database parameter in the tracsql section of the `trac.ini` file to a valid database connection string: {{{#!ini [tracsql] database = sqlite:db/external.db }}} == Author/Contributors '''Author:''' [wiki:mrjbq7] [[BR]] '''Maintainer:''' [wiki:mrjbq7] [[BR]] '''Contributors:'''