Thursday, August 29, 2024

Oracle Database 18c Express WITHOUT container database architecture.



Oracle has introduced multitenant architecture from Oracle Database 12c.

In Oracle Database 18c Express edition, the CDB database (multitenant architecture) is created by default. Oracle doesn't provide any choices to during the installing process. However, Oracle database 18c technically still support Non-CDB (the traditional architecture), and we will find down how to replace the default CDB database by Non-CDB database. Part 1: Download and install Oracle Database 18c Express on windows with default CDB database

Part 2: Replace the CDB database with Non-CDB (traditional architecture) database.



Monday, August 29, 2022

[Linux] X11Forwarding : How to use GUI over SSH from a Windows computer?

X11Forwarding on Redhat 8


When you need to execute a Graphic User Interface (GUI) application over SSH such as Oracle Installer, you will need to config X11Forwarding.

In this demo, I use Redhat 8 linux as server, and connect from my laptop running Windows 10.

To make it works, we need to enable X11Forwording at the server side, client side. We also need a program at the client to handle Xwindows. In this article, I will use Xming.





1. Server side: Enable X11forwarding

Enable X11Forwarding in sshd_config file. Change the value from "no" to "yes", then restart sshd.


# cat /etc/ssh/sshd_config | grep X11Forwarding

X11Forwarding yes

# systemctl restart sshd


2. Server side: Install required packages.


There is only one required package to install on the server. However, if you want a program such as "xclock", you can install an additional one.

- Mandatory package: 

yum install xorg-x11-xauth

- Optional package: 

yum install xorg-x11-apps

3. Client side: Install Xming 

Xming is free-opensource. You can download and install from https://sourceforge.net/projects/xming/

After installed, you need to start Xming and see the tray icon like this:

4. Client site: Enable X11Frowaring for your connection.

In this demo, I am using PuTTY. You can find the same option if you use other ssh client tools.

On the PuTTY's new connection, go to Connection\SSH\X11.

Check on "Enable X11forwarding".

In "X display location", input localhost:0.0

Notes that, we use "localhost" instead of you hostname.



So, we are now ready to ssh to server and execute X programs!







Thursday, July 21, 2022

How to install PostgreSQL 14 in Rocky Linux 8.

 


This video will show you the completed steps to install PostgreSQL 14 in Rocky Linux 8.6.

It's including changing the default PGDATA directory, automate startup/shutdown database and open firewall.

You can also install on others Rehat family linux such as Rehat enterprise 8, Oracle Linux 8 or CentOS 8.


Installation steps:


############################

##   Login as root        ##

############################ 


## 0. Create group and user: postgres

# groupadd -g 5000 postgres

# useradd  -u 5000 -g 5000 -c "PostgreSQL Database" postgres

useradd  -u 5000 -c "PostgreSQL Database" postgres


##  1. Install postgresql software

dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

dnf -qy module disable postgresql

dnf install -y postgresql14-server


##  2. Create PGDATA directory


mkdir -p /pgsql/data

chown -R postgres.postgres /pgsql


############################

## Login as Postgres      ##

############################ 


## 3. Setup postgres evironment variable


PGDATA=/pgsql/data

PATH=$PATH:/usr/pgsql-14/bin


## 4. Initialize & startup database


initdb

pg_ctl start | stop

psql


############################

##     Login as root     ##

############################ 


## 5. Auto-startup


vi /usr/lib/systemd/system/postgresql-14.service


systemctl daemon-reload


systemctl enable postgresql-14

systemctl start postgresql-14


## 6. Open firewall


#firewall-cmd --zone=public --add-port=5432/tcp

firewall-cmd --add-service=postgresql

firewall-cmd --runtime-to-permanent

## All done

Wednesday, July 20, 2022

[LINUX systemd] How to automate startup/shutdown Oracle Database on Linux




Implementing this task is required for production database, even you're willing to startup the database after the host rebooting. Because your database can crash if it is not shutdown properly due to the host is down!

In this video, we will use systemd which is available on Redhat 7, Redhat 8 and its family (Oracle Linux, CentOS, Rocky)....

This demo is using Oracle Database 21c on Rocky Linux 8.6

The below script is used in the video. You may need to change the location to your ORACLE_HOME

-------------------------

# cd /usr/lib/systemd/system # vi oracle.service [Unit] Description=Oracle Database Service After=network.target [Service] Type=simple RemainAfterExit=yes User=oracle Group=dba Environment="ORACLE_HOME=/u02/app/oracle/product/21c/dbhome_01" ExecStart=/u02/app/oracle/product/21c/dbhome_01/bin/dbstart $ORACLE_HOME >> 2>&1 & ExecStop=/u02/app/oracle/product/21c/dbhome_01/bin/dbshut $ORACLE_HOME 2>&1 & TimeoutSec=120 [Install] WantedBy=multi-user.target


----------------

Monday, March 18, 2019

[Oracle Database] How to reset EXPIRED password ?


As a DBA, I've gotten many requests for changing the password.

There are steps that you can use to change your password via Oracle SQL Developer by yourself without need to seek help from DBA.

You can also use this way to change the password which is already expired !

Step 1: Open Oracle SQL Developer

Step 2: Right click on your connection.
If you have not created your connect yet, you need to create one.













Step 3: Choose "Reset Password"
You need to provide the current password, and the new password.
=> Depend on password policy, It may require complex password/ or you can not reuse the old one.
















>>>Below video will shows you steps for the same.

How to install ORACLE DATABASE 19c on Virtual machine LINUX 7

Oracle Database 18c Express WITHOUT container database architecture.

Oracle has introduced multitenant architecture from Oracle Database 12c. In Oracle Database 18c Express edition, the CDB database (multiten...