Tag: database
Rename a Postgresql database
#database #postgresqlHere’s the procedure to rename a PostgreSQL database: Disconnect from the database that you want to rename and connect to a different database. Check and terminate all active connections to t... Read more
20 May 2019 - 1 minute readHow to duplicate a Postgresql database
#database #postgresqlIf you need to duplicate an existing Postgresql database, and possibly transfer ownership of the database objects to a new user, here’s how to do that in a quick way: -- First, I recommand getting... Read more
20 Apr 2019 - less than 1 minute readForcing ASMM component to shrink
#oracle #databaseHere’s the way to force the shared pool to shrink dynamically. Documentation states that ASMM can only increase shared pool, and can’t shrink. When the automatic shared memory management feature i... Read more
20 Mar 2019 - 2 minute readHow to extract Oracle user DDL
#database #oracleIn some cases, you need to duplicate an Oracle user, along with all it’s privileges. Doing this manually can be tedious. Hopefully, we can use the data dictionary to extract the data we need and du... Read more
20 Feb 2018 - 1 minute readChange default schema on Postgresql
#database #postgresqlIn PostgreSQL, users can have many namespaces to resolve objects names. These are called schemas like in Oracle, and can be altered through the search_path variable. Here’s how to check current sea... Read more
20 Jan 2018 - less than 1 minute readRename all tables in a Postgresql schema
#database #postgresqlAfter a conversion usually done through AWS Database Migration Service, you may have a Postgresql database converted with table names in uppercase. These tables needs renaming, because you can’t ac... Read more
20 Dec 2017 - less than 1 minute readPostgreSQL Survival Guide
#postgresql #databasePostgreSQL has been gaining a lot of popularity these days, so let’s have a look at the basics of administering a PostgreSQL database. We’ll cover the structure exploration, object manipulation and... Read more
20 Jan 2016 - 3 minute readCheck database uptime
#database #oracle #mysqlSometimes you have to check when a database was started for the last time. To get the information, just log on to the database and use the following query to get the last startup time: On Oracle d... Read more
20 Mar 2015 - less than 1 minute readChange the default temporary tablespace
#database #oracle #sqlWhen your temporary tablespace gets full and you can’t resize it, you may consider switching ti a new ont to reclaim disk space. Changing the default temporary tablespace will allows you to discard... Read more
20 Feb 2015 - 1 minute readOracle sqlplus silence output
#oracle #sqlplus #databaseUse the following code on your scheduled Oracle scripts to silence terminal output except your data. SET autocommit off; SET echo off; SET feedback off; SET head off; SET heading ... Read more
20 Jul 2014 - less than 1 minute readMySQL transaction isolation
#database #mysql #transactionYou can get session-level and global transaction isolation levels using these commands : SELECT @@global.tx_isolation; SELECT @@tx_isolation; SET [SESSION | GLOBAL] TRANSACTION ISOLATION LEVEL ... Read more
20 Jun 2014 - less than 1 minute readHow to prepare a DML list script
#database #oracle #scriptSometimes, you need to execute a lot of DML instructions on a database. This might look trivial but there are some very important elements to consider before running this kind of script on a produ... Read more
20 May 2014 - 1 minute readResolving the “ERROR 126 Incorrect key file” error
#database #mysqlThe Incorrect key file error: ERROR 126 (HY000) at line 3: Incorrect key file for table '/var/tmp/#sql3f5_1b6c4e_1.MYI'; try to repair it This error probably means that you ran out of disk space... Read more
20 Mar 2014 - 1 minute readData export/import on MySQL
#database #mysql #import #exportMySQL provides you with a lot of flexibility when it comes to import or export data between databases. Let’s examine a few possibilities to export/import data: To export a whole database The foll... Read more
20 Feb 2014 - less than 1 minute readCheck all tables on MySQL
#database #mysqlData corruption is every DBA’s worst nightmare and can happen anytime. Use this command to check and repair all tables on a MySQL database : mysqlcheck -u root -p --auto-repair --check --optimize ... Read more
20 Jan 2014 - less than 1 minute read