Oracle单机环境实现开机自动启动数据库
Windows环境和Unix环境都能够实现Oracle数据库的自动启动。
Windows环境和Unix环境都能够实现Oracle数据库的自动启动。
Windows环境下:
实验方法相对简单,通过修改注册表或用oradim命令来实现:
oradim -edit
Unix环境下:
通过数据库自带的dbstart命令来实验.
命令: dbstart + {ORACLE_HOME的全路径}
原理:
1. 操作系统启动过程中,读取/etc/oratab文件,判断是否有哪些数据库是需要自动启动的(N代表不自动启动,Y代表自动启动)
ora10g:/u01/app/oracle/product/10.2.0:Y catdb:/u01/app/oracle/product/10.2.0:N
2. 调用dbstart命令启动监听器和数据库
查看脚本全路径为$ORACLE_HOME/bin/dbstart,会注意到:
监听器的启动受环境变量ORACLE_HOME_LISTNER影响
以LINUX环境操作过程为例:
1. 如下编辑/etc/oratab文件
[oracle@ora10g bdump]$ cat /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.
#
#
ora10g:/u01/app/oracle/product/10.2.0:Y catdb:/u01/app/oracle/product/10.2.0:N
注: 数据库实例为ora10g,它的安装目录位置/u01/app/oracle/product/10.2.0,开户自动启动
2. 添加dbstart命令至rc.local.如下:
[oracle@ora10g bdump]$ cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
su - oracle -c "dbstart /u01/app/oracle/product/10.2.0"
至此,自动启动的环境准备完成了.可以通过dbstart +{数据库安装目录全路径}来做测试或重启验证了...
本文永久更新链接地址:
,
热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

本文讨论了使用MySQL的Alter Table语句修改表,包括添加/删除列,重命名表/列以及更改列数据类型。

文章讨论了为MySQL配置SSL/TLS加密,包括证书生成和验证。主要问题是使用自签名证书的安全含义。[角色计数:159]

文章讨论了流行的MySQL GUI工具,例如MySQL Workbench和PhpMyAdmin,比较了它们对初学者和高级用户的功能和适合性。[159个字符]

本文讨论了使用Drop Table语句在MySQL中放下表,并强调了预防措施和风险。它强调,没有备份,该动作是不可逆转的,详细介绍了恢复方法和潜在的生产环境危害。

本文讨论了在PostgreSQL,MySQL和MongoDB等各个数据库中的JSON列上创建索引,以增强查询性能。它解释了索引特定的JSON路径的语法和好处,并列出了支持的数据库系统。

文章讨论了使用准备好的语句,输入验证和强密码策略确保针对SQL注入和蛮力攻击的MySQL。(159个字符)
