<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gorkemkestane on Medium]]></title>
        <description><![CDATA[Stories by Gorkemkestane on Medium]]></description>
        <link>https://medium.com/@gorkemkestane10?source=rss-723c1882ef6f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Er1T23_zAIhJDW8U</url>
            <title>Stories by Gorkemkestane on Medium</title>
            <link>https://medium.com/@gorkemkestane10?source=rss-723c1882ef6f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 03:41:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gorkemkestane10/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[RMAN Commands Overview1 — Full And Incremental Backup]]></title>
            <link>https://medium.com/@gorkemkestane10/rman-commands-overview1-full-and-incremental-backup-02417fa72dfc?source=rss-723c1882ef6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/02417fa72dfc</guid>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[rman]]></category>
            <category><![CDATA[backup]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[oracle-database]]></category>
            <dc:creator><![CDATA[Gorkemkestane]]></dc:creator>
            <pubDate>Sun, 20 Apr 2025 10:18:30 GMT</pubDate>
            <atom:updated>2025-04-20T10:34:20.537Z</atom:updated>
            <content:encoded><![CDATA[<h3>RMAN Commands Overview1 — Full And Incremental Backup</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/0*VAACaXRd-EK-SHb5.jpeg" /></figure><p><strong>Full backup(A.K.A Incremental Level-0 Of The Database)</strong></p><p>In an Oracle database it is possible to use a <strong>Recovery Manager (RMAN)</strong> script to configure backup settings and perform a <strong>full compressed backup</strong> of, including archivelogs.</p><p>Step by step we’re going to take a glance at these operations below:</p><p>→ Configuring RMAN to optimize and automate backups:<br> Backs up the entire database + archived logs using 4 parallel streams<br> → Compressing the backup for space efficiency (Disk management is crucially important)<br> → Including logical corruption checks<br> → Limiting each backup piece to 3 GB — each backup file size 3GB<br> → Saving backups in the /backup/fullbackupRMAN/ directory with unique names</p><p>Here’s a detailed breakdown of what each command does:</p><ol><li><strong>Connecting to RMAN</strong></li></ol><p>Connect RMAN to the target database using OS authentication (“/” means using the OS user, usually oracle):</p><pre>sudo su -<br>su - oracle<br>rman target /</pre><p><strong>2. RMAN Configuration Settings</strong></p><p>The code below turns on the backup optimization means that it skips backing up files that haven’t changed since the last backup (e.g., unchanged archived logs or datafiles already backed up):</p><pre>configure backup optimization on;</pre><p>Automatically backing up the control file and SPFILE after every backup or structural database change:</p><pre>configure controlfile autobackup on;</pre><p>To specify the format/location for control file autobackups. Here in the command the parameter symbol %F generates a unique filename using DBID and timestamp:</p><pre>configure controlfile autobackup format for device type disk to &#39;/backup/fullbackupRMAN/%F&#39;;</pre><p>Command snippet below, allows RMAN to create backup sets of unlimited size (unless overridden by maxpiecesize in the allocate channel command):</p><pre>configure maxsetsize to unlimited;</pre><p>When backing up to the disk, the command configures RMAN to use 4 channels (i.e., 4 parallel streams) :</p><pre>configure device type disk parallelism 4;</pre><p><strong>3. Backup Execution Block</strong></p><ul><li>Command in the run block, Manually allocates 4 channels for parallel backup to disk. format specifies file naming using placeholders:</li><li>%I = DBID</li><li>%Y%M%D = YearMonthDay</li><li>%U = Unique identifier for the backup piece</li><li>maxpiecesize 3G limits each backup piece to 3 GB.</li></ul><pre>run<br>{<br>  allocate channel c1 type disk format &#39;/backup/fullbackupRMAN/%I-%Y%M%D-%U&#39; maxpiecesize 3G;<br>  allocate channel c2 type disk format &#39;/backup/fullbackupRMAN/%I-%Y%M%D-%U&#39; maxpiecesize 3G;<br>  allocate channel c3 type disk format &#39;/backup/fullbackupRMAN/%I-%Y%M%D-%U&#39; maxpiecesize 3G;<br>  allocate channel c4 type disk format &#39;/backup/fullbackupRMAN/%I-%Y%M%D-%U&#39; maxpiecesize 3G;</pre><p>The command snippet below is to take a full RMAN backup. It performs a <strong>Level 0</strong> backup ( and Level 0 backup is equivalent to a full backup).</p><ul><li>backup as compressed backupset: compresses the backup to save space.</li><li>incremental level 0: Full RMAN backup</li><li>check logical: enables logical block checking during backup for corruption.</li><li>plus archivelog: also backs up all archived redo logs after the datafile backup.</li></ul><pre>backup as compressed backupset incremental level 0 check logical database plus archivelog;</pre><p>We should releases the channels, once the backup operation is complete.</p><pre> release channel c1;<br>  release channel c2;<br>  release channel c3;<br>  release channel c4;<br>}</pre><p><strong>Incremental Backup(A.K.A Incremental Level-1 Of The Database)</strong></p><p>We can use another <strong>RMAN script</strong> to perform a <strong>Level 1 incremental backup</strong> of an Oracle database. Similar mentality but it’s a bit differs. Let’s walk through each command and explain its purpose, especially how it differs from the previous script.</p><p>Using the commands below, we should reach to the RMAN environment on the console screen, It connects to the target database using OS authentication (no password prompt):</p><pre>sudo su -<br>su - oracle<br>rman target /</pre><p>Echo command causes RMAN to <strong>display each command before executing it</strong>. It’s useful for logging and debugging purpose:</p><pre>set echo on;</pre><p>Code below turns on the backup optimization means that it avoids backing up files that haven’t changed (useful for incremental or archived log backups):</p><pre>configure backup optimization on;</pre><p>Control file autobackup on command; checks and ensures the control file and SPFILE are backed up automatically after every backup:</p><pre>configure controlfile autobackup on;</pre><p>Setting the location and format for control file autobackups. %F = DBID + timestamp = unique filename.:</p><pre>configure controlfile autobackup format for device type disk to &#39;/backup/fullbackupIncremental/%F&#39;;</pre><p>Configure maxsetsize to unlimited command provides no limit on the total size of a backup set. (This doesn’t affect individual piece size — maxpiecesize controls that.):</p><pre>configure maxsetsize to unlimited;</pre><p>Device type disk parallelism command, tells RMAN to use <strong>4 parallel channels</strong> when backing up to disk (for speed).:</p><pre>configure device type disk parallelism 4;</pre><p><strong>Backup Execution Block</strong></p><p>In the run block, the backup execution commands given. It manually allocates 4 disk channels with unique file naming:</p><p>%I = DBID</p><p>%Y%M%D = YearMonthDay</p><p>%U = Unique identifier</p><p>maxpiecesize 3G = each backup piece can be up to 3GB.</p><pre>run<br>{<br>allocate channel c1 type disk format &#39;/backup/fullbackupIncremental/%I-%Y%M%D-%U&#39; maxpiecesize 3G;<br>allocate channel c2 type disk format &#39;/backup/fullbackupIncremental/%I-%Y%M%D-%U&#39; maxpiecesize 3G;<br>allocate channel c3 type disk format &#39;/backup/fullbackupIncremental/%I-%Y%M%D-%U&#39; maxpiecesize 3G;<br>allocate channel c4 type disk format &#39;/backup/fullbackupIncremental/%I-%Y%M%D-%U&#39; maxpiecesize 3G;</pre><p>The <strong>core backup command</strong>, explained:</p><p>as compressed backupset = save space by compressing.</p><p>incremental level 1 = <strong>only backs up blocks changed since the last Level 0 or Level 1 backup</strong>.</p><p>check logical = checks for logical corruption during backup.</p><p>database plus archivelog = backs up the entire database <strong>and</strong> archived redo logs.:</p><pre>backup as compressed backupset incremental level 1 check logical database plus archivelog;</pre><p>Frees the channels after the backup is complete.:</p><pre>release channel c1;<br>release channel c2;<br>release channel c3;<br>release channel c4;<br>}</pre><p>This script performs a <strong>Level 1 incremental compressed backup</strong> using 4 parallel streams, includes archive logs, and checks for logical corruption.</p><p>Incremental Level 1: Backs up only changed blocks since last Level 0/1<br>Parallelism: 4 channels → faster backup</p><p>Max Piece Size: 3GB → easier to manage/transfer</p><p>Compression: Saves disk space</p><p>Controlfile Autobackup: Ensures recovery metadata is saved</p><p>Backup Optimization: Avoids backing up files unnecessarily</p><p><strong>The Differences Between Level 0 and Level 1 Backup Types:</strong></p><p><strong>Oracle RMAN Level 0</strong> and <strong>Level 1</strong> are types of backups but they serve different purposes.</p><p>🔹 <strong>Level 0 Backup</strong></p><p>This is essentially a <strong>full backup</strong> of the entire database. It serves as the <strong>base</strong> for all <strong>Level 1</strong> backups. It <strong>copies every block</strong> of every datafile, whether or not the block has changed.</p><pre>backup incremental level 0 database;</pre><p>🔹 <strong>Level 1 Backup<br></strong>This is an <strong>incremental</strong> backup, meaning it backs up <strong>only the blocks that have changed</strong> since: the <strong>last Level 0</strong> backup (if it’s the first Level 1), or the <strong>last Level 1</strong> backup (if you’re doing cumulative or differential).</p><p>There are two types of Level 1 backups:</p><h4>1. Differential Level 1 (default)</h4><p>Backs up blocks <strong>changed since the last Level 0 or Level 1</strong>. Smaller and faster than cumulative.</p><pre>backup incremental level 1 database;</pre><h4><strong>2. Cumulative Level 1</strong></h4><p>Backs up blocks <strong>changed since the last Level 0</strong>, ignoring other Level 1s. Bigger but easier for recovery (only one Level 0 + one Level 1 needed).</p><pre>backup incremental level 1 cumulative database;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*BzzOm56jEJTXU8lnBIWLKA.png" /><figcaption>Table 1.1 RMAN Backup Types and its Features</figcaption></figure><p>Table 1.1 highlights how features vary across different RMAN backup types.</p><p>So, if you want to set up an <strong>incremental backup strategy</strong>, you’d typically do something like:</p><ul><li><strong>Sunday:</strong> Level 0</li><li><strong>From Monday to Saturday:</strong> Level 1</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02417fa72dfc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[İlişkisel Veritabanları ve Varlık-İlişki Diyagramları]]></title>
            <link>https://medium.com/@gorkemkestane10/i%CC%87li%C5%9Fkisel-veritabanlar%C4%B1-ve-varl%C4%B1k-i%CC%87li%C5%9Fki-diyagramlar%C4%B1-7ecdb8b8d62f?source=rss-723c1882ef6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ecdb8b8d62f</guid>
            <dc:creator><![CDATA[Gorkemkestane]]></dc:creator>
            <pubDate>Tue, 03 Sep 2024 21:36:15 GMT</pubDate>
            <atom:updated>2024-09-03T21:36:15.240Z</atom:updated>
            <content:encoded><![CDATA[<p>Veritabanlarından bahsettiğimizde, veritabanının, veriler için depolama birimi olduğunun farkındayız.</p><p>İlişkisel veritabanı nedir? Bu, verilerin tablolarda depolandığı ve bu tabloların bir şekilde mantıksal olarak birbirine bağlı olduğu anlamına gelir.</p><p>Elbette, veritabanımıza sadece bir tablo veya birbirine bağlı olmayan birden fazla tablo koyabiliriz, ancak bu mantıklı olmaz.</p><p>Veriler tablolarda depolanır. Her bir satırın(varlık-entity) sütunları(attribute-öznitelik) vardır.</p><p>Varlıklar(entities) ve öznitelikler(attributes) hakkında konuştuğumuzda, bir varlığı(entity) bir tablodaki bir satır(row) olarak düşünün ve öznitelik(attribute) o varlığın(entity) bir sütunu veya özelliğidir.</p><p>Örneğin, aşağıdaki gibi bir tabloda; yalnızca iki satırınız veya iki varlığınız var.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*y5rbZ7AefikNCeSzBSOgHw.png" /></figure><p>Yani, ilk varlık(entity) ID=1, İsim=Gorkem, Telefon numarası=123456778 ve şehir id’si=10 attribute’lerine(öznitelik) sahip olurdu.</p><p>Aynı şekilde, ikinci varlık(entity) ID=2, İsim=Mevlut, Telefon numarası=987554112 ve şehir id’si = 58 attribute’lerine (öznitelik) sahip olurdu.</p><p>ERD(Entity Relationship Diagram) veya diğer bir deyişle, varlık ilişki diyagramından bahsettiğimizde, bu yalnızca bir veritabanındaki tabloların birbirine nasıl bağlandığının grafiksel bir gösterimidir.</p><p>Şunu unutmayın, birincil anahtar(primary key) benzersiz(unique) bir değerdir ve bir varlık(entity) için yalnızca bir birincil anahtar(primary key) bulunabilir.</p><p>Yani, örneğimizde, eğer ID birincil anahtar(primary key) olsaydı, ID’si 1 olan iki varlığa(entity) sahip olamazdık.</p><p>Tablolar arası ilişkilerde, diğer bir deyişle bağlantılarda kardinalite(cardinality) adı verilen bir kavram bulunmaktadır. Tablolar arasındaki bağlantı veya ilişki, farklı kardinalitelere sahip olabilir.</p><h4><strong>Bire bir İlişki (One to One Cardinality)</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*TRjbZeYZbBOygbdPFy7aAQ.png" /></figure><p>Bu örnekte, KİŞİ ve KİMLİK KARTI olan iki tablomuz veya iki varlığımız var ve bunlar yalnızca bire bir kardinaliteye sahip.<br>Bu, bir kişinin yalnızca bir kimlik kartının olabileceği ve Varlık İlişki Diyagramında (Entity Relationship Diagram) da bunun yalnızca düz bir çizgiyle gösterileceği anlamına gelir.</p><h4>Bire-Çok İlişki (One to Many Cardinality) ve Çoka-Bir İlişki (Many to One Cardinality)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*9G-7jkfgauncvAb3fdN7Pg.png" /></figure><p>Bire-çok kardinalite ve tam tersi olan Çoka-bir kardinaliteden bahsedecek olursak, Örnek olarak Birim ve Çalışan tablolarımız olsun. Buradaki tablolar aynı zamanda HR şemasından bir örnektir.<br>Yani, bir birimde birden fazla çalışan olabilir, ancak çalışan yalnızca bir birimde çalışabilir.</p><p>Varlık-İlişki diyagramında (ERD) bu düz bir çizgiyle ve diğer tarafta Crowfoot (üçlü çizgi) ile gösterilir.</p><h4>Çoka-Çok İlişki (Many to Many Cardinality)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*oLydRcdZn14eGHUzOfOpiA.png" /></figure><p>Çoka-Çok kardinalitesi veya ilişkisi için Kitap ve Yazar tablolarını örnek olarak verebiliriz. Bir yazar tarafından yazılmış birden fazla kitap olabilir. Ve ayrıca bir kitabın birden fazla yazarı olabilir. Varlık-İlişki Diyagramında(ERD) , bu her iki taraftaki üçlü çizgi(Crowfoot) ile temsil edilir.</p><p>Veritabanı üzerinden örnek verecek olursak;</p><p>Oracle SQL Developer programını açalım ve burada HR şemasının grafiksel gösterimini inceleyelim. SQLDeveloper’ın şemayı otomatik olarak grafiksel olarak gösterebilmesi gibi harika bir özelliği var.</p><p>Bu işlemi aşağıdaki görselde gösterildiği gibi gerçekleştirebiliriz. SQL Developer programında File → Data Modeler → Import → Data Dictionary’e sırayla tıklanmalıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*Amvvia0k2mablSSqWjUQlQ.png" /></figure><p>Ekrana gelen pencerede, Connect to Database menüsünde Connection Name bölümünde hr bağlantısını seçtim. Ardından Next butonuna tıkladım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*N277lPVwGssAPtUz1zkhRQ.png" /></figure><p>Select Schema/Databases menüsünde HR Şemasını seçtim. Ardından Next butonuna tıkladım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*YCfZSmvAyk931WZVAgAKWw.png" /></figure><p>Select Objects to import bölümünde hr şeması altında bulunan tüm tabloları seçeceğim çünkü tablolar arasındaki tüm bağlantıları temsil etmek istiyorum. Ardından Next butonuna tıkladım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*DSIucVfUAamnIS0xs7t_Zw.png" /></figure><p>Generate Design bölümünde , Veritabanı Adının Oracle, Veritabanı Sürümünün Oracle Database 18c Express Edition Release 18.0.0.0.0 -<br>Production Version 18.4.0.0.0 olduğunu gösteriyor.</p><p>Buna ilave olarak, 8 adet tablonun import edileceğini bildiriyor.</p><p>Finish butonuna tıklayıp işlemi bitirdim. Birkaç dakika sonra, SQL Developer bize bu tablolardaki tüm bağlantıları gösterecektir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*m3XdhLHk5OmOffPoIeYFDw.png" /></figure><p>Sonraki adımda aşağıdaki gibi bir View Log ekranı karşımıza gelir.</p><p>Oracle SQL Developer Data Modeler sürümü 23.1.0.087.0806</p><p>Data Modeler’ın Import Log’u 02.09.2024 tarihinde 22:29 da kaydedilmiş.</p><p>8 adet tablo import edilmiş. Close diyerek pencereyi kapattım.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*wc5Fz7z92uNNwWtO0gidcA.png" /></figure><p>Aşağıdaki şekilde bir Varlık-İlişki Diyagramı (ERD) ekrana gelmiştir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*m4YHEnA1XnMtTzJNIKBPJg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*pTe1f-VepmTgrhbOipMRnw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*b8GzwZjP6zQ6sC9ukFKzSA.png" /></figure><p>HR.COUNTRIES ve HR.REGIONS tabloları arasında Çoka-Bir İlişki (Many to One Cardinality) vardır.<br>REGION_ID , HR.COUNTRIES tablosunda foreign key’dir. REGION_ID, HR.REGIONS tablosunda primary key’dir. Bu iki tablo REGION_ID kolonu aracılığıyla birbirine bağlanır. Bir bölgede birden fazla ülke olabilir.</p><p>Jobs tablosunu ele alalım, Job ve Employees tabloları arasındaki ilişkiyi inceleyelim:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*sX6GYLK93aOyFF42QquqTQ.png" /></figure><p>HR.JOBS tablosunda , JOB_ID birincil anahtardır(primary key). HR.EMPLOYEES tablosunun JOB_ID’sinde bir yabancı anahtar(foreign key) vardır. Bu, birden fazla çalışanın aynı işe sahip olabileceği, ancak jobs tablosunda, açıklamayı taşıyan yalnızca bir varlık olabileceği anlamına gelir. Örneğin, manager,developer vb.</p><p>Bu durumu HR.JOBS ve HR.EMPLOYEES tablolarını sorgulayarak kontrol edelim.</p><p>HR.JOBS şemasında bulunan bütün kayıtları getirecek sorguyu çalıştıralım:<br>SELECT * FROM hr.jobs;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*E22i98RKSq9-z3Ee-kZ2Ow.png" /></figure><p>Burada JOB_ID=IT_PROG , JOB_TITLE=Programmer olan kayıtı göz önünde bulunduralım.</p><p>Karşılaştırma yapmak için HR.EMPLOYEES tablosunda bulunan tüm kayıtları aşağıdaki sorgu aracılığıyla getirelim:</p><p>SELECT * FROM hr.employees;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*oY75QyI_iSbLNLuj577NEA.png" /></figure><p>Örnek olarak bu tabloda Diana Lorentz kaydının JOB_ID’si IT_PROG muş.</p><p>HR.JOBS tablosuna gittiğimiz zaman JOB_ID’si IT_PROG olan kayıtların JOB_TITLE’ı Programmer mış. Bu durumda Diana Lorentz , Programmer oluyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*E22i98RKSq9-z3Ee-kZ2Ow.png" /></figure><p>Ve EMPLOYEE tablosunda, onun tek IT_PROG olmadığını görebiliriz.<br>Ancak JOBS tablosunda , yalnızca bir JOB_ID bulunabilir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*oY75QyI_iSbLNLuj577NEA.png" /></figure><p>Bu benzersiz bir özelliktir ve yalnızca bir varlık bu işin bir türüne sahip olabilir.</p><p>Ayrıca diyagramımızda, ilişkinin çizgi ve Crows foot (üç çizgi) ile temsil edildiğini görebiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*sX6GYLK93aOyFF42QquqTQ.png" /></figure><p>Ayrıca Varlık-İlişki Diyagramı (ERD), çoğu durumda gerçek veritabanının oluşturulmasından önce oluşturulur.</p><p>Yani bir ERD’niz olur ve bundan sonra veritabanı için gerekli olan tüm tabloları oluşturursunuz.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ecdb8b8d62f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>