News
Entertainment
Science & Technology
Life
Culture & Art
Hobbies
News
Entertainment
Science & Technology
Culture & Art
Hobbies
In today's article, we will be learning the Loop Statements, one of the plgpsql commands that helps us perform operations between the given values. Although this command sometimes makes operations easier, it can cause problems when we do not use the exit command. That's why we need to pay attention to logical errors and our
In today's article, we will be examining how we can learn the time of any query we write. We can learn the time of any operation performed with the following command. SQL> SET TIMING ON After this command, we can now learn the time of the queries we run. SQL> CREATE TABLE ONUR_DENEME LOGGING AS
In this article, you will learn how to use the PostgreSQL CASE conditional expression to form conditional queries. The PostgreSQL CASE expression is the same as IF/ELSE statement in other programming languages. General Usage: CASE WHEN condition_1 THEN result_1 WHEN condition_2 THEN result_2 [WHEN ...] [ELSE else_result] END Let's make the following comments according to
This Oracle tutorial explains how to use the Oracle CREATE TABLE AS statement with syntax and examples. In some cases, we can create an exact replica of a table or one that meets certain conditions. In such cases, only the NOT NULL constraint is passed to the new table. Other constraints are not passed. We
In this tutorial, you will learn how to use the PostgreSQL IF ELSE statements to execute a command based on a specific condition. if-then statement The if statement works when the condition is true. Below is the simplest form of the if statement: if condition then statements; end if; if-then-else statement The if...then...else statement executes
In today's article, we will be examining Tables In Oracle Database, which are the simplest structures in which data is stored. There are 8 types. We can learn detailed information about tables and columns from the views below. DBA_TAB_COL_STATISTICS DBA_TAB_COLS DBA_TAB_COLUMNS DBA_TAB_COMMENTS DBA_TAB_HISTGRM_PENDING_STATS DBA_TAB_HISTOGRAMS DBA_TAB_MODIFICATIONS DBA_TAB_PARTITIONS DBA_TAB_PENDING_STATS DBA_TAB_PRIVS DBA_TAB_STAT_PREFS DBA_TAB_STATISTICS DBA_TAB_STATS_HISTORY DBA_TAB_SUBPARTITIONS DBA_TABLES Tables and
I explained in my previous articles that PostgreSQL can be written in more than one language, In this article, I will explain the Python example. Python is one of the programming languages that has been in our lives for a long time and has many useful libraries. In order to write Python code on PostgreSQL,
In today's article, we will be learning how to make a Oracle AutoExtend Datafile on. 1. First, we must find a datafile that is not auto extent. SQL> select FILE_NAME, AUTOEXTENSIBLE from dba_data_files; FILE_NAME AUT ----------------------------------------------------------------------------------- +DATA/tapgg/datafile/users.259.856031463 YES +DATA/tapgg/datafile/undotbs1.258.856031463 YES +DATA/tapgg/datafile/sysaux.257.856031463 NO 2. Then we make the datafile "AUTOEXTEND ON" as follows. SQL> ALTER DATABASE DATAFILE '+DATA/tapdb/datafile/users.276.869129771' AUTOEXTEND ON NEXT 1G MAXSIZE UNLIMITED;
I mentioned in my previous articles that Postgresql can be written in more than one language, in this article we will be talking about the Postgresql plperl language. To use the plperl language, you need to make the necessary installations for perl on whichever operating system you are using. CREATE FUNCTION search_name(employee,text,integer) RETURNS text AS
In today's article, we will be discussing the question of how to add a data file to the tablespace in Oracle? 1. We learn columns and data types from dba_data_files. We can find out whether dba_data_files is a view or a table as follows. In TOAD, we type dba_data_files on the editor screen and move
In this section, we will understand the operation of PostgreSQL functions and learn how to use the function. Like operations in programming languages, user-defined operations in PostgreSQL are plpgsql commands that accept parameters, perform an operation such as a complex calculation, and return the result of this operation as a value. The return value can
In this article presents a brief explanation of how assorted Oracle data files can be renaming and moving to a new location. Data files may need to be moved or renamed for the following reasons: -To give names that comply with naming standards, -To free up space on a full disk, -To move a data
In this article, you will learn about the PostgreSQL assert statement and how to use it for debugging purposes. Although the assert command is similar to the RAISE command, its uses are different. In the assert command, unlike raise, we need to put a condition and write the message we want to print by placing
In today's article, we will be learning how to take an online tablespace offline so that it is temporarily unavailable for general use. If a tablespace is made "Offline", the data files belonging to that tablespace will also be offline. When a tablespace is made "Offline", the "CHECKPOINT" operation occurs. When a tablespace is made
In today's article, we will discusses the RAISE command for reporting errors, warnings, and other report messages within stored procedures and functions in PostgreSQL. General usage of the RAISE structure is as follows. RAISE level , format The RAISE structure is generally used with the following parameters: LOG NOTICE DEBUG INFO EXCEPTION WARNING Let's try
In today's article, we will discuss Making Tablespace Read-Only. In this, we will be learning how to prevent writes to data files in the tablespace. Writing operations do not occur on a tablespace set to read-only. By default it is created in READ WRITE mode. SQL> ALTER TABLESPACE HR_BIGTS READ ONLY; Tablespace altered. The tablespace
In this article, I will give you information about parameterized procedures with the help of an example. create procedure parameterized (d1 text,d2 text ) language SQL as $$ insert into veliler(adi,soyadi ) values (d1,d2 ); $$; Using the d1 and d2 parameters above, we created a procedure that adds data to the adi and soyadi
In today's article, we will be discussing How to Growth Tablespace in Oracle after learning the sizes of Disk Groups. While growing the tablespace, we need to review our disk space where our data files are stored. Learning the sizes of Disk Groups. 1. If we use ASM, we learn as follows. SQL> select name,
In today's article, we will explain what PostgreSQL Stored Procedure is and how to create it with the help of an example. Stored Procedures provide ease of operation to run long queries in a single command. Procedures are not used much in PostgreSQL. Functions are generally used instead of procedures. CALL command is used to
In today's article, we will explain how to use the Drop Tablespace statement to remove a tablespace from the Database. It is best to make a tablespace offline before dropping it. SQL> ALTER TABLESPACE HR_RENAME_DATA OFFLINE; Tablespace altered. After ensuring that the tablespace is not used, it can be dropped as follows. SQL> DROP TABLESPACE
In this article, we will talk about how to perform the delete operation with the help of variables in PostgreSQL. First, let's see the data in our veliler table. We see that Utku ERDEM has two records in the veliler table. Let's delete this one with the help of a variable. Our record number 8
In today's article, we will be discussing Tablespace, which is a logical container that allows us to manage datafile groups. A tablespace can have one or more data files. A data file can belong to only one tablespace. Data files are files with *.dbf extension on the disk where our data is stored. SYSTEM, SYSAUX,
In this article, we will discuss how to perform the update process with the help of variables in PostgreSQL. I want to update the name in the parents table as 'selcan' and the e-mail address as 'selcengül@gmail.com'. DO $$ DECLARE isim VARCHAR(30) := 'selcan'; mail VARCHAR(150) := 'selcengül@gmail.com'; BEGIN UPDATE veliler SET email = mail
In today's article, we will be cover about how to Make Flashback Database Monitor in Oracle. We get the necessary information about flashback from 3 views. [Primary-1] SQL> select table_name from dictionary where lower(table_name) like '%flashback%'; TABLE_NAME ------------------------------ DBA_FLASHBACK_ARCHIVE DBA_FLASHBACK_ARCHIVE_TABLES DBA_FLASHBACK_ARCHIVE_TS DBA_FLASHBACK_TXN_REPORT DBA_FLASHBACK_TXN_STATE USER_FLASHBACK_ARCHIVE USER_FLASHBACK_ARCHIVE_TABLES USER_FLASHBACK_TXN_REPORT USER_FLASHBACK_TXN_STATE GV$FLASHBACK_DATABASE_LOG GV$FLASHBACK_DATABASE_LOGFILE TABLE_NAME ------------------------------ GV$FLASHBACK_DATABASE_STAT V$FLASHBACK_DATABASE_LOG V$FLASHBACK_DATABASE_LOGFILE V$FLASHBACK_DATABASE_STAT
In this article, we will talk about how to perform the insert operation in PostgreSQL with the help of variables. DO $$ DECLARE isim VARCHAR(30) := 'selcan'; soyisim VARCHAR(30) := 'gül'; telefon BIGINT := '03322225110'; BEGIN insert into veliler(adi,soyadi, evtelefon) values (isim,soyisim, telefon); END $$; In the example above, we define our variables after the
In today's article, we will learn how to create a Flashback Database with the help of commands. 1. We check the existing data of the table on which Logical Corruption will be performed. [Primary-1] SQL> select * from hr.locations; LOCATION_ID STREET_ADDRESS POSTAL_CODE CITY STATE_PROVINCE CO ----------- ---------------------------------------- ------------ ------------------------------ ------------------------- -- 1200 2017 Shinjuku-ku 1689
This PostgreSQL tutorial explains How To Declare A Variable In PostgreSQL with syntax and examples. By declaring PostgreSQL Variables, sometimes we may need to use the values we receive from outside in operations such as insert, update and delete. We can use variables when writing a Stored Procedure or Function. First, let's talk about the
In today's article, we will be talking about what the Flashback Enabling Procedure is. 1. MWRPR replicas must stop. Otherwise, REPLICAT PROCESS will receive an error when the database is closed. [root@mwrpr1 ~]# su - goldengate $ /goldengate/ggs/ggsci > stop * 2. In order to use the FLASHBACK feature in the database, the
In today's article, I will be explaining to you how to Create an Index on PostgreSQL Materalized View. Another nice feature of the Materialized view is that we can assign an index to the created Materialized view. I want to add an index to the first_name column to speed up the query below. We see
In today's article, we will be learning how to Enable Flashback Database in Oracle. 1. We check the FRA area. [Primary-1] SQL> show parameter db_recovery_file NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string +FRA db_recovery_file_dest_size big integer 101G 2. We check whether the database is in archive mode. [Primary-1] SQL> select log_mode from v$databasE; LOG_MODE
A “materialized view” is a database object which stores the result of a precalculated database query and makes it easy to refresh this result as needed. After creating the materalized view, when data is added, removed and updated to the tables in the materalized view, the data in the materalized view does not change. To
In today's article, we will learn how to create a flashback archive that allows you to automatically track and archive transaction data changes. 1. We query the existing datafiles and which tablespace they belong to. [Primary-1] SQL> desc dba_data_files; Name Null? Type ----------------------------------------- -------- ---------------------------- FILE_NAME VARCHAR2(513) FILE_ID NUMBER TABLESPACE_NAME VARCHAR2(30) BYTES NUMBER BLOCKS NUMBER
In today's article, you will learn about PostgreSQL Materialized Views that store the result of a query physically and refresh the data from base tables periodically. We said that the difference between Materalized View and normal view is that no data is kept in the virtual table for the view, but in the materalized view,
Flashback Data Archive historically stores changes in the database for a retention period determined at the table level. Data at the desired moment is retrieved with Flashback Query or Flashback Versions Query. It works at the table level, UNDO works much more effectively without reaching this result by setting the size of TABLESPACE too large.
In this article, we will delete the data of the table in the view by performing a delete operation on our view, which takes the name, surname and phone information we have previously defined. Let's see our data first. Let's delete the record whose name is "ayşe" from the view. We confirm the deletion of
In today's article, we will be learning how to Recover a Dropped Table Using Oracle Flashback Drop. If a table with certain constraints is dropped and then tried to recover with a flashback, all constraints except the Foreign Key come back, but the foreign key does not. If a table is dropped with PURGE, it
In this article, we will update the table in the view by performing an update on our view, which takes the name, surname and phone information we have previously defined. First, let's see our data. Let's change the surname of the person whose surname is aa in our velievtlf view to Pınar. The
In today's article, we will learn important information and process steps about Flashback Transaction in Oracle Database. There are some prerequisites to use Flashback Transaction: The database must be in archive mode, Supplemental logging must be active. Flashback transaction uses LOGMINER in the background, so anything that is not supported by LogMiner is not supported
In today's article, we will learn how to Insert with View in PostgreSQL with the help of examples. First, let's create our view. Let's insert it into our view as follows. As seen above, we inserted into our view. Let's check our view by querying it. View and insert were successfully written to the
In today's article, we will explain the use of the Flashback transaction query to get extra information about the transactions listed by the flashback version queries. 1. We query the data in the table to be changed. [Primary-2] SQL> select * from hr.regions; REGION_ID REGION_NAME ---------- ------------------------- 1 Europe 2 Americas 3 Asia 4 Middle