注意:2008 Server R2 10g升级11g最后解决方法,删除10g的数据库,然后卸载10g,然后重新安装10g选择安装并创建数据库。完成后安装11g选择只安装软件。11g安装成功后手工创建数据库及后续操作,然后删除10g数据库(此时服务名是默认的因为重装了),最后卸载10g数据库,原因是11g的jre一直报错导致安装向导点击下一步不一定闪退
安装前请先关闭系统防火墙
配置监听服务
执行以下脚本导入数据库(红色字体需要根据实际情况修改)
sqlplus / as sysdba;
drop tablespace DEMO_DATA including contents and datafiles;
drop tablespace DEMO_index including contents and datafiles;
CREATE TABLESPACE DEMO_DATA
LOGGING
DATAFILE 'D:\oradata\mes\DEMO_DATA.dbf' SIZE 100M
REUSE AUTOEXTEND
ON NEXT 1280K MAXSIZE UNLIMITED;
CREATE TABLESPACE DEMO_INDEX
LOGGING
DATAFILE 'D:\oradata\mes\DEMO_index.dbf' SIZE 100M
REUSE AUTOEXTEND
ON NEXT 1280K MAXSIZE UNLIMITED;
drop user DEMO cascade;
create user DEMO
identified by DEMO
default tablespace DEMO_DATA
temporary tablespace TEMP
profile DEFAULT;
grant
connect,
ALTER SESSION,
CREATE ANY JOB,
CREATE ANY TABLE,
CREATE ANY VIEW,
CREATE CLUSTER,
CREATE DATABASE LINK,
CREATE INDEXTYPE,
CREATE JOB,
CREATE OPERATOR,
CREATE PROCEDURE,
CREATE SEQUENCE,
CREATE SESSION,
CREATE SYNONYM,
CREATE TABLE,
CREATE TRIGGER,
CREATE TYPE,
CREATE VIEW,
DEBUG ANY PROCEDURE,
DEBUG CONNECT SESSION,
EXECUTE ANY PROCEDURE,
INSERT ANY TABLE,
MANAGE SCHEDULER,
SELECT ANY DICTIONARY,
SELECT ANY TABLE,
UNDER ANY TABLE,
UNLIMITED TABLESPACE,
UPDATE ANY TABLE,
DBA
to DEMO;
grant execute on dbms_lock to demo;
//登录密码不区分大小写
//设置系统Job数量为100,默认为0即不运行Job
//修改密码永不过期
alter system set sec_case_sensitive_logon=false;
ALTER SYSTEM SET job_queue_processes = 100;
ALTER profile DEFAULT limit PASSWORD_LIFE_TIME UNLIMITED;
//以下三个修改系统的process和session个数,默认一般够不用改
//如果系统同时在线客户端太多达到上限导致新客户端无法登录需要修改
alter system set processes=1000 scope=spfile;
alter system set sessions=1105 scope=spfile;
create pfile from spfile;
exp DEMO/DEMO@demo file=c:\DEMO.dmp rows=y
imp DEMO/DEMO@demo file=c:\DEMO.dmp fromuser=DEMO touser=DEMO
以下是listener.ora Demo的内容,红色部分需要根据实际情况修改
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DEMO)
(ORACLE_HOME = c:\app\Administrator\product\11.2.0\dbhome_1)
(SID_NAME = demo)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.88.119)(PORT = 1521))
)
ADR_BASE_LISTENER = c:\app\Administrator
以下是tnsnames.ora的内容,红色字体请根据实际情况修改
DEMO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.88.119)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = demo)
)
)
以下是sqlnet.ora内容
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
SQLNET.EXPIRE_TIME=10
DIAG_ADR_ENABLED = OFF
DIAG_ADR_ENABLED_LISTENER=OFF
上一篇:风光摄影:相机设置和镜头选择
下一篇:Redis的持久化详解