oracle-11g-installation configuration in Docker

Source: Internet
Author: User
Tags docker run

Docker Image: wnameless/oracle-xe-11g

command to start mirroring:

Docker run-d-v/data/oracle_data:/data/oracle_data-p 11522:22-p 11521:1521-e oracle_allow_remote=true--name oracle-1 1g wnameless/oracle-xe-11g

To enter the mirroring command:

Docker exec-it Oracle-11g/bin/bash

1. Execute the sqlplus command and log in using the following configuration:

Hostname:localhost

port:49161

Sid:xe

Username:system

Password:oracle

2. Create table spaces and users:

2.1--Creating table Spaces
CREATE tablespace Sunlight_space
DataFile '/data/oracle_data/sunlight_space.dbf ' size 500M
Autoextend on
NEXT 200M MAXSIZE 20480M
EXTENT MANAGEMENT LOCAL;

2.2--Creating a temporary table space

CREATE Temporary tablespace sunlight_tmp
Tempfile '/data/oracle_data/sunlight_tmp.dbf '
SIZE 200M
Autoextend on
NEXT 50M MAXSIZE 20480M
EXTENT MANAGEMENT LOCAL;

2.3--Create a user and specify tablespace (optional, reference)
CREATE USER sunlightopt identified by 123456 DEFAULT tablespace Sunlight;

2.4----Create a user and specify tablespaces and temporary table spaces
CREATE USER sunlightopt identified by 123456
DEFAULT tablespace Sunlight
Temporary tablespace sunlight_tmp;

2.5--Authorized users
GRANT Create User,drop user,alter USER, create any VIEW,
DROP any view,exp_full_database,imp_full_database,
Dba,connect,resource,create SESSION to sunlight;

Other, please refer to:
18898717


3. First look at the server-side Oracle monitoring configuration:

Enter the container and execute the command:

Lsnrctl status

Results:

Lsnrctl for linux:version 11.2.0.2.0-production on 19-aug-2018 04:18:43

Copyright (c) 1991, Oracle. All rights reserved.

Connecting to (Description= (address= (PROTOCOL=IPC) (KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version Tnslsnr for Linux:version 11.2.0.2.0-production
Start Date 18-aug-2018 06:05:39
Uptime 0 HR. 5 sec
Trace level off
Security on:local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File/u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File/u01/app/oracle/diag/tnslsnr/11a8a9a5a280/listener/alert/log.xml
Listening Endpoints Summary ...
(Description= (address= (PROTOCOL=IPC) (KEY=EXTPROC_FOR_XE)))
(Description= (address= (protocol=tcp) (host=11a8a9a5a280) (port=1521)))
(Description= (address= (protocol=tcp) (host=11a8a9a5a280) (port=8080)) (presentation=http) (Session=RAW))
Services Summary ...
Service "Plsextproc" has 1 instance (s).
Instance "Plsextproc", status UNKNOWN, have 1 handler (s) for the This service ...
Service "XE" has 1 instance (s).
Instance "XE", status ready, have 1 handler (s) for the This service ...
Service "Xexdb" has 1 instance (s).
Instance "XE", status ready, have 1 handler (s) for the This service ...
The command completed successfully

4. Enter Directory:/u01/app/oracle/product/11.2.0/xe/network/admin

To view the contents of a file:

Cat Tnsnames.ora


XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 11a8a9a5a280) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = XE)
)
)

Extproc_connection_data =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = IPC) (KEY = Extproc_for_xe))
)
(Connect_data =
(SID = Plsextproc)
(PRESENTATION = RO)
)
)

Xe is the name of the connection;

5. Client settings:

5.1 Download link Oracle client, address:

Http://www.oracle.com/technetwork/cn/database/features/instant-client/index-092699-zhs.html

General selection of Instant Client for Microsoft Windows (x64)

Unzip to C:\instantclient_12_2

In the above directory, create a recursive directory:

C:\instantclient_12_2\NETWORK\ADMIN

In the above directory, create the file: Tnsnames.ora

The contents are as follows:

XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = *.*.*.*) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = XE)
)
)

Create an environment variable in My Computer-Advanced system settings:

Variable name: Nls_lang

Variable value: American_america. Al32utf8

Variable name: tns_admin

Variable Value: C:\instantclient_12_2\NETWORK\ADMIN

5.2 Installing PL/SQL Developer 11

After startup:

oracle-11g-installation configuration in Docker

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.