I have encountered the problem of Russian letters in SQLPlus many times, so I decided to document it so I wouldn't have to search the internet again. If we see gibberish instead of letters, we do: 1. Check what we have in NLS_LANG in the registry. It should be: ...
This publication explains how to work with specific methods that are present in the Oracle database, for working with Trees. So, let's get started... --Creating a table for experimenting with trees. create table my_tree ( id nu…
Example of a simple user (schema) creation in Oracle DB: --Create a new user test with a password of 240580 create user test IDENTIFIED BY 240580 default tablespace users temporary tablespace temp --Add a quota for disk space...
To find out which session is blocking a package: SELECT s.*, l.lock_type, l.mode_held, l.mode_requested, l.lock_id1, 'alter system kill session '|| s.sid|| ' '|| s.serial#|| ' ' immediate; kill_sid FROM dba_lock_internal l, v$session…
This script displays the relationships between system processes and sessions in Oracle: select * from v$process p, v$session s where p.addr=s.paddr
This is another method for resolving the error type: ORA-01654: unable to extend. We will learn the tablespace sizes and free space: select file_name,tablespace_name,user_bytes/1024/1024,bytes/1024/1024, maxbytes/1024/1024,autoextensible from dba_data_file
Error when setting up a connection to the server from Oracle SQL Developer: ORA-00604: error occured at recursive SQL level 1ORA-12705: Cannot access NLS data files or invalid enviroment specified To fix, follow these steps: Open the <folder_with_the_environment>\ide\bin\ide.conf file and add the following lines: AddVMOption -Duser.language=en AddVMOption -Duser.region=us And that's it!
A simple email address check looks like this: select * from EMailsTable et where REGEXP_LIKE (et.Email, '[A-z0-9._%-]+@[A-z0-9._%-]+\.[A-z]{2,4}') The script selects from the table with email addresses only those addresses that match the specified regular expression.
For those who have switched from MSSQL to Oracle, like me, it's very uncomfortable to lack such a convenient construction as: select * into #tmp from table1 Where #tmp - temporary table, with which we can further address within the session as with a normal one...
A tourist was browsing the animals for sale in a pet store and saw a man buy a monkey for $5000. He approached the salesperson and asked why this monkey was so expensive. The salesperson replied: