Monday, April 9, 2018

Moving existing Oracle temp datafiles

SET PAUSE ON
SET PAUSE 'Press Return to Continue'
SET PAGESIZE 60
SET LINESIZE 300
 
COL TABLESPACE_SIZE FOR 999,999,999,999
COL ALLOCATED_SPACE FOR 999,999,999,999
COL FREE_SPACE FOR 999,999,999,999
 
SELECT *
FROM   dba_temp_free_space
/


CREATE TEMPORARY TABLESPACE TEMP_NEW TEMPFILE '/dbapps/oracle/oradata/DWHD/temp/temp02.dbf' SIZE 500m autoextend on next 10m maxsize 16G;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP_NEW;

/*Retrieve ‘SID_NUMBER’ & ‘SERIAL#NUMBER’ of existing 
live session’s who are using old temporary tablespace ( i.e. TEMP ) and kill them. */
SELECT b.tablespace,b.segfile#,b.segblk#,b.blocks,a.sid,a.serial#,
a.username,a.osuser, a.status
FROM v$session a,v$sort_usage b
WHERE a.saddr = b.session_addr;

alter system kill session '211,11509';

select * from v$datafile where TS#='45';

--Get tablespacename
select * from v$tablespace where TS#='45';

DROP TABLESPACE TEMP1 including contents and datafiles;

Friday, April 6, 2018

Cannot get the column information from OLE DB provider "OraOLEDB.Oracle" for linked server "x".

editing the Provider Properties (right-click the provider in the providers folder) and ticking the "Allow inprocess" option corrects my problem.

Thursday, April 5, 2018

Fs_Clone fails with "ERROR: RC-50410: Fatal: OUI Registration failed with an Abnormal Termination error" (Doc ID 2095966.1)

echo $ENV
unset ENV
adop phase=fs_clone forced=yes

How to Check if adminserver in EBS is up

cd $ADMIN_SCRIPTS_HOME

$ ./adadminsrvctl.sh status

You are running adadminsrvctl.sh version 120.10.12020000.9

Enter the WebLogic Admin password:
Enter the APPS Schema password:
Database connection could not be established. Either the database is down or the APPS credentials supplied are wrong.
$ ./adadminsrvctl.sh status

You are running adadminsrvctl.sh version 120.10.12020000.9

Enter the WebLogic Admin password:
Enter the APPS Schema password:

 The AdminServer is running

adadminsrvctl.sh: exiting with status 0

Monday, March 19, 2018

SQL Server Commands to Oracle Counterpart


  • Get table size
    • answer sp_spaceused T_CLMaster;
    • from studio choose table and then press F7
  • How to import and export tables in sql server
    • export. msdb>choose db>rt clck >task >export data>Date Source:'SQL Server Native Client 11.0' > choose DB > Destination:'SQL Server Native Client 11.0' >Choose server destination > Choose DB Destination> Copy data from one or more tables or views > choose tables> run immediately
  • Select into


  • select  * into y_clmaster from T_CLMaster where CLID in ('LDP00000000002957187',

    • 'LDP00000000003649120',
    • 'LDP00000000003652388',
    • 'LDP00000000003652389',
    • 'LDP00000000003654044',
    • 'LDP00000000003654045',
    • 'LG000000000000000996',
    • 'LG000000000000000998',
    • 'LG000000000000000999');

    Find Large Files in Unix


    du -a /home | sort -n -r | head -n 10
    find . -ls | sort -nrk7 | head -10
    du -hsx * | sort -rh | head -10

    Monday, March 12, 2018

    How to attach an Oracle Home

    ./runInstaller.sh -attachhome ORACLE_HOME=/upgrade/R12_R12D2/fs1/EBSapps/10.1.2  ORACLE_HOME_NAME='test_TOOLS__test_applmgr_fs1_EBSapps_10_1_2'