DB2: Comandos Conexoes: Difference between revisions

From Wiki
Line 16: Line 16:
  LIST APPLICATIONS [SHOW DETAIL]  -> mostra todas as conexões
  LIST APPLICATIONS [SHOW DETAIL]  -> mostra todas as conexões
  FORCE APPLICATION [ALL | xxxx] -> desconecta todos os usuários
  FORCE APPLICATION [ALL | xxxx] -> desconecta todos os usuários
 
  LIST TABLES [FOR ALL | FOR SCHEMA xxxx]  -> mostra a tabela de usuários
  LIST TABLES [FOR ALL | FOR SCHEMA xxxx]  -> mostra a tabela de usuários
 
  DESC TABLE <table> -> mostra estrutura da tabela
  DESC TABLE <table> -> mostra estrutura da tabela
  GET INSTANCE -> mostra a instância
  GET INSTANCE -> mostra a instância

Revision as of 23:20, 5 February 2013

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