AIX下自动启动/停止Oracle数据库1:修改/etc/oratab,将ldquo;Nrdquo;改为ldquo;Yrdquo;,使之支持开机启动。$ vi /etc/orat
AIX下自动启动/停止Oracle数据库
1:修改/etc/oratab,将“N”改为“Y”,使之支持开机启动。
$ vi /etc/oratab
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/home/oracle/product/10.2.0:Y
2.创建脚本并赋予相关权限
2.1创建启动脚本
1)、在/home/oracle目录下,创建start_db.sh //此路径非特定
$ su - oracle
$ vi start_db.sh
#!/bin/sh
ORACLE_HOME=/home/oracle/product/10.2.0
ORACLE_BASE=/home/oracle
ORACLE_SID=orcl
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/oracle/bin:/usr/bin/X11:/sbin:/home/oracle/product/10.2.0/bin:.
export ORACLE_HOME ;
export ORACLE_BASE ;
export ORACLE_SID ;
export PATH ;
echo "######################################################"
echo "# Starting the Listener #"
echo "######################################################"
lsnrctl start
echo ""
echo ""
echo ""
echo "#####################################################"
echo "# Starting the instance :$ORACLE_SID #"
echo "#####################################################"
sqlplus /nolog connect / as sysdba
startup
exit
EOF
2)、在/etc下建立文件rc.startdb
# vi /etc/rc.startdb //以root用户进行创建,避免报错
su - oracle "-c /home/oracle/dbstart.sh" #startOracleDB
3)、给文件执行权限
# chmod 777 rc.startdb
4)、添加自启动任务至/etc/inittab
$vi /etc/inittab
startdb:2:wait:/etc/rc.startdb>/home/oracle/oracle.log 2>&1
注:也可以用命令 mkitab 添加
关于inittab文件相见我博客内的介绍
2.2创建关闭脚本
# vi /etc/rc.shutdown
echo "Stop Oracle instance: orcl"
su - oracle -c dbshut
注:以上两个脚本均经过实际操作!
关于为什么脚本叫/etc/rc.shutdown,以及怎么工作.如下注解
引用
系统管理员可以在 /etc/rc.shutdown shell 脚本中放置本地定制的关闭过程。如果该脚本存在,则在关闭开始时就运行。如果脚本运行但是失败(返回非零返回码),则关机停止。

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment