Windows2012 安装oracle11g单实例
安装环境操作系统:windows 2012 r2企业版,内存2G
数据库:Oracle 11.2.0.4 for win64
安装步骤上传安装介质解压到同一目录下然后将2of7文件夹下stage的文件夹复制到1of7文件夹里。
双击setup.exe安装正在启动安装OUI
配置监听推荐使用netca和netmgr工具进行配置
点击”开始”,找到Net Configuration Assistant。如图
配置结束。
查看监听服务是否已启动
通过cmd查看lsnrctl status
通过服务查看Win + r 然后输入 services.msc
创建数据库实例cmd模式下运行dbca
电脑测试数据库状态正常。安装成功,下面就是一些参数的调整。
电脑其他参数的调整修改为归档模式现在是非归档
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 4
Current log sequence 6
启动到mount阶段
Shutdown immediate;
Startup mount;
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
--已经归档模式了
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 4
Next log sequence to archive 6
Current log sequence 6
修改DB_FILES,PROCESS参数SQL> alter system set db_files=1000 scope=spfile; System altered. SQL> alter system set processes=10000 scope=spfile; System altered. |
重启生效。
设置CONTROL_FILE_RECORD_KEEP_TIME 参数SQL> alter system set control_file_record_keep_time=30 scope=spfile; System altered. |
需要重启实例
SQL> alter system set open_links=100 scope=spfile; SQL> alter system set open_links_per_instance=100 scope=spfile; |
SQL> alter profile DEFAULT limit FAILED_LOGIN_ATTEMPTS UNLIMITED; SQL> alter profile default limit password_life_time unlimited; |
SQL> show parameter filesystem_
NAME TYPE VALUE
-------------------- ------ -----
filesystemio_options string none
SQL> alter system set filesystemio_options="directIO" sid='*' scope=spfile;
System altered.
禁用dictory path read二选一操作即可:
SQL>alter system set "_serial_direct_read"=never;
SQL> ALTER system SET EVENTS '10949 TRACE NAME CONTEXT off';
调整UNDO 和 Temp 表空间SQL> show parameter undo_
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
undo_retention 只是指定undo 数据的过期时间,默认是900s,15分钟。建议改成3600s,即1小时。
SQL> alter system set undo_retention=3600 scope=both sid='*';
System altered.
注意UNDO 表空间一定要设成成自动扩展并设置最大值。
ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/orcl/undo01.dbf' RESIZE 30720M;
ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/orcl/undo01.dbf' AUTOEXTEND ON NEXT 1M MAXSIZE 30720M;
ALTER DATABASE tmpefile '/u01/app/oracle/oradata/orcl/temp01.dbf' RESIZE 30720M;
ALTER DATABASE tmpefile '/u01/app/oracle/oradata/orcl/temp01.dbf' AUTOEXTEND ON NEXT 1M MAXSIZE 30720M;
电脑