1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

aws ec2からoracleへの接続

Posted at

概要

aws側からsqlplus, phpなどでoracleに接続できるようになるまで

前提

AWS=> Oracle Cloudへport=1521が通るように設定済

手順

AWSコンソールから
Oracle client入ったEC2を起動

ec2-userでこのEC2にログイン

cd $ORACLE_HOME
cd network/admin
sudo vi tnsnames.ora

oracleコンソールから取得した接続文字列を

tnsnames.oraに追記
cloud =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)
(HOST=129.154.80.216)
(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=PDB1.xxxxxxxxx))
)

接続確認
sqlplus rent/rent@cloud

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?