linux 路径 dbps home,linux常用命令_js

1.Linux常用命令

1.1.进入DB2数据库的命令

查看市端复制服务:ps –ef|grep capture

显示系统多少位:uname -a

查看省端复制服务:ps –ef|grep apply

db2 list db directory 查看库

db2level 查看版本

db2 list tablespaces for detail 查看表空间

db2 list tables 查看表

db2 list tables for schema XXX 查看具体某个表

db2 describe table X140581.SYS_USERLOG 查看表结构

db2 connect reset(重新连接)

1. su - db2inst1 切换用户名

2. db2 connect to dbname 进入数据库

3. db2 "select * from config_mine" 执行数据库的命令

4. db2 –tvf ttt.sql (SQL文件不能放在root目录下,放在db2用户目录下。

5. 查看schema下所有的数据表

db2 list tables for schema cschema

6. 设置当前数据库的模式为cschema

db2 "set current schema cschema"

1.2.进入POSTGRES数据库的命令

[root@localhost ~]# psql -U postgres –l 查看数据库中的数据库

17598db998ac8c12916a2f47cd47e01b.png

1.psql -U postgres -d gisdb //进入gisdb库,出现gisdb=#

2.在出现gisdb=#后面执行 select * from gis_mine; //一定要记住最后的";"号。

3.执行psql -U postgres 后,执行create database gisdb; //创建数据库

postgres=# alter user postgres password '123456'; 修改数据库密码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值