RubyMine 7.0.1 Web Help

To access this dialog from the Database tool window:

  • When creating a new data source:
    add on the toolbar, New in the context menu, or Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+Insert or Ctrl+NAlt+InsertShift+⌘+N, Ctrl+N or Ctrl+Enter⌘ N or Control EnterControl N or Control Enter⌘ N or Control EnterControl N or Control Enter. Then select one of the following:
    Data Source and the name of your DBMS, DDL Data Source, or Import from sources.
  • For an existing data source:
    iconManageDataSources on the toolbar or Data Source Properties in the context menu.

Use this dialog to manage your data sources and database drivers, and their settings.

Note that the drivers here are understood as collections of default options and settings for creating DB data sources. As such, they include more options than just the defaults for the corresponding drivers.

The names of new, yet unsaved items are shown in the left-hand pane in green. New items are saved when clicking Apply or OK.

Left-hand pane

Shown in this pane are your data sources (under Data Sources) and database drivers (under Drivers). When you select an item (a data source or driver), its settings are shown in the right-hand part of the dialog.

Use add, delete, copy and settings, context menu commands and associated keyboard shortcuts to manage your data sources and drivers, and also to perform other, related tasks.

Icon and command Shortcut Description
add Add Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+Insert or Ctrl+NAlt+InsertShift+⌘+N, Ctrl+N or Ctrl+Enter⌘ N or Control EnterControl N or Control Enter⌘ N or Control EnterControl N or Control Enter Use this icon, command or shortcut to create a new data source or database driver. Select:
  • The name of DBMS to create a DB data source associated with the corresponding DBMS. If you have created your own drivers, you can also select a driver to use it as the basis for creating the data source.

    See DB data source settings.

  • DDL Data Source to create a DDL data source.

    See DDL data source settings.

  • Database Driver to create a driver.

    See Database driver settings.

delete Remove Alt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+Delete⌘+Delete⌘ Delete⌘ Delete⌘ Delete⌘ Delete Use this icon, command or shortcut to remove the selected item or items from the list.
copy Duplicate Ctrl+DCtrl+DCtrl+DCtrl+D⌘+DCtrl+DCtrl+D, Ctrl+Shift+Down or Ctrl+Shift+UpCtrl+DCtrl+Shift+D⌘ D⌘ D⌘ D⌘ D Use this icon, command or shortcut to create a copy of the selected data source or data sources.
settings Edit Driver Settings Ctrl+B Use this icon, command or shortcut to view or edit the settings for the driver associated with the selected DB data source.
Show Driver Usages Alt+F7Shift+Alt+7Shift+Alt+7Alt+F7Alt+F7 or Shift+Alt+SShift+Alt+F7Alt+F7Ctrl+GAlt+F7Alt F7Alt F7Shift ⌘ GAlt F7 Use this command or shortcut to find the DB data sources that use the selected driver. The found data sources are shown in the Used By popup which lets you navigate to anyone of the found data sources.

DB data source settings

Name and Scope

Item Description
Name Use this field to edit the name of the data source.
Scope Select:
  • Project if the data source should be available only in the current project.
  • IDE if the data source should be available in all of your projects.

Database tab

Shown on this tab are mainly the database connection settings.

Item Description
Path If the database is identified by the local path to a file or folder, specify the path to that file or folder. Otherwise, use the Host, Port and Database fields.
Host Specify the hostname (domain name) or the IP address of the computer on which the database is located. If the database is on your local computer, specify localhost or 127.0.0.1.

If you are using SSH, the database host must be accessible by the specified domain name or IP address from the computer on which the SSH proxy runs. See SSH/SSL tab.

Port Specify the database port number.
Database Specify the name of the target database or schema.
The following URL will be used... Shown in this field is the URL that RubyMine will use to connect to the database. Normally, you don't need to edit this setting.
User Specify the name of the database user (i.e. your database user account name).
Password Specify the password for the database user.
Save on disk with master password protection Select this check box if you want RubyMine to save the password in its password database. Later, instead of the password, you'll be asked for your master password. (The master password is used to access the password database.)
Test Connection Click this button to make sure that the database connection settings are correct and RubyMine can communicate with the target database.
Driver files Specify the JDBC driver file or files to be used to interact with the database.

Click the download link to download the necessary driver files. As a result, the text will change to Using <driver_name> driver files. The <driver_name> link in this case lets you navigate to the settings for the corresponding driver. (<driver_name>, normally, is the same as the name of the corresponding DBMS.)

If the corresponding driver files are available locally on your computer, click add (Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+Insert or Ctrl+NAlt+InsertShift+⌘+N, Ctrl+N or Ctrl+Enter⌘ N or Control EnterControl N or Control Enter⌘ N or Control EnterControl N or Control Enter) and select the driver file location(s) in the dialog that opens.

Read-only Select this check box if you want to protect the data source from accidental data modifications.

As a result, you won't be able to modify the data in the Table Editor.

Whether the data modification operations will be possible in the console depends on the DBMS: RubyMine will try to set the database connection status to read-only. All the rest depends on the database driver, i.e. whether the read-only status is supported and to which extent.

Auto sync Select this check box to enable auto-synchronization of the data source view in the Database tool window. As a result, the view will be automatically updated when you change the database properties or run the corresponding DDL statements in the console. Thus, you won't need to perform the Synchronize command (Ctrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YAlt+⌘+YAlt ⌘ YAlt ⌘ YAlt ⌘ YAlt ⌘ Y) for the corresponding database.

Note that auto sync is performed for the overall database and, thus, may be time-consuming. So auto-synchronization is more suitable for "small" databases. If your database is "big", it’s recommended that you sync its state manually (e.g. Ctrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YCtrl+Alt+YAlt+⌘+YAlt ⌘ YAlt ⌘ YAlt ⌘ YAlt ⌘ Y), and only for the appropriate database parts such as separate tables.

SSH/SSL tab

If the target database should be accessed using SSH or SSL, select the corresponding check box and specify the associated settings.

Item Description
SSH
Use SSH tunnel Select this check box to set up and use an SSH tunnel for accessing a remote database via an SSH proxy.
Copy from If there is already a data source for which the necessary SSH settings are specified, you can copy those settings from that data source.

Click the link and select the data source to copy the settings from.

Proxy host Specify the hostname (domain name) or IP address of the SSH proxy server that you are using. The SSH proxy server host must be accessible by the specified hostname or IP address from your local computer.
Port Specify the port on which your SSH proxy server accepts SSH connections. The port number 22 suggested by RubyMine is the standard port used by SSH servers. Change this number if your SSH proxy server uses a different port.
Proxy user Specify the name of the SSH proxy user.
Auth type Specify the user authentication type used by your SSH proxy. Select:
  • Password for password-based authentication.
  • Key pair (Open SSH) for key-based authentication.
Proxy password For password-based authentication: specify the password for the SSH proxy user.

See also, Save on disk.

Private key file For key-based authentication: specify the path to the file where the corresponding private key is stored. Type the path in the field, or click browseButton (Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift EnterShift Enter) and select the file in the dialog that opens.
Passphrase For key-based authentication: specify the passphrase for the private key if the key is locked with the passphrase.
Save on disk with master password protection Select this check box if you want RubyMine to save the password or the passphrase in its password database. Later, instead of the password or the passphrase, you'll be asked for your master password. (The master password is used to access the password database.)
SSL. All the files specified in this section should be in PEM format. Which of the files you have to specify, depends on the SSL properties of your user account.
Use SSL Select the check box to use SSL when connecting to the server.
Copy from If there is already a data source for which the necessary SSL settings are specified, you can copy those settings from that data source.

Click the link and select the data source to copy the settings from.

CA file Specify the path to SSL Certificate Authority (CA) certificate file. If used, this must be the same certificate as used by the server.

Type the path in the field, or click browseButton (Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift EnterShift Enter) and select the file in the dialog that opens.

Client certificate file Specify the path to your (client) public key certificate file.

Type the path in the field, or click browseButton (Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift EnterShift Enter) and select the file in the dialog that opens.

Client key file Specify the path to your (client) private key file.

Type the path in the field, or click browseButton (Shift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift+EnterShift EnterShift EnterShift EnterShift Enter) and select the file in the dialog that opens.

Schemas and Tables tab

Specify which schemas and tables in the target database you are going to be working with (i.e. which schemas and tables you want to see in the Database tool window for the corresponding data source).

Note that the features on this tab depend on your database access permissions. Also note that you might need to wait a little while RubyMine is retrieving the necessary information from the database.

Item Description
Available databases Shown in this column are the schemas found in the database. Use the check boxes to the left of schema names to select the schemas you want to be working with. Only the selected schemas will be shown in the Database tool window.
Resolve unqualified references In the selected schemas you'll be able to reference the tables by their "short" names (e.g. in the database console or in your SQL files). Otherwise, only fully qualified table names will be treated by RubyMine as valid.

Note that the DBMS may reject short names when you execute the corresponding statement or statements.

Table names pattern To further limit the set of tables shown in the Database tool window, specify the corresponding table name pattern. This pattern is specified using regular expressions and is matched against "short" table names in the selected schemas.

Advanced tab

On this tab, you can configure the database connection properties and also specify the options for the database driver JVM.

Item Description
Name - Value The set of connection options passed to the database driver as key - value pairs at its start.

To start editing a value, double-click the corresponding Value field.

To add a row, start editing the values in the last row, where <user defined> and <value> are shown. A new row will be added to the table automatically.

VM Options The options for the JVM in which the database driver runs. (The driver is started as a separate process in its own JVM.)

For additional information, refer to your DBMS documentation.

DDL data source settings

A DDL data source is defined by its name, and can reference one or more DDL files and/or another data source (a parent data source).

Item Description
Name Use this field to edit the data source name.
DDL Files Use the controls in this area to compose the list of files that contain the necessary DDL definitions.
  • add (Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+Insert or Ctrl+NAlt+InsertShift+⌘+N, Ctrl+N or Ctrl+Enter⌘ N or Control EnterControl N or Control Enter⌘ N or Control EnterControl N or Control Enter). Use this icon or shortcut to add a DDL SQL file or files to the data source definition. In the dialog that opens, select the necessary file or files.
  • delete (Alt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+Delete⌘+Delete⌘ Delete⌘ Delete⌘ Delete⌘ Delete). Use this icon or shortcut to remove the selected file or files from the list.
  • arrowUp (Alt+UpAlt+UpAlt+UpAlt+UpAlt+Up or Ctrl+Alt+AAlt+UpCtrl+Alt+UpCtrl+Shift+UpCtrl+UpControl UpControl UpControl Alt UpControl Up). Use this icon or shortcut to move the selected file one line up in the list.
  • arrowDown (Alt+DownAlt+DownAlt+DownAlt+DownAlt+Down or Ctrl+Alt+EAlt+DownCtrl+Alt+DownCtrl+Shift+DownCtrl+DownControl DownControl DownControl Alt DownControl Down). Use this icon or shortcut to move the selected file one line down in the list.
Parent Data Source If necessary, select another data source as a parent. As a result, the data source whose properties you are editing will "inherit" all the DDL definitions from its parent.

If the parent data source is not needed, select <none>.

Database driver settings

Name

Item Description
Name Use this field to edit the name of the driver.

Settings tab

Shown on this tab are mainly the defaults for the Database tab.

Item Description
Class name The fully qualified name of the driver class.
URL template The template used to construct the database URL. The text in curly brackets represents variables, e.g.
  • {host} the domain name or IP address of the database host.
  • {port} the database port number.
  • {database} the name of the database or schema.

Optional fragments are in square brackets, e.g. [:{port}].

Default port The default database port number. You don't need to specify this setting for local databases.
Dialect The SQL dialect associated with the corresponding data sources. Via the data sources this dialect will "propagate" to the database console.

In addition to particular dialects, also the following option is available:

  • <Generic>. Basic SQL92-based support is provided including completion and highlighting for SQL keywords, and table and column names. Syntax error highlighting is not available. So all the statements in the input pane are always shown as syntactically correct.
Requires authentication Whether user authentication is required when connecting to the database.

If the check box is selected, there are the User and the Password fields in the settings for the corresponding data sources.

Local database Whether or not the database can be identified by the local path to a file or folder.

If the check box is selected, there is the Path field in the settings for the corresponding data sources.

Otherwise, there are the Host, Port and Database fields instead.

Auto sync The default setting for the auto sync option.
Driver files Shown in this area is the list of the driver files. Use:
  • The download link to download the necessary driver files.
  • add (Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+Insert or Ctrl+NAlt+InsertShift+⌘+N, Ctrl+N or Ctrl+Enter⌘ N or Control EnterControl N or Control Enter⌘ N or Control EnterControl N or Control Enter) to add the files available locally to the list.
  • delete (Alt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+Delete⌘+Delete⌘ Delete⌘ Delete⌘ Delete⌘ Delete) to remove unnecessary files from the list. (No files are physically deleted.)

Advanced tab

Shown on this tab are the default settings for the Advanced tab.

Item Description
Name - Value The default set of connection options passed to the database driver as key - value pairs at its start.

To start editing a value, double-click the corresponding Value field.

To add a row, start editing the values in the last row, where <user defined> and <value> are shown. A new row will be added to the table automatically.

VM Options The default options for the JVM in which the database driver runs. (The driver is started as a separate process in its own JVM.)

See Also

Language and Framework-Specific Guidelines:

Reference:

Web Resources: