User`s guide
ping
7-183
ping returns the database name, database version, JDBC driver name, JDBC driver
version, maximum number of database connection allowed, user name for the current
connection, and the database URL. The last field denotes if the current database
connection allows automatic commit of transactions.
Close the connection.
close(conn)
Retrieve Status of an JDBC Connection
Create a Microsoft SQL Server connection using a JDBC driver. For example, the
following code assumes you are connecting a data source named dbname with user name
username, password pwd, database server name sname, and port number 123456.
conn = database('dbname','username','pwd',...
'Vendor','Microsoft SQL Server','Server','sname',...
'AuthType','Server','portnumber',123456);
Retrieve the status of the Microsoft SQL Server connection.
ping(conn)
ans =
DatabaseProductName: 'Microsoft SQL Server'
DatabaseProductVersion: '11.00.3000'
JDBCDriverName: 'Microsoft JDBC Driver 4.0 for SQL Server'
JDBCDriverVersion: '4.0.2206.100'
MaxDatabaseConnections: 0
CurrentUserName: 'username'
DatabaseURL: 'jdbc:sqlserver:...'
AutoCommitTransactions: 'True'
ping returns the database name, database version, JDBC driver name, JDBC driver
version, maximum number of database connection allowed, user name for the current
connection, and the database URL. The last field denotes if the current database
connection allows automatic commit of transactions.
Close the connection.