当前位置:首页文章首页 IT学院 IT技术

初学安装oracle全部过程图文教程

作者:  来源:  发布时间:2012-2-16 10:59:09  点击:
SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = /u01/oracle/product/10.2.0/db_1)

(PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1521))

)

)

B:sqlnet.ora

# sqlnet.ora Network Configuration File: /u01/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora

# Generated by Oracle configuration tools.

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

C:tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

SHZQ =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = oracle)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = shzq)

)

)

EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

)

(CONNECT_DATA =

(SID = PLSExtProc)

(PRESENTATION = RO)

)

)

-----------------------------------------------------------------------------------------

5.如果安装Oracle发现swap分区过小的情况,则可以手动去扩展swap分区的大小

//使用root用户

#dd if=/dev/zero of=/home/swap bs=1024 count=1024000

//创建/home/swap分区文件。大小为1024000个block,一般情况下1个block为1K,所以这里空间是1024M(1G);

//指定分区类型为swap

//使用mkswap命令把分区变成swap分区如下

#/sbin/mkswap /home/swap

//让配置的swap生效

#/sbin/swapon /home/swap

//free -m 查看swap和内存大小

#free -m

//修改/etc/fstab文件让其自动挂载

#/home/swap swap swap defaults 0 0

6.让另一台客户端或者应用服务器连接本服务器的oracle数据库

//前提:客户端或者应用服务器必须至少安装oracle客户或者oracle数据库

错误提示:

>sqlplus /nolog

SQL> conn '/as sysdba'

请输入口令: ******

ERROR:

ORA-12560: TNS: 协议适配器错误

 

SQL> connect system/manager

ERROR:

ORA-12560: TNS: 协议适配器错误

//说明:从客户端或者应用服务器(linux或WIN)

#tnsnping 192.168.1.11

#tnsping oracle10g //需要做好解析

//以Windows为例:

C:\Documents and Settings\Administrator>tnsping 192.168.1.11

TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 15-2月 -

2012 14:16:18

Copyright (c) 1997, 2005, Oracle. All rights reserved.

已使用的参数文件:

D:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora

已使用 EZCONNECT 适配器来解析别名

Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=192.168.1.11))(AD

DRESS=(PROTOCOL=TCP)(HOST=192.168.1.11)(PORT=1521)))

OK (20 毫秒)

-----------------------------------------------------------------------------------------

7.客户端连接oracle配置文件实例:(见附件)

A:listener.ora

# listener.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = D:\oracle\product\10.2.0\db_1)

(PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1521))

)

)

B:sqlnet.ora

# sqlnet.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora

# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to

# install "Software Only", this file wont exist and without the native

# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

C:tnsnames.ora

# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

SHZQ =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.11)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = shzq)

)

)

EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

)

(CONNECT_DATA =

(SID = PLSExtProc)

(PRESENTATION = RO)

)

)

-----------------------------------------------------------------------------------------

8.oracle安装完成,系统自带的用户和密码

//internal/oracle

// sys/change_on_install

//system/manager

//scott/tiger

//sysman/oem_temp

三、使用PLSQL Developer 管理linux Oracle服务器

1.登陆

2.使用

首页 上一页 [1] [2] [3]  下一页 尾页

文章评论

软件按字母排列: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z