DB2: Comandos Conexoes: Difference between revisions

From Wiki
 
(One intermediate revision by the same user not shown)
Line 19: Line 19:
  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 <nowiki><table></nowiki> -> mostra estrutura da tabela


  GET INSTANCE           -> mostra a instância
  GET INSTANCE -> mostra a instância


== Ver também ==
== Ver também ==

Latest revision as of 01:50, 15 May 2025

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 <table> -> mostra estrutura da tabela
GET INSTANCE -> mostra a instância

Ver também