Protocol command

The Protocol command specifies the protocol for establishing connections and automatically loads the appropriate driver.

Providing a protocol allows you to use a shortened database connection URL for connections. You can provide only the database name (and a subsubprotocol name if needed) instead of the full protocol. In addition, you do not need to use the Driver command or specify a driver at start-up, since the driver is loaded automatically.


PROTOCOL String [ AS Identifier ]

The protocol specified by the String is the part of the database connection URL syntax appropriate for your environment, including the JDBC protocol and the protocol specific to Derby. For further information about the Derby database connection URL, see Database connection URLs. Only Derby protocols are supported. Those protocols are listed in ij.protocol property.

If you name the protocol by specifying an Identifier, you can refer to the protocol name in the Connect command.


ij> protocol 'jdbc:derby:';
ij> connect 'sample';
ij> protocol 'jdbc:derby:';
ij> connect 'memory:sample;create=true';
ij> protocol 'jdbc:derby:memory:';
ij> connect 'sample;create=true';
Related concepts
ij commands
ij errors
Related reference
Absolute command
After Last command
Async command
Autocommit command
Before First command
Close command
Commit command
Connect command
Describe command
Disconnect command
Driver command
Elapsedtime command
Execute command
Exit command
First command
Get Cursor command
Get Scroll Insensitive Cursor command
Help command
HoldForConnection command
Last command
LocalizedDisplay command
MaximumDisplayWidth command
Next command
NoHoldForConnection command
Prepare command
Previous command
Readonly command
Relative command
Remove command
Rollback command
Run command
Set Connection command
Show command
Wait For command
Syntax for comments in ij commands
Syntax for identifiers in ij commands
Syntax for strings in ij commands