Connecting and executing SQL statements
Print
- Last Updated: March 5, 2024
- 2 minute read
- DataDirect Connectors
- JDBC
- Documentation
To use the driver to access data with DbVisualizer:
- Open DbVisualizer.
- From the menu, select Database>New Connection. When prompted to use the Connection Wizard, click OK.
-
Provide the following information when
prompted; then, click Next to
proceed:
- Connection alias: Type the name to be used when referring to this connection.
- Driver: Select the alias that you provided for your driver from the drop-down menu.
-
Provide values for the following fields;
then, click Finish.
- Database URL: Copy and paste your connection URL
into this field. The following examples show how to connect using user
ID/password authentication.
UserID/Password
jdbc:datadirect:impala://myserver:21050;DatabaseName=ImpalaDB; AuthenticationMethod=UserIDPassword;User=JSmith@example.com;Password=secret; - Database UserId: If required by the
authentication method being used (UserIdPassword), enter the user name.
Alternatively, this value can be specified with the
Userproperty in the connection string. - Database Password: If required by the
authentication method being used (UserIdPassword), enter the password.
Alternatively, this value can be specified with the
Passwordproperty in the connection string.
- Database URL: Copy and paste your connection URL
into this field. The following examples show how to connect using user
ID/password authentication.
-
To execute SQL statements, select SQL Commander>New SQL
Commander. A SQL Commander tab opens.
Note: Remove the default enclosing double quotes for identifiers. To configure this, go to
Driver>Properties>Generic>Delimited Identifiers. -
Select values for the following
fields:
- Database Connection: Select connection alias you provided for the connection from the drop-down menu.
- Schema: Select the schema you want to execute queries against from the drop-down menu.
-
In the SQL Commander tab, enter SQL
commands you want to execute; then select SQL
Commander>Execute. For example:
To select all of the rows from the
USERStable:SELECT * FROM USERSTo select the URLs for a specified issue:
SELECT * FROM USERS WHERE USERID = <ID>See "Supported SQL statements and extensions" for the supported syntax used to execute SQL statements.
Note: If you are fetching large sets of data, you may want to limit the results using the Max Rows and Max Chars fields.