su - oracle lsnrctl status sqlplus / as sysdba sqlplus
hspipmptestopr paic1234
call PKG_IPMP_SYNC_INFO_WXL.PROC_INSERT_KC22( '', '20210701','20210801'); call PKG_IPMP_SYNC_INFO.PROC_INSERT_KC24( '', '20210101','20220101');
SELECT 'SELECT * FROM ' || TABLE_NAME || ';', NUM_ROWS FROM ALL_TABLES WHERE OWNER = 'HSPIPMPOPR';
show user select user from dual
select * from all_users
alter package PKG_IPMP_SYNC_INFO_WXL compile reuse settings
Select Tablespace_Name,Sum(bytes)/1024/1024 From Dba_Segments Group By Tablespace_Nam
mkdir -p /oracle/app/oracle/oradata/dump chown -R oracle:oinstall /oracle/app/oracle/oradata/dump sqlplus / as sysdba create directory dump_bak as '/oracle/app/oracle/oradata/dump';
select * from dba_directories;
drop directory BAK_DIR;
expdp user_local/user_local DIRECTORY=exp_dir DUMPFILE=tab.dmp LOGFILE=tab.log TABLES=USER_OFFICE
expdp hspipmpopr/paic1234 DIRECTORY=dump_bak DUMPFILE=v_data.dmp LOGFILE=v_data.log TABLES=V_MDCS_FUND_SETL_LIST_D,V_MDCS_FUND_LIST_OPSP_TRT_D,V_MDCS_FUND_SETL_LIST_CHRGITM,V_MDCS_FUND_SETL_LIST_OPRN_D,V_MDCS_FUND_SETL_LIST_SCS_D,V_MDCS_FUND_LIST_OPSP_TRT_D;
impdb hspipmptestopr/paic1234 DIRECTORY=data_pump_dir DUMPFILE=jsd20211209.dmp; imp hspipmptestopr/paic1234 file=/oracle/app/oracle/admin/hspipmp/dpdump/jsd20211209.dmp full=y;
/oracle/app/oracle/admin/hspipmp/dpdump/jsd20211213 imp hspipmptestopr/paic1234 file=/oracle/app/oracle/admin/hspipmp/dpdump/jsd20211213/jsd20211213.dmp full=y;
su - postgres psql -c"create database hspipmptest2" pg_dump hspipmp | psql hspipmptest pg_dump hspipmptest | psql hspipmptest2 psql alter database hspipmptest2 OWNER TO hspipmpdata; alter database hspipmptest2 OWNER TO hspipmpopr;
SELECT pid, pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname='hspipmptest' AND pid <> pg_backend_pid();
drop database hspipmptest;
|