Skip to content

Fatih Acar's blog

About of Database Systems and Information Technologies

Menu
  • Home
  • About Me
  • Contact Me
Menu

Category: SQL

Show Data Files Size in Oracle

Posted on 20/12/201220/12/2012 by Fatih Acar

If you want to show tablespace and datafile size, you can use below query. Also, you can add to procedure with schedule job for notification as mail. 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;

Show First and Last Value of Data in Oracle

Posted on 04/07/201203/07/2012 by Fatih Acar

You can show first and last value of data which changes with update. Also you can show all values. Example Select versions_starttime, versions_endtime, salary from employees versions between scn minvalue and maxvalue where last_name=’King’;

Create Trigger in Oracle

Posted on 04/06/201204/06/2012 by Fatih Acar

A database trigger is a stored procedure that automatically executes whenever an event occurs. The event may be insert-delete-update operations. For example, Oracle initiates an ‘AFTER INSERT’ trigger after an insert event has occurred or an ‘AFTER UPDATE’ trigger after an update event has occurred. You can write triggers that fire whenever one of the…

Delete Duplicate Rows Without All Records in Oracle

Posted on 10/05/201222/06/2020 by Fatih Acar

If you want to delete duplicate rows but not all rows in table, you can use a procedure. For example, you have 10 duplicate rows and you want to delete 9 rows, then you can use procedure to delete process. For instance, you have a table as tmp_table. tmp_table’s columns are id,name,surname,city,phone. You want to…

Turkish Letter (i) Convert Problem in Oracle

Posted on 30/03/201201/05/2012 by Fatih Acar

When you make converting Turkish chacter (i) with upper function, the result is (I). This is a problem. Because you want to pair two word but you can not pair with using the familiar functions which are upper, lower, initcap. You can use NLS_UPPER function for the solution to solve this problem. Example SELECT NLS_UPPER(‘şampiyon’,…

Create Fast Refresh for Materialized Views in Oracle

Posted on 17/12/201127/04/2012 by Fatih Acar

You can demand fast refresh for materialized views. Because refresh of tables which have large data are hard. The refresh time is long. Thus, you have to use fast refresh statement for this object. Firstly, You have to create materialized view log for table. If change a data, this changes will write this log. You…

Show Last Refresh Time of Materialized Views in Oracle

Posted on 13/12/201113/12/2011 by Fatih Acar

You can demand last refresh time of materialized views. You can use all_mviews view for show refresh times. Example SQL> select last_refresh_date , mview_name from all_mviews;

Translate Function in Oracle

Posted on 08/12/2011 by Fatih Acar

The translate function replaces a sequence of characters in a string with another set of characters. However, it replaces a single character at a time. For example, it will replace the 1st character in the string_to_replace with the 1st character in the replacement_string. Then it will replace the 2nd character in the string_to_replace with the…

Drop User With Own Schema in Oracle

Posted on 17/11/201121/11/2011 by Fatih Acar

If you use cascade statement, delete user with own schema. Example SQL> Drop User username Cascade;

Tracking changes in datas in Oracle

Posted on 07/10/201108/10/2011 by Fatih Acar

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;

Posts pagination

  • Previous
  • 1
  • 2
  • 3
  • 4
  • Next



View Fatih ACAR's profile on LinkedIn

Categories

  • Databases (329)
    • MsSQL Server (18)
      • Administration (16)
      • Errors and Solutions (4)
      • SQL (2)
    • MySQL (5)
      • Administration (4)
      • Backup And Recovery (1)
      • Errors and Solutions (1)
    • Oracle (290)
      • Administration (79)
      • Backup And Recovery (29)
      • Errors and Solutions (195)
      • Procedure (10)
      • SQL (32)
    • PostgreSQL (16)
      • Administration (15)
      • Errors and Solutions (3)
      • SQL (2)
    • Redis (1)
  • Microsotf Dynamics CRM (1)
  • Operating Systems (47)
    • Linux & Unix (34)
    • Windows (13)
  • Programing (5)
    • Python (5)
  • SAP (15)
    • Errors and Solutions (4)
    • SAP Basis (12)
  • Security (8)
    • Database Security (6)
    • Information Security (1)
    • System Security (4)
  • VMware (4)

Recent Posts

  • Redis 7 Sentinel Infrastructure Installation
  • Oracle Database 19c Multi Data Guard and DML Redirect, Switchover-Failover Operations on Oracle Linux 8
  • Oracle Database 23ai Free Installation Steps on Oracle Linux 9
  • Oracle Database 19c Active Data Guard Installation and DML Redirect, Switchover-Failover Operations on Oracle Linux 8
  • Oracle Database 19c Installation and 19.22 RU Patch Apply on Oracle Linux 8

Resources

  • Oracle
  • PostgreSQL

Blogroll

  • Gökhan Atıl
  • H. Koray Gündüz
  • Hakan Talip Öztürk
  • Zekeriya Beşiroğlu

Web Pages

  • BT Çözümleri

Tag Cloud

Administration Backup and Recovery Cluster Systems Database Administration Database Security Linux Linux Administration MsSQL Server MsSQL Server Error and Solutions MySQL MySQL Administration ORA-00018 ORA-00020 Oracle Oracle 12c Oracle 19c Oracle Administration Oracle Backup and Restore Oracle Data Guard Oracle Data Guard Failover Oracle Data Guard Switchover Oracle Error Solutions Oracle Linux Oracle Rman Backup Oracle Security Oracle SQL Query PostgreSQL PostgreSQL Administration PostgreSQL High Availability PostgreSQL Hot Standby Python SAP Basis Sap Errors and Solutions Sap System Administration SQL SQL Server Administration SQL Server Availability Group Stored Procedure System Administration System Security VMware VMware Administration Windows Windows Batch Script Windows Server

Social

  • View facar1987’s profile on Twitter
  • View facar’s profile on LinkedIn

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 16 other subscribers
©2026 Fatih Acar's blog | Built using WordPress and Responsive Blogily theme by Superb