好久没用过oracle,最近有点项目正好用到这个数据库,才发现电脑上面居然没有oracle,我从网上下载最新的11g安装完毕后,发现需要配置很多东西才能正常使用,以下把我配置的内容总结出来,正好给初次下载oracle 11g,需要配置的同学看看,免得你们到处找了:
1.下载oracle11g,安装
2.通过命令行进入系统:
sql>connect / as sysdba
3.创建数据库
CREATE TABLESPACE fcms LOGGING DATAFILE 'c:\FCMS.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 500M EXTENT MANAGEMENT LOCAL;
CREATE USER fcms IDENTIFIED BY fcms DEFAULT TABLESPACE fcms
5.给用户最高权限
grant connect,resource,dba to fcms;
grant create session to fcms;
6.退出,然后找到你的oracle安装路径下的监听器文件listener.org(不改这个,你的程序连不上去),路径一般是这样:
G:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
7.通过记事本打开listener.org,添加以下语句:
(SID_DESC = (GLOBAL_DBNAME = fcms) (ORACLE_HOME = G:\oraclexe\app\oracle\product\11.2.0\server) (SID_NAME = fcms) )
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = G:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = G:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = fcms)
(ORACLE_HOME = G:\oraclexe\app\oracle\product\11.2.0\server)
(SID_NAME = fcms)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = durendong-PC)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
OK,经过这些步骤,你的oracle基本上算是配置完成了,接下来愉快的用你的程序连接他吧