MSSQLServer – How to insert from select to an existing table

In this tutorial, we’ll use “INSERT INTO SELECT FROM” structure to build an SQL to insert data from a select query to an existing table in MS SQLSERVER (tested with version 2008)

General syntax of “INSERT INTO SELECT FROM”

INSERT INTO TableA SELECT Read the rest “MSSQLServer – How to insert from select to an existing table”

How to add/drop Oracle redolog files

This is how to add, drop Oracle redolog files instruction.

Add new Oracle redolog files:

ALTER DATABASE ADD LOGFILE GROUP 1 ('/filesystem01/loggroup01-1.LOG', '/filesystem02/loggroup01-2.LOG') SIZE 500M;

Drop existing Oracle redolog group:

ALTER DATABASE DROP LOGFILE GROUP 3; 

Please note that deleting the group with this command … Read the rest “How to add/drop Oracle redolog files”

How to get information about Oracle Redologs

In order for Oracle to be up and running, redologs play a very important role. In this article, I’ll show you how to check and get information about Oracle redo log files.

Count redolog groups:

SELECT COUNT(*) col1 FROM v$log

View details about redolog groups:

Read the rest “How to get information about Oracle Redologs”

ORA-00018: Maximum number of sessions exceeded explained & solutions

This is the explanation and solution for Oracle database error code ORA-00018. This base on our knowledge and experiences working with Oracle.

Code: ORA-00018

Description:

Maximum number of sessions exceeded

Causes:

  • The number of using
Read the rest “ORA-00018: Maximum number of sessions exceeded explained & solutions”

ORA-00001: Unique constraint (string.string) violated explained & solution

Code: ORA-00001

Description: Unique constraint (string.string) violated

Causes:

  • A DML command like UPDATE, INSERT attempt to insert duplicated keys
  • A trigger trying to insert/update duplicated keys

Solutions:

  • Abort update/insert the key
Read the rest “ORA-00001: Unique constraint (string.string) violated explained & solution”

How to create bootable Ubuntu USB from ISO file in Windows

To install Ubuntu/Lubuntu or many Linux distros from USB stick, in this post, I will show you how to create bootable Ubuntu USB from ISO file.

Step 1: Download the ISO file

For Ubuntu server, you can go to https://www.ubuntu.com/download/server and download desired version of … Read the rest “How to create bootable Ubuntu USB from ISO file in Windows”

How to start Oracle database ignore missing datafile(s)

Some of database datafiles are damaged or corrupted or moved to another position without modifying datafile name or datafiles are missing, … and now we need to startup the Oracle database ignoring missing datafiles.

Situation

In this case, assume that we miss

'/u01/oracle/oradata/oraerr.com/data01.dbf'

We’ll got … Read the rest “How to start Oracle database ignore missing datafile(s)”

How to start & stop Oracle databases (startup & shutdown)

In this post, I will show you all commands to start and stop Oracle databases. This is the basics but essentials while working with Oracle.

startup:

Login into database server, switch to oracle user and start sqlplus tool

su - oracle
sqlplus / as sysdba
Read the rest “How to start & stop Oracle databases (startup & shutdown)”