随笔分类 - DB
摘要:创建删除表空间 create tablespace TEST datafile 'E:\DB\Oracle\oradata\TEST.dbf' size 50M AUTOEXTEND ON NEXT 50M; drop TABLESPACE TEST including contents and d
阅读全文
摘要:SELECT table_schema as '数据库', sum(table_rows) as '记录数', sum(truncate(data_length/1024/1024, 2)) as '数据容量(MB)', sum(truncate(index_length/1024/1024, 2)
阅读全文
摘要:配置监听 D:\Oracle\app\Administrator\virtual\product\12.2.0\dbhome_1\network\admin\listener.ora # listener.ora Network Configuration File: D:\Oracle\app\A
阅读全文
摘要:set @suffix := (SELECT DATE_FORMAT(now(), '%Y_%m_%d')); SET @x := CONCAT('select * from alarm_',@suffix) ; Prepare stmt FROM @x; Execute stmt;
阅读全文
摘要:修改密码相关 1 配置文件中my.cnf 的配置项msqld下面增加 skip-grant-tables 2 mysql -u root 登进去 切换mysql数据库 use mysq 密码置空 UPDATE user SET authentication_string = '' WHERE Use
阅读全文
摘要:Username : username Password : password Database : //123.45.67.89:1521/orcl/ Connect as : Normal
阅读全文
摘要:--查看锁了哪些表 select sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo.locked_mode from v$locked_object lo, dba_objects ao,
阅读全文
摘要:select round(BYTES/1024/1024,2)||'M' from user_segments where segment_name=upper('gspschedulelog');
阅读全文
摘要:# listener.ora Network Configuration File: F:\GSPCLOUD\Oracle\product\12.2.0\dbhome_1\network\admin\listener.ora # Generated by Oracle configuration t
阅读全文
摘要:DECLARE clobValue gspdatabaseobject.content%TYPE; BEGIN clobValue := 'very long text'; UPDATE gspdatabaseobject SET content = clobValue,code='FIGLAccD
阅读全文
摘要:oracle: 查用户表空间 select username,default_tablespace from dba_users; 删除表空间: drop tablespace "B2-4" including contents and datafiles CASCADE CONSTRAINTS;
阅读全文
摘要:导出: expdp b2-8/xxxxxx@ora12cr2 schemas=b2-8 DIRECTORY=dmp_dir DUMPFILE=b2-8.dmp logfile=temp.log tables="table1,table2" query="where condition" impdp
阅读全文
摘要:https://sqlbackupandftp.com/blog/how-to-backup-and-restore-postgresql-database 1 备份 pg_dump -v -f gscloud1912 -C -h 10.24.12.143 -U gscloud1912 gsclou
阅读全文
摘要:1命令行 启动服务 pg_ctl -D "C:\Program Files\PostgreSQL\9.1\data" start 2 查看状态 pg_ctl -D "C:\Program Files\PostgreSQL\9.1\data" status 3 如果收到的错误是 1063 , 很可能是
阅读全文