十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
手工建库步骤
创新互联网络公司拥有十多年的成都网站开发建设经验,上千客户的共同信赖。提供成都网站建设、成都做网站、网站开发、网站定制、买友情链接、建网站、网站搭建、响应式网站、网页设计师打造企业风格,提供周到的售前咨询和贴心的售后服务
Step 1: Specify an Instance Identifier (SID)(指定一个实例的标识符SID)Step 2: Ensure That the Required Environment Variables Are Set(确认环境变量的设置)Step 3: Choose a Database Administrator Authentication Method(决定数据库管理员的认证方法)Step 4: Create the Initialization Parameter File(创建初始化的参数文件信息)Step 5: (Windows Only) Create an InstanceStep 6: Connect to the Instance(连接实例)Step 7: Create a Server Parameter File(创建spfile)Step 8: Start the Instance(启动实例)
Step 9: Issue the CREATE DATABASE Statement(创建DATABASE的语句)Step 10: Create Additional Tablespaces(创建额外的表空间)Step 11: Run Scripts to Build Data Dictionary Views(运行脚本创建数据库字典视图)Step 12: (Optional) Run Scripts to Install Additional OptionsStep 13: Back Up the Database.
Step 14: (Optional) Enable Automatic Instance StartupStep 1: Specify an Instance Identifier (SID)(指定一个实例的标识符SID)export ORACLE_SID=lenovo
echo $ORACLE_SID
mkdir -p /u01/app/oracle/admin/lenovo/adumporapwd file="/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwLENOVO" password=oracle entries=30Step 2: Ensure That the Required Environment Variables Are Set(确认环境变量的设置)[oracle@redhat3 lenovo]$ mkdir datafile
[oracle@redhat3 lenovo]$ mkdir redolog
[oracle@redhat3 lenovo]$ pwd
/u01/app/oracle/oradata/lenovo
[oracle@redhat3 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programsPATH=$PATH:$HOME/bin
export PATH
#Oracle Settings
export TMP=/tmp
export TMPDIR=/tmp
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export ORACLE_SID=lenovo
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib/export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibexport NLS_LANG=AMERICAN_AMERICA.ZHS16GBKexport LANG=C
umask 022
alias date='date +%Y-%m-%d%t%A%t%T '
Step 3: Choose a Database Administrator Authentication Method(决定数据库管理员的认证方法)[oracle@redhat3 bin]$ pwd
/u01/app/oracle/product/11.2.0/db_1/bin
[oracle@redhat3 bin]$ orapwd file=orapwdlenovo password=oracle entries=30Step 4: Create the Initialization Parameter File(创建初始化的参数文件信息)[oracle@redhat3 dbs]$ cat initlenovo.ora
db_name='LENOVO'
memory_target=808M
control_files = ('/u01/app/oracle/oradata/lenovo/controlfile/control01.ctl')Step 6: Connect to the Instance(连接实例)[oracle@redhat3 dbs]$ echo $ORACLE_SID
lenovo
[oracle@redhat3 dbs]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 1 19:28:17 2016Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL
Step 7: Create a Server Parameter File(创建spfile)SQL create spfile from pfile='/u01/app/oracle/product/11.2.0/db_1/dbs/initlenovo.ora';Step 8: Start the Instance(启动实例)
SQL startup nomount
ORACLE instance started.
Total System Global Area 843456512 bytes
Fixed Size 2257920 bytes
Variable Size 494930944 bytes
Database Buffers 343932928 bytes
Redo Buffers 2334720 bytes
Step 9: Issue the CREATE DATABASE Statement(创建DATABASE的语句)create_db.sql
CREATE DATABASE lenovo
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 ('/u01/app/oracle/oradata/lenovo/redolog/redo01a.log') SIZE 100M BLOCKSIZE 512,GROUP 2 ('/u01/app/oracle/oradata/lenovo/redolog/redo02a.log') SIZE 100M BLOCKSIZE 512,GROUP 3 ('/u01/app/oracle/oradata/lenovo/redolog/redo03a.log') SIZE 100M BLOCKSIZE 512MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/u01/app/oracle/oradata/lenovo/datafile/system01.dbf' SIZE 325M REUSESYSAUX DATAFILE '/u01/app/oracle/oradata/lenovo/datafile/sysaux01.dbf' SIZE 325M REUSEDEFAULT TABLESPACE users
DATAFILE '/u01/app/oracle/oradata/lenovo/datafile/users01.dbf'
SIZE 50M REUSE AUTOEXTEND ON MAXSIZE UNLIMITEDDEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/app/oracle/oradata/lenovo/datafile/temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE undotbs1
DATAFILE '/u01/app/oracle/oradata/lenovo/datafile/undotbs01.dbf'
SIZE 100M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;SQL @/home/oracle/create_db.sql
Database created.
Step 10: Create Additional Tablespaces(创建额外的表空间)SQLCREATE TABLESPACE zstest DATAFILE '/u01/app/oracle/oradata/lenovo/datafile/test01.dbf' SIZE 50M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;SQL select open_mode from v$database;
OPEN_MODE
----------------------------------------
READ WRITE
Step 11: Run Scripts to Build Data Dictionary Views(运行脚本创建数据库字典视图)SYSDBA用户执行如下脚本
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/rdbms/admin/utlrp.sql
SYSTEM用户执行如下脚本
@?/sqlplus/admin/pupbld.sql
1、首先参数INSTANCE_TYPE对于ASM实例具有ASM的值,对于oracle实例默认值为RDBMS。
2、参数DB_UNIQUE_NAME默认值是ASM,是ASM实例唯一名称。
3、参数ASM_DISKGROUPS参数,指定一个包含磁盘组名称的列表。
4、参数ASM_DISKSTRING指定一个或多个字符串,对于创建磁盘组的磁盘设备。
5、最后参数ASM_PREFERRED_READ_FAILURE_GROUPS是一个故障组列表,如下图。
小鸟云服务器niaoyun实例创建好之后,您可以使用以下任意一种方式登录服务器:
远程桌面连接(MicrosoftTerminalServicesClient,MSTSC):采用这种方式登录,请确保实例能访问公网。如果在创建实例时没有购买带宽,则不能使用远程桌面连接。
管理终端VNC:无论您在创建实例时是否购买了带宽,只要您本地有网页浏览器,都可以通过管理控制台的管理终端登录实例。
使用远程桌面连接(MSTSC)登录实例
打开开始菜单远程桌面连接,或在开始菜单搜索中输入mstsc。也可以使用快捷键Win+R来启动运行窗口,输入mstsc后回车启动远程桌面连接。
在远程桌面连接对话框中,输入实例的公网IP地址。单击显示选项。
输入用户名,如小鸟云默认为niaoyun。单击允许我保存凭据,然后单击连接。这样以后登录就不需要手动输入密码了。