<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://medjava.ro/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://medjava.ro/feed.php">
        <title>Med Java - database:oracle</title>
        <description></description>
        <link>https://medjava.ro/</link>
        <image rdf:resource="https://medjava.ro/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-04-05T16:18:25+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:adjust-tablespace-size&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:apply-patch&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:change-character-set&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:create-bigfile-tablespace&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:drop-tablespace&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:get-objects&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:import-dump&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:install-oracle19c-centos7&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:limit-rows&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:parallel-sql&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:plsql-naming-conventions&amp;rev=1735842138&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:pluggable-database&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:return-rows-between-range&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:session-locking-package&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:sqlplus-format-output&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:switch-to-pluggable-db-sqlplus&amp;rev=1688488590&amp;do=diff"/>
                <rdf:li rdf:resource="https://medjava.ro/doku.php?id=database:oracle:user-rights&amp;rev=1688488590&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://medjava.ro/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>Med Java</title>
        <link>https://medjava.ro/</link>
        <url>https://medjava.ro/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:adjust-tablespace-size&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>adjust-tablespace-size</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:adjust-tablespace-size&amp;rev=1735842138&amp;do=diff</link>
        <description>Adjust tablespace size to free up space

Check how much space from datafiles are occupied for a specific tablespace

Replace &lt;TBS_NAME&gt; with the actual tablespace to check:


SELECT df.tablespace_name, df.file_name, df.bytes, SUM(e.bytes) AS used_bytes
FROM dba_data_files df
LEFT JOIN dba_extents e ON df.file_id = e.file_id
WHERE df.tablespace_name=&#039;&lt;TBS_NAME&gt;&#039;
GROUP BY df.tablespace_name, df.file_name, df.bytes</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:apply-patch&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apply-patch</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:apply-patch&amp;rev=1688488590&amp;do=diff</link>
        <description>Apply an Oracle Patch (on Windows)

	*  Extract patch (p28574555_122010_MSWIN-x86-64.zip) to a folder (C:\)
	*  set ORACLE_HOME=C:\Oracle\product\12.2.0\dbhome_1
	*  set PATH=%ORACLE_HOME%\bin;%ORACLE_HOME%\OPatch
	*  cd C:\p28574555_122010_MSWIN-x86-64\28574555</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:change-character-set&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>change-character-set</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:change-character-set&amp;rev=1688488590&amp;do=diff</link>
        <description>Change character set (and national character set) for a database

sqlplus /nolog


SQL*Plus: Release 18.0.0.0.0 - Production on Sun Mar 24 23:38:27 2019
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


SQL&gt; connect SYS@PMJWE8 as SYSDBA;</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:create-bigfile-tablespace&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>create-bigfile-tablespace</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:create-bigfile-tablespace&amp;rev=1735842138&amp;do=diff</link>
        <description>Create bigfile tablespace

BIGFILE tablespaces are useful for databases that require very large files, as they can theoretically accommodate up to 8 exabytes (EB) in size.

Syntax is:


CREATE BIGFILE TABLESPACE tablespace_name 
    DATAFILE &#039;file_location_and_name&#039; SIZE file_size 
    [AUTOEXTEND ON [NEXT size_increment] [MAXSIZE { UNLIMITED | max_size }]]
    LOGGING | NOLOGGING
    EXTENT MANAGEMENT LOCAL 
    [SEGMENT SPACE MANAGEMENT { AUTO | MANUAL }];</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:drop-tablespace&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>drop-tablespace</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:drop-tablespace&amp;rev=1688488590&amp;do=diff</link>
        <description>Completely drop a tablespace and all the associated data files

Check data files location

First, note all the datafiles associated with your tablespace: 


SELECT DECODE(r, 1, tablespace_name, null) tablespace_name, file_name
FROM (select tablespace_name, file_name, rank() over (partition by tablespace_name
        order by tablespace_name, file_name) r
        from dba_data_files
        order by tablespace_name, file_name
)</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:get-objects&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>get-objects</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:get-objects&amp;rev=1688488590&amp;do=diff</link>
        <description>Get Objects From Current Schema

List tables


select table_name from user_tables;


List indexes


select index_name, table_name from user_indexes;</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:import-dump&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>import-dump</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:import-dump&amp;rev=1688488590&amp;do=diff</link>
        <description>Oracle - import dump

Optional - create a dedicated tablespace, otherwise use the default one


CREATE TABLESPACE &quot;NEWTBS&quot;
NOLOGGING
DATAFILE &#039;C:\DEV\ORACLE\ORADATA\MJ\5E1C9A696BD54020916EA3277599305C\DATAFILE\NEWTBS&#039; 
SIZE 307200K AUTOEXTEND ON
EXTENT MANAGEMENT LOCAL
ONLINE
SEGMENT SPACE MANAGEMENT AUTO
BLOCKSIZE 8192</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:install-oracle19c-centos7&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>install-oracle19c-centos7</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:install-oracle19c-centos7&amp;rev=1735842138&amp;do=diff</link>
        <description>Install Oracle 19c on Centos 7


yum update -y

yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 zip unzip

groupadd -g 54421 oinstall

group…</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:limit-rows&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>limit-rows</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:limit-rows&amp;rev=1688488590&amp;do=diff</link>
        <description>Limit returned rows (Oracle 12)


select e.employee_id from employees e FETCH first 10 rows only



EMPLOYEE_ID                                                                                                                              

100</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:parallel-sql&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>parallel-sql</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:parallel-sql&amp;rev=1688488590&amp;do=diff</link>
        <description>Run a query using multiple threads


start parallel.sql 8


See [ parallel.zip ] file attached.

Set it back to normal (use one thread)


alter table &lt;table_name&gt; noparallel</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:plsql-naming-conventions&amp;rev=1735842138&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-02T18:22:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>plsql-naming-conventions</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:plsql-naming-conventions&amp;rev=1735842138&amp;do=diff</link>
        <description>Oracle PL/SQL Naming Conventions

	*  Variables: 
		*  Local: prefix with l_ (e.g., l_counter).
		*  Global: prefix with g_ (for those declared in a package specification).

	*  Parameters: 
		*  Prefix with p_ (e.g., p_emp_id).

	*  Cursors: 
		*  Prefix with</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:pluggable-database&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pluggable-database</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:pluggable-database&amp;rev=1688488590&amp;do=diff</link>
        <description>Oracle 12 Pluggable database

Auto start a pluggable database when Oracle starts


export ORACLE_HOME=/path/to/db_home
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=GDB_SID - SID of the global database name to connect to the main database - CDB (not pluggable - PDB)

sqlplus / as sysdba</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:return-rows-between-range&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>return-rows-between-range</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:return-rows-between-range&amp;rev=1688488590&amp;do=diff</link>
        <description>Return rows between specific range (Oracle 12)


select e.employee_id from employees e OFFSET 9 ROWS FETCH NEXT 10 ROWS ONLY



EMPLOYEE_ID</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:session-locking-package&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>session-locking-package</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:session-locking-package&amp;rev=1688488590&amp;do=diff</link>
        <description>Check which session is locking a package

Replace the PACKAGE_NAME with the real name of the package.


SELECT s.sid,
       l.lock_type,
       l.mode_held,
       l.mode_requested,
       l.lock_id1,
       &#039;alter system kill session &#039;&#039;&#039;|| s.sid|| &#039;,&#039;|| s.serial#|| &#039;&#039;&#039; immediate&#039; kill_sid
FROM   dba_lock_internal l,
       v$session s
WHERE  s.sid = l.session_id
AND    UPPER(l.lock_id1) LIKE &#039;%PACKAGE_NAME&#039;
AND    l.lock_type = &#039;Body Definition Lock&#039;</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:sqlplus-format-output&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sqlplus-format-output</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:sqlplus-format-output&amp;rev=1688488590&amp;do=diff</link>
        <description>Format sqlplus output


set linesize 2500
set wrap off
set trimout on
set trimspool on
set long 100000
set pagesize 0
col inmemory_service_name for a10
col table_name for a10
col cluster_name for a20
col cluster_owner for a20
col iot_name for a10
col default_collation for a10
COLUMN first_name FORMAT A10 WORD_WRAP HEADING &#039;Name&#039; JUSTIFY CENTER

spool C:\buffer\out.txt
@C:\buffer\sql.txt
spool off
exit</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:switch-to-pluggable-db-sqlplus&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>switch-to-pluggable-db-sqlplus</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:switch-to-pluggable-db-sqlplus&amp;rev=1688488590&amp;do=diff</link>
        <description>Switch to a pluggable db (Oracle 12)

After you are connected with sqlplus to a container database (which is happening by default), run the connect command inside your sqlplus session.


conn SYS@PMJ as SYSDBA


Then you&#039;ll be required to enter the SYS password.</description>
    </item>
    <item rdf:about="https://medjava.ro/doku.php?id=database:oracle:user-rights&amp;rev=1688488590&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-07-04T16:36:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>user-rights</title>
        <link>https://medjava.ro/doku.php?id=database:oracle:user-rights&amp;rev=1688488590&amp;do=diff</link>
        <description>Create user with minimal rights


CREATE USER SNTSP6 IDENTIFIED BY sntsp6
DEFAULT TABLESPACE DATA
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
/
GRANT RESOURCE TO SNTSP6
/
GRANT CONNECT TO SNTSP6
/
GRANT UNLIMITED TABLESPACE TO SNTSP6
/</description>
    </item>
</rdf:RDF>
