Change target.sql

From DB Optimizer
Jump to: navigation, search

-- (c) Kyle Hailey 2007

create table sash_host ( name varchar2(64));
truncate table sash_host;
select host from dbids;
column f_host new_value v_host
column f_dbid new_value v_dbid;

select '&host' f_host from dual; select dbid f_dbid from dbids where host='&v_host';

insert into sash_host values('&v_host');
commit;
drop view sash;
create view sash as
select  * from sash_all
where dbid = &v_dbid ;
drop view sash_users;
create view sash_users as
select * from sash_users_all
where dbid = &v_dbid ;
drop view sash_sqltxt;
create view sash_sqltxt as
select * from sash_sqltxt_all
where dbid = &v_dbid ;
drop view sash_event_names;
create view sash_event_names as
select * from sash_event_names_all
where dbid = &v_dbid ;
drop view sash_sqlstats;
create view sash_sqlstats as
select * from sash_sqlstats_all
where dbid = &v_dbid ;
drop view sash_objs;
create view sash_objs as
select * from sash_objs_all
where dbid = &v_dbid ;