DB2: Comandos Conexoes

From Wiki
Revision as of 23:20, 5 February 2013 by Ebasso (talk | contribs) (→‎Conexões)

Conexão

CONNECT TO <dbname> USER <user> USING <password>   -> conecta ao banco
GET CONNECT STATE 				   -> Status da conexão
CONNECT RESET 						-> desconecta

Conexão Exemplo

db2 activate database sample
db2 connect to sample
db2 connect reset
db2 deactivate database sample

Conexões

LIST APPLICATIONS [SHOW DETAIL]  -> mostra todas as conexões
FORCE APPLICATION [ALL | xxxx]	 -> desconecta todos os usuários
LIST TABLES [FOR ALL | FOR SCHEMA xxxx]  -> mostra a tabela de usuários

DESC TABLE

-> mostra estrutura da tabela GET INSTANCE -> mostra a instância

Ver também