摘要:
1.DOS窗口执行,删除注册表服务 sc delete OracleOraDb10g_home1TNSListenerLISTENER_XXXX 2.用net manager配置listener 阅读全文
摘要:
@$ORACLE_HOME\RDBMS\ADMIN\utlexcpt.sql;EXCEPTIONS 子句帮助识别违反约束的行TRUNCATE TABLE EXCEPTIONS;ALTER TABLE "SCOTT"."ADDRESS" ADD FOREIGN KEY ("PARENTADDRESSID") REFERENCES "SCOTT"."ARDADDRESS" ("ID") ENABLE ... 阅读全文
摘要:
select * from dual@dblink ORA-00600: 内部错误代码, 参数: [2252], [2934], [296062546], [], [], [], [], [] 数据库用startup force 方式启动出现上面的错误提示,DBLINK不能用 正常启动数据库就可以了 shutdown immediate startup 阅读全文
摘要:
oracle 提供了wrap工具加密代码语法如下:wrap iname=input_file oname=output_fileSELECT ascii('D') FROM dual;SELECT ascii(' ') FROM dual;-- create as a text file c: emp\unwrapped.sql CREATE OR REPLACE FUNCTION unwrapped (namein VARCHAR2)RETURN NUMBER IS c PLS_INTEGER := 0; j PLS_INTEGER; l PLS_INTEGE 阅读全文
摘要:
MERGE <hint> INTO <table_name>USING <table_view_or_query>ON (<condition>)WHEN MATCHED THEN <update_clause>DELETE <where_clause>WHEN NOT MATCHED THEN <insert_clause>[LOG ERRORS <log_errors_clause> <rej... 阅读全文
摘要:
计算schema在原库的空间大小select SEGMENT_TYPE,sum(a.bytes)/1024/1024/1024 from USER_EXTENTS a group by A.SEGMENT_TYPE;建立表空间或扩张新库的表空间CREATE TABLESPACE orcl_index_o1 DATAFILE SIZE 10240M AUTOEXTEND OFF, SIZE 10240M AUTOEXTEND OFFLOGGINGEXTENT MANAGEMENT LOCAL AUTOALLOCATEBLOCKSIZE 8KSEGMENT SPACE MANAGEME... 阅读全文
摘要:
$ORACLE_HOME\RDBMS\ADMIN\UTLRP.SQL 阅读全文
摘要:
MSTR报表某个报表执行极慢,查看报表SQL,自动加了个distinct,而该报表数据量极大, 打开vldb属性,将之前的【使用默认集成值】勾掉,选择【无distinct,无group by】 By default, MicroStrategy considers that the attributes defined are the Primary Key of the respective... 阅读全文
摘要:
Force ... Forces The Creation Of A View Even When The View Will Be Invalid. NoForce Is The Default 强制建立一个view,即使创建后该view失效 SQL> select * from xyz; select * from xyz ORA-00942: 表或视图不存在 SQL> SQL> CREAT... 阅读全文
摘要:
建立一个日志表CREATE TABLE ddl_log (operation VARCHAR2(30),obj_owner VARCHAR2(30),object_name VARCHAR2(30),sql_text VARCHAR2(64),attempt_by VARCHAR2(30),attempt_dt DATE);在truncate 操作前触发,写日志到ddl_log表CREATE OR REPLACE TRIGGER bf_truncateBEFORE TRUNCATEON SCHEMADECLAREoper ddl_log.operation%TYPE; BE... 阅读全文