当前位置:网站首页>Install HR schema, example, and Scott schema on Oracle and MySQL
Install HR schema, example, and Scott schema on Oracle and MySQL
2022-07-26 08:35:00 【YaoYuan ace】
This article is introduced in Oracle and MySQL Installation on hr Method of sample database , And in Oracle Installation on example Method of sample database , as well as Scott How to install the sample database .
List of articles
stay oracle Installation on hr schema
19c examples installation is complete , stay $ORACLE_HOME/demo/schema/human_resources Execute under directory hr_main.sql File creation hr user :
[email protected](CDB$ROOT)> alter session set container=pdb1;
Session altered.
[email protected](CDB$ROOT)> create tablespace users datafile '/u01/app/oracle/oradata/ORCL/pdb1/user01.dbf' size 100m autoextend on;
Tablespace created.
[email protected]/pdb1.yaoyuan.com(PDB1)> @?/demo/schema/human_resources/hr_main.sql
specify password for HR as parameter 1:
Enter value for 1: hr
specify default tablespeace for HR as parameter 2:
Enter value for 2: users
specify temporary tablespace for HR as parameter 3:
Enter value for 3: temp
specify log path as parameter 4:
Enter value for 4: /tmp
Check after installation :
$ sqlplus hr/[email protected]
...
SQL> select table_name from user_tables;
TABLE_NAME
--------------------------------------------------------------------------------
COUNTRIES
REGIONS
LOCATIONS
DEPARTMENTS
JOBS
EMPLOYEES
JOB_HISTORY
7 rows selected.
SQL> select count(*) from employees;
COUNT(*)
----------
107
stay MySQL Installation on hr schema
stay MySQL It can also be installed and Oracle alike hr schema, See :https://github.com/nomemory/hr-schema-mysql. Installation method: :
wget https://github.com/nomemory/hr-schema-mysql/archive/refs/heads/master.zip
unzip master.zip
[[email protected] hr-schema-mysql-master]$ ll
total 36
-rw-r--r--. 1 oracle oinstall 31342 Feb 15 2021 hr-schema-mysql.sql
-rw-r--r--. 1 oracle oinstall 231 Feb 15 2021
[[email protected] hr-schema-mysql-master]$ mysql < hr-schema-mysql.sql
Check after installation :
mysql> use hr;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+------------------+
| Tables_in_hr |
+------------------+
| countries |
| departments |
| emp_details_view |
| employees |
| job_history |
| jobs |
| locations |
| regions |
+------------------+
8 rows in set (0.00 sec)
mysql> select count(*) from employees;
+----------+
| count(*) |
+----------+
| 107 |
+----------+
1 row in set (0.01 sec)
install examples
stay Oracle There is an installation document in the official document 《Database Examples Installation Guide》, This document has only one chapter !
Download from the official website LINUX.X64_193000_examples.zip Compressed package , And upload the server , The decompression directory structure is as follows
$ cd /home/oracle/examples/
[[email protected] examples]$ ls
install response runInstaller stage welcome.html
function runInstaller Install the image interface
Character silent installation
$ /directory_path/runInstaller [-silent] -responseFile responsefilename
[[email protected] examples]$ pwd
/media/sf_oracle/19c/examples
[[email protected] examples]$ ./runInstaller -silent -force -ignorePrereq -ignoreSysPrereqs -responseFile /media/sf_oracle/19c/examples/response/demos_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 415 MB. Actual 28381 MB Passed
Checking swap space: must be greater than 150 MB. Actual 7935 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2022-03-28_06-45-48PM. Please wait ...[[email protected] examples]$
[[email protected] examples]$ The response file for this session can be found at:
/u01/app/oracle/product/19.3.0/db_1/install/response/examples_2022-03-28_06-45-48PM.rsp
You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2022-03-28_06-45-48PM.log
Successfully Setup Software.
The installation of Oracle Database 19c Examples was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2022-03-28_06-45-48PM.log' for more details.
The database is not directly modified during installation , Instead, install the script .
install HR、OE、PM、IX、SH、BI user
from 12.2 Start ,Oracle Self contained examples It just includes HR This schema, other schema, You need to go from github Download and install ,19c Address :
https://github.com/oracle/db-sample-schemas/releases/tag/v19c
Reference resources file : https://docs.oracle.com/en/database/oracle/oracle-database/19/comsc/toc.htm
decompression
unzip db-sample-schemas-19c.zip
Check it out readme.txt and readme.md file
Move to the corresponding directory
[[email protected] ~]$ cp -r /media/sf_oracle/19c/db-sample-schemas-19c $ORACLE_HOME/demo/schema
mv db-sample-schemas-19c $ORACLE_HOME/demo/schema/
Put the _SUB__CWD__ Replace with the current path :
[[email protected] db-sample-schemas-19c] pwd
/u01/app/oracle/product/19.3.0/db_1/demo/schema/db-sample-schemas-19c
[[email protected] db-sample-schemas-19c]$ perl -p -i.bak -e 's#__SUB__CWD__#'$(pwd)'#g' *.sql */*.sql */*.dat
according to readme.md Install according to the installation method prompted in the document
sqlplus system/[email protected]_string
@mksample systempw syspw hrpw oepw pmpw ixpw shpw bipw users temp /your/path/to/log/ connect_string
[[email protected] db-sample-schemas-19c]$ sqlplus system/[email protected]/pdb1.yaoyuan.com
...
[email protected]/pdb1.yaoyuan.com(PDB1)> @?/demo/schema/db-sample-schemas-19c/mksample oracle oracle hr oe pm ix sh bi users temp $ORACLE_HOME/demo/schema/log/ oracleace:1521/pdb1.yaoyuan.com
install scott schema
modify utlsampl.sql file , hold CONNECT SCOTT/tiger Change it to
CONNECT SCOTT/[email protected]/pdb1.yaoyuan.com
[[email protected] ~]$ sqlplus system/[email protected]/pdb1.yaoyuan.com
[email protected]/pdb1.yaoyuan.com(PDB1)> @/u01/app/oracle/product/19.3.0/db_1/rdbms/admin/utlsampl.sql
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Query the installed table :
[email protected]/pdb1.yaoyuan.com(PDB1)> select table_name from user_tables;
TABLE_NAME
--------------------------------------------------------------------------------
DEPT
EMP
BONUS
SALGRADE
At the bottom of the article is my wechat , Welcome to join me ( toeic 890 Points of Oracle ACE).
边栏推荐
- Daily Note (11) -- word formula input arbitrary matrix
- [GUI] swing package (window, pop-up window, label, panel, button, list, text box)
- Flex three column layout
- Status management bloc provider geTx
- Please tell me if there is any way to increase the write out rate when the Flink SQL client is in the sink table. When synchronizing through sink table
- vscode 实用快捷键
- 基于C语言实现的人机交互软件
- 基于C语言的内存管理-动态分区分配方式模拟
- sed作业
- B title: razlika priority queue approach
猜你喜欢

基于C语言实现的人机交互软件

Seq2seq and attention model learning notes

关于期刊论文所涉及的一些概念汇编+期刊查询方法

Nodejs2day (modularization of nodejs, NPM download package, module loading mechanism)

NLP (natural language processing) natural language processing learning

22-07-16 personal training match 3 competition experience

B title: razlika priority queue approach

23.6 23.7 web environment web environment variable reading

Nodejs2day(nodejs的模块化,npm下载包,模块加载机制)

Lesson 3: gcc compiler
随机推荐
第三天作业
各位老师,请问在flinkcdc中,sqlserver如何获取到ddl?
[GUI] GUI programming; AWT package (interface properties, layout management, event monitoring)
Differences and connections of previewkeydown, Keydown, keypress and Keyup in C WinForm
C # get the information of the selected file
Shell programming
mysql函数汇总之条件判断函数
利用模m的原根存在性判断以及求解
Maximum common substring & regularity problem
23.8 using the applicationrunner or commandlinerunner to implement applicationrunner and commandlinerunner
2022年收益率最高的理财产品是哪个?
import error: ‘Icon‘ is not exported from ‘antd‘. Import icon error
Mycat2 deploy master-slave MariaDB
Vscode domestic image server acceleration
When developing flutter, idea_ ID cannot solve the problem
flink oracle cdc 读取数据一直为null,有大佬知道么
Share high voltage ultra low noise LDO test results
22-07-14 personal training match 2 competition experience
6、 Pinda general permission system__ pd-tools-log
Redis进阶