一个简单copy table 的stored procedure 代码
CREATE OR REPLACE PROCEDURE copy_tabAUTHID current_user as coun number;BEGINselect count(*) into coun from user_tables where table_name='NEW_TABLE';if coun > 0 then execute immediate 'drop table new_table';end if;execute immediate 'create table new_table as select * from test';END;/[@more@]tips:1. AUTHID current_user 确保本用户有使用此procedure的权限2. select count(*) into coun from user_tables where table_name='NEW_TABLE';if coun > 0 then execute immediate 'drop table new_table';end if;
oracle版本!!!痛恨
I have a problem trying to export a database and I cannot figure out what it might be. When writing this line of command:[@more@]I have a problem trying to export a database and I cannot figure out what it might be. When writing this line of command: exp user/pass@orcl file=c:scott.dmb full=y I receive the following message: EXP-00056: ORACLE error 6550 encountered ORA-06550: line 1, column 41: PLS-00302: component 'SET_NO_OUTLINES' must be declared ORA-06550: line 1, column 15: PL/SQL: Sta
Chain in Scheduler
Job Chain[@more@]ChainsA Scheduler chain consists of a set of related programs that run in a specified sequence. The successivepositions in the chain are referred to as “steps” in the chain, and each step can point to anotherchain, a program, or an event. The chain includes the “rules” that determine what is to be done ateach step of the chain.We’ll create a simple Scheduler chain by first creating a Scheduler chain object, then the chainsteps and the chain rules.Creating a ChainSince Sched
Advanced Scheduler Concepts
job class, windows, windows group[@more@]Job ClassesA job class is a way of grouping jobs into larger entities, thus enabling you to prioritize access to the job slaves among those job classes. This means that you can, for example, make sure a CEO's request will begin before a routine job. In addition to using job classes for resource allocation, you can also use them for setting job characteristics or behavior that must be the same for all the jobs in the class.When defining job classes, you sh
Export/Import
Export/Import in Oracle[@more@]1、Export/Import的用处 Oracle Export/Import工具用于在数据库之间传递数据。 Export从数据库中导出数据到dump文件中 Import从dump文件中到入数据导数据库中 下面是一般使用他们的情况 (1)、两个数据库之间传送数据 同一个版本的oracle Server之间 不同版本的oracle Server之间 同种OS之间 不同种OS之间 (2)、用于数据库的备份和恢复 (3)、从一个SCHEMA传送到另一个SCHEMA (4)、从一个TABLESPACE传送到另一个TABLESPACE 2、DUMP文件 EXPORT到出的是二
oracle scheduler使用的一些总结
Oracle scheduler[@more@]Scheduler 是oracle 10g 后添加的新特性,使用scheduler可以方便的设定在任意时间调用pl/sql块或者OS脚本(bat in windows, shell in linux)。这对数据库的一些定时操作提供了极大便利。scheduler基本部分有3块:job, program, shedule下面通过一个定时exp脚本来描述这3个部分:Program 一个Program可能涉及到特等/的SQL块,一个存储过程或一个操作系统的可执行文件. begindbms_scheduler.create_program(program_name=> 'EXP_PRO1',program_type=> 'EXECUTABLE',program_action =>'c:windowssystem32cmd.
why I can not open oracle 10g em?
when I changed ip address, em became invalid, and this is solution:[@more@]when I changed ip address, em became invalid, and this is solution:1. cmd--> set oracle_sid = xxx( current server)2. cmd--> emctl start dbconsolewell, done!