September 28, 2007
POST2BLOG desktop client
September 27, 2007
Don’t give password to Listener in 10g
As a security hole in 9i database we always give password to listener,
But this is chaged since 10g, if we give password to listener in 10g
this will become a security hole. Oracle solve this in 10g.
http://andrewfraser.wordpress.com/2007/05/24/listener-passwords-always-for-9i-never-for-10g/
September 26, 2007
Start Enterprise manager after activating standby database
After activating standby database we don’t have enterprice manager.
Because we do not have files on operating system,
and also most important one is we have repository with old server data.
Our repository contain data about old server hostname and ports,
But our new server hostname is different,
So we have to recreate repository, drop sysman, wmsys ..
To drop users and recreate repository below command work
emca -repos recreate
emctl stop dbconsole
emctl start dbconsole
TO create operating system files below command
emca -config dbcontrol db
emctl stop dbconsole
emctl start dbconsole
Thats all,
Ridvan Eker,
Drop Objects
Drop ‘FUNCTION’,'PACKAGE’,
‘PROCEDURE’,'SEQUENCE’,'SYNONYM’,
‘VIEW’,'TRIGGER’,'TABLE’
To be able run this procedure, privilegtes must be given directly to STAGING_DROP_USER
CREATE OR REPLACE PROCEDURE STAGING_DROP_USER.test AS
hand NUMBER ;
cursor c1 is
select object_type, owner, object_name from dba_objects
where object_type in (‘FUNCTION’,'PACKAGE’,'PROCEDURE’,'SEQUENCE’,'SYNONYM’,'VIEW’,'TRIGGER’)
and owner in (select username from dba_users where profile=’SCHEMA’);
r1 c1%rowtype;
–we cannot drop nested tables
cursor c2 is
select owner, table_name from dba_tables where owner in (select username from dba_users where profile=’SCHEMA’)
and table_name not in (select table_name from dba_nested_tables
where owner in (select username from dba_users where profile = ‘SCHEMA’));
r2 c2%rowtype;
BEGIN
– first have to drop plsql and other objects that table_exists_action does not deal with
FOR r1 IN c1 LOOP
execute immediate ‘drop ‘||r1.object_type||’ ‘||r1.owner||’.”‘||r1.object_name||’”‘ ;
END LOOP ;
FOR r2 IN c2 loop
execute immediate ‘drop table ‘||r2.owner||’.”‘||r2.table_name||’” CASCADE CONSTRAINTS PURGE’ ;
END LOOP ;
END ;
/
September 25, 2007
Using 10g datapump and scheduler to copy schemas
IMP does not owerwrite
‘FUNCTION’,'PACKAGE’,'PROCEDURE’,'SEQUENCE’,
‘SYNONYM’,'VIEW’,'TRIGGER’ (CODE DATABASE)
Import does not replace codes, to be able to create codes only way is to drop related objects or drop and recreate user then start import.
Link below show a way to to this.
P.S: if you have objects created like “object_name” you have to drop them with using quatations
because they are case sensitive.