This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select sid, | |
| serial#, | |
| value,sql_id, | |
| piece, sql_text | |
| from v$session | |
| join v$sesstat | |
| using (sid) | |
| join v$sqltext using (sql_id) | |
| where statistic# = (select statistic# | |
| from v$statname |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BEGIN | |
| HTP.p ( 'Apex URL: ' | |
| || OWA_UTIL.get_cgi_env ('REQUEST_PROTOCOL') || '://' | |
| || OWA_UTIL.get_cgi_env ('HTTP_HOST') || ':' | |
| || OWA_UTIL.get_cgi_env ('SERVER_PORT') || '/' | |
| || OWA_UTIL.get_cgi_env ('SCRIPT_NAME') | |
| || OWA_UTIL.get_cgi_env ('path_info') || '?' | |
| || OWA_UTIL.get_cgi_env ('QUERY_STRING') | |
| ); | |
| END; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare | |
| function ping(pHostName varchar2, | |
| pPort number default 1000) return varchar2 is | |
| tcpCnx utl_tcp.connection; | |
| cOk constant varchar2(2) := 'OK'; | |
| cFail constant varchar2(5) := 'ERROR'; | |
| begin | |
| tcpCnx := utl_tcp.open_connection(pHostName, | |
| pPort); | |
| utl_tcp.close_connection(tcpCnx); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare | |
| r raw(32767); | |
| begin | |
| r := utl_raw.cast_to_raw('Test'); | |
| dbms_output.put_line(r); | |
| r := utl_encode.base64_encode(r); | |
| dbms_output.put_line(utl_raw.cast_to_varchar2(r)); | |
| r := utl_encode.base64_decode(r); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select segment_type, | |
| sum(bytes) / 1024 / 1024 as size_in_mb, | |
| sum(blocks) as size_in_blocks | |
| from dba_extents | |
| group by segment_type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER SYSTEM KILL SESSION 'sid,serial#'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select /*+ ORDERED USE_NL(s2,s1) */ | |
| s1.some_cols | |
| from s1, s2 | |
| where s1.some_id = s2.some_id | |
| and sdo_anyinteract(s2.shape, s1.shape) = 'TRUE' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT LEVEL row_num | |
| FROM dual | |
| CONNECT BY LEVEL <= 365 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * | |
| FROM (SELECT 'SESSION' SCOPE | |
| ,nsp.* | |
| FROM nls_session_parameters nsp | |
| UNION | |
| SELECT 'DATABASE' SCOPE | |
| ,ndp.* | |
| FROM nls_database_parameters ndp | |
| UNION | |
| SELECT 'INSTANCE' SCOPE |
NewerOlder