You can see the transaction lock with enterprise manager or command prompt. The KILL SESSION command doesn’t actually kill the session. It merely asks the session to kill itself. In some situations, like waiting for a reply from a remote database or rolling back transactions, the session will not kill itself immediately and will wait…
Locations of Critical (important) Files in Oracle
SPFILE on filesystems You can find spfile location with show parameter command. SQL>show parameter spfile; Spfile generally holds in \u01\app\oracle\product\10.2.0\dbhome_1\dbs\spfileorcl.ora on filesystems. on ASM SQL>show parameter spfile; +DATA\orcl\spfileorcl.ora CONTROLFILE on filesystem You can find controlfile location with show parameter command. SQL>show parameter control_files; ControlFile generally holds in \u01\app\oracle\product\10.2.0\oradata\orcl\control01.ctl on filesystems. Oracle has three control file…
Tracking changes in datas in Oracle
If you want to learn the changes in the past of table datas, you can use version identifier in SQL. These identifiers are versions_starttime, versions_endtime. Example select versions_starttime,versions_endtime,salary from employees versions between scn minvalue and maxvalue where employee_id=100;
Create or Delete Services in Windows Operating Systems
Services are added from the Command Prompt. You need to know the actual service name as opposed to what Microsoft calls the Display Name. For example, if you wanted to create or delete the Help and Support service, the name used at the Command Prompt would be “helpsvc” rather than the Display Name of “Help…
For Turkish Character Set in Oracle
If you want to use turkish character, you can use ‘WE8ISO8859P9 – West European 8’ character set.
pg_dumpall with shell script and crontab in Linux
You can take schedule backup with shell script. Firstly, You must create shell script file in operating system. After you can append to crontab. Crontab is a UNIX command that creates a table or list of commands, each of which is to be executed by the operating system at a specified time. crontab is used…
Data Dump in PostgreSQL
You can use two statement for data dump. These statements are pg_dump and pg_dumpall. pg_dump can has table data, but pg_dumpall can has all database objects these are users, groups, stores and other object, so pg_dumpall has all database object. You can move database from product system to test system with pg_dumpall easyly. Example For…
Learn Free Space of Tablespaces in Oracle
You can learn allocate area of tablespaces. You can use data dictionary for this processing. SELECT a.tablespace_name, a.file_name, a.bytes allocated_bytes, b.free_bytes FROM dba_data_files a, (SELECT file_id, SUM(bytes) free_bytes FROM dba_free_space b GROUP BY file_id) b WHERE a.file_id=b.file_id ORDER BY a.tablespace_name;
Users, Roles and Grants in Oracle
Oracle has predefined accounts which are SYS and SYSTEM user. These users can not be drop. SYS user has all privileges with Admin Option. If you want to connect SYS account, you must use the AS SYSDBA or AS SYSOPER clause. Any user can connect SYSDBA privilege by using the AS SYSDBA clause. Only privileged…
XML file export with stored procedure in Oracle
This example provides export xml file. You must create a directory before create procedure. After, you must give grant for user. Finally, You can create procedure and execute. Create Directory and Grant You must be sys user and can execute this queries; CREATE DIRECTORY XMLDUMP AS ‘C:\XmlDirectoryFileName’; SELECT * FROM DBA_DIRECTORIES; GRANT READ,WRITE ON DIRECTORY…