By default /dev/shm is created to use half size of your server physical memory
If you see that MEMORY_TARGET not supported on this system while starting Oracle Database Instance in sqlplus window, please follow the instructions as below;
For this case, you should increase memory that using by Oracle as root user (e.g. size=10240m means 10 GB RAM) -> umount tmpfs -> mount -t tmpfs shmfs -o size=10240m /dev/shm If you encounter any error like that "the system is using already", (e.g. process id of /dev/shm is "5265") -> fuser -m /dev/shm or -> lsof /dev/shm -> kill 5265 Ref: http://blog.yannickjaquier.com/linux/linux-memory-usage.html
$ sqlplus Enter user-name: sys as sysdba @sys to see parameter process for altering system sessions (processes (integer) = sessions) SQL> show parameter session SQL> ALTER system SET sessions= 300 scope=spfile; SQL> show parameter process SQL> ALTER system SET processes= 300 scope=spfile; Finally, restart the database to activate all changes
Please execute following command as "sys"; SELECT tablespace_name, owner, segment_type "Object Type", COUNT(owner) "Number of Objects", ROUND(SUM(bytes) / 1024 / 1024, 2) "Total Size in MB" FROM sys.dba_segments WHERE tablespace_name IN ('ALPERTABLESPACE') GROUP BY tablespace_name, owner, segment_type ORDER BY tablespace_name, owner, segment_type;
$ sqlplus scott/tiger@orcl @orc1 -> tnsnames.ora – connection node name scott -> db username tiger -> db username password $ sqlplus / as sysdba@orcl Login as sysdba with this.
Please execute following commands as "sys"; select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb from (select tablespace_name, round(sum(bytes)/1024/1024 ,2) as free_space from dba_free_space group by tablespace_name) a, (select tablespace_name, sum(bytes)/1024/1024 as tbs_size from dba_data_files group by tablespace_name) b where a.tablespace_name(+)=b.tablespace_name
Shows that CPU usage information related to each core and all cpu in every 20 seconds.
sar 10
Shows that CPU usage information related to all cpu in every 10 seconds.
Examples: oracle@alperdb:~> mpstat -P ALL 1 Linux 2.6.32.12-0.7-default (alperdb) 02/21/2014 _x86_64_ 09:12:46 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 09:12:47 AM all 0.53 0.00 0.00 0.53 0.00 0.00 0.00 0.00 98.94 09:12:47 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 09:12:47 AM 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 09:12:47 AM 2 1.11 0.00 0.00 0.00 0.00 0.00 0.00 0.00 98.89 09:12:47 AM 3 1.14 0.00 0.00 2.27 0.00 0.00 0.00 0.00 96.59
oracle@alperdb:~> sar 10 Linux 2.6.32.12-0.7-default (alperdb) 02/21/2014 _x86_64_ 09:16:13 AM CPU %user %nice %system %iowait %steal %idle 09:16:23 AM all 0.20 0.00 0.05 0.18 0.00 99.57 09:16:33 AM all 0.90 0.00 0.32 0.22 0.00 98.56 09:16:43 AM all 1.89 0.00 0.47 0.32 0.00 97.32
Here are some basic shortcuts while you are in command window; CTRL + a -> go to begin of the line CTRL + e -> go to end of the line CTRL + d -> log-out CTRL + w -> remove one word CTRL + u -> remove all line CTRL + r -> search for a word in history CTRL + ins -> paste the clipboard "cd -" -> go to last directory
-If you are authorized to sys user. Firstly run this procedure to compile and save. --- CREATE OR REPLACE PROCEDURE P_KILL_SESSION(DATABASE_USER_NAME IN VARCHAR2, STR_RESULT OUT VARCHAR2) IS str_exec VARCHAR2(1000); BEGIN FOR cur_session IN (SELECT sid, serial# FROM v$session WHERE username = upper(DATABASE_USER_NAME) AND status != 'KILLED') LOOP str_exec := 'alter system kill session ''' || cur_session.sid || '' || ',' || cur_session.serial# ||''''; BEGIN execute immediate str_exec; STR_RESULT := 'Sessions are terminated successfully'; EXCEPTION WHEN OTHERS THEN RAISE_APPLICATION_ERROR ( -20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM ) ; END; END LOOP; END; --- To use it; In command window-editor, var STR_RESULT VARCHAR2 EXEC P_KILL_SESSION('test_user',:STR_RESULT) --test_user session could be killed
You can type special character with using ASCII Table. eg. If you want to type backslash (\), press ALT + 92 You can reach all ASCII table via this link. (Refer to DEC) Note: Please be sure that NUM_LOCK is on.
For example, you have a long SQL file and you must run it in command line or in such tool or program. For this, you can use Ultra Edit or Notepad++ tool for convert it.
Ultra Edit: Open file via Ultra Edit -> Press CTRL + R -> Input ^p and space character in related columns -> Click Start button -> Click Replace All button Notepad++: Open file via Notepad++ -> Select desired lines -> Press CTRL + J That's it.
Open My Computer -> Right mouse click -> Select “Add a new network location” -> Click as twice “Next” -> Enter your network address and click Next -> Enter your new network shortcut name -> Click finish
Notes; This feature is able to use for “FTP” and “remote connection” Like; ftp://IP or \\Your_IP