Oracle中间件WebLogic 12c维护保养手册
Oracle 12c数据库基础教程-Oracle 12c数据库管理、配置和维护

【例4.1】
dbca -silent -createDatabase -templateName General_Purpose.dbc gdbname ora12 -sid ora12 -responseFile NO_VALUE -memoryPercentage 30 -emConfiguration LOCAL
oradim -new -sid OracleDB -intpwd OraclePass
新建的OracleDB实例对应的服务
(2)创建文本初始化参数文件 (PFILE)
db_name='OracleDB' instance_name='OracleDB' memory_target=320M processes = 50 audit_file_dest='D:\app\orcl\admin\OracleDB\adump' audit_trail ='db' db_block_size=4096 db_domain='' db_recovery_file_dest='D:\app\orcl\fast_recovery_area\OracleDB' db_recovery_file_dest_size=64M diagnostic_dest='D:\app\orcl\' dispatchers='(PROTOCOL=TCP) (SERVICE=OracleDBXDB)' open_cursors=100 undo_tablespace='UNDOTBS1' control_files = ('D:\app\orcl\oradata\OracleDB\CONTROL01.CTL', 'D:\app\orcl\oradata\OracleDB\CONTROL02.CTL') compatible ='12.0.0'
ORACLE数据库日常维护手册

1ORACLE数据库日常维护手册前言 (2)2 ORACLE数据库每天应检查的项目 (2)2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5 2.6 2.7 2.7.1 2.7.2 2.7.3 2.8 2.8.1 2.8.2 2.9 2.9.1 2.9.2 2.9.3 2.9.4数据库基本状况检查 (2)检查Oracle的进程 (2)检查Oracle监听进程 (3)检查Oracle实例状态 (4)检查归档情况 (4)数据库日志文件检查 (4)检查Oracle日志文件 (4)检查Oracle核心转储目录 (5)数据库对象状态检查 (5)检查Oracle控制文件状态 (5)检查Oracle在线日志状态 (6)检查Oracle表空间的状态 (6)检查Oracle所有数据文件状态 (6)检查Oracle所有表、索引、存储过程、触发器、包等对象的状态 (7)数据库资源使用情况检查 (7)检查Oracle初始化文件中相关的参数值 (7)检查Oracle各个表空间的增长情况 (8)检查一些扩展异常的对象 (9)检查system 表空间内的内容 (9)检查对象的下一扩展与表空间的最大扩展值 (9)数据库表空间使用情况监控 (10)检查数据库定时作业的完成情况 (11)数据库坏块的处理 (11)数据库备份情况检查 (12)检查备份软件的日志 (12)检查数据库归档日志 (12)控制文件的备份 (12)数据库连接情况检查 (12)检查数据库连接 (12)检查数据库会话 (12)操作系统相关检查 (13)检查空间使用情况 (13)检查网络状况 (13)检查内存使用情况 (13)检查磁盘I/O 瓶颈 (14)3 ORACLE数据库每周应检查的项目 (14)3.1 3.2查看是否有危害到安全策略的问题 (14)查看的网络日志 (14)3.3 3.4将所有的警告日志存档 (14)查看ORACLE相关的网站,获取最新信息 (14)4 ORACLE数据库每月应检查的项目 (15)4.1 4.2 4.3查看对数据库会产生危害的增长速度 (15)查看数据库调整产生的影响 (15)查看I/O 的屏颈问题 (15)5附: (17)5.1 5.2 5.3 5.4启动数据库 (17)关闭数据库 (17)启动监听 (18)关闭监听 (19)1 前言数据库系统往往是企业或组织信息系统中最重要的基础架构,一旦数据库系统不能正常运行,那基于数据库的整个信息架构都会随之瘫痪,因此我们必须保证数据库系统持续的健康的运行。
Oracle中间件WebLogic12c维护保养手册

Oracle中间件WebLogic12c维护保养手册Oracle 中间件WebLogic 12c 维护保养手册目录1日常监控及JVM查看工具 (3)1.1安装 (3)2VNC的安装及使用 (3)2.1安装 (3)2.2启动vnc (3)2.3运行VNC Viewer客户端 (3)2.4查询vnc服务 (4)2.5停止vnc服务 (5)2.6增加vnc服务终端 (5)3服务器相关参数配置 (5)3.1文件句柄数:根据实际服务器情况配置。
(5)4常见问题及处理办法 (5)4.1修改系统字符编码 (5)4.2手工删除DOMIAN的方法 (6)4.3域服务器启动端口冲突 (6)4.4启动后可刷新页面,查看服务状态 (6)4.5不重启服务情况下,替换静态文件 (6)4.6weblogic改为开发模式 (7)4.7版本管理 (7)4.8使用部署的目标定义的默认值的情况下,清理缓存文件路径 (7) 4.9启动server,server**.out日志文件中包含乱码 (7)4.10weblogic.xml文件说明 (7)4.11weblogic控制台密码修改 (8)4.12节点管理器配置文件说明 (9)4.13设置GC日志的打印参数 (9)4.14部署模式设置 (9)1日常监控及JVM查看工具1.1安装2VNC的安装及使用2.1安装Linux系统默认已安装vnc服务器端。
2.2启动vnc若未用vncpasswd设置密码,则第一次运行vncserver时,会提示设置密码,再次确定密码,并分配终端编号。
输入命令:vncserverYou will require a password to access your desktops.Password:输入连接密码Verify:再次输入密码xauth: creating new authority file /webapp/.XauthorityNew 'gd-webapps01:1 (webapp)' desktop is gd-webapps01:1 分配终端编号Creating default startup script /webapp/.vnc/xstartupStarting applications specified in /webapp/.vnc/xstartupLog file is /webapp/.vnc/gd-webapps01:1.log2.3运行VNC Viewer客户端在Microsoft Windows上运行VNC Viewer“vncviewer.exe”,系统会出现”Connection details”对话框在“Connection details”对话框中的“VNC server”文本框中输入VNC Server的IP地址:终端编号,单击“连接”按钮,再输入密码后,进入vnc操作界面。
oracle、weblogic、TSM日常维护

ORACLE日常维护步骤1 数据库启动单实例:以oracle用户登录服务器,依次执行以下命令sqlplus “/as sysdba”startupexitRAC环境:以root用户登录数据库,依次执行以下命令进入到CRS主目录bin下:./crsctl check crs./crs_stat –t./crsctl start crs./crsctl check crs./crs_stat –tsrvctl start database -d db_name2 启动监听单实例:以oracle用户登录服务器,执行以下命令lsnrctl startRAC环境:以root用户登录服务器,执行以下命令进入到CRS主目录bin下:srvctl start listener -n instance1srvctl start listener -n instance23 检查数据库状态单实例:以oracle用户登录服务器,执行以下命令检查服务进程:ps -ef|grep "ora_"|grep -v grep结果中同一个实例至少包含ora_dbw0*、ora_lgwr*、ora_smon*、ora_pmon*、ora_ckpt*等5个进程。
检查监听状态:lsnrctl status检查实例状态:sqlplus “/as sysdba”sql>select instance_name,status,database_status from v$instance;RAC环境:检查方式与单实例基本一致,但多出检查crs状态Crs –t –v4 检查数据库告警日志以oracle用户登录,执行以下命令cd $ORACLE_BASE/oracle_sid/bdump/grep ORA- alert_sid.log|more如存在相关ORA-报错,请联系DBA进行检查处理。
5 数据库关闭单实例:以oracle用户登录,执行以下命令;Sqlplus “/as sysdba”Shutdown immediate;Exit停掉监听:lsnrctl stopRAC环境:以root用户登录服务器,进入crs安装主目录bin下停实例srvctl stop database -d db_name停CRS服务./crsctl stop crs停监听srvctl stop listener -n instance1srvctl stop listener -n instance26启停企业管理器(EM)以oracle用户登录服务器启动EM:Emctl start dbconsole关闭EM:Emctl stop dbconsole检查EM状态:Emctl status dbconsoleWeblogic 日常维护步骤1 Weblogic启动AdminServerWindows平台:进入应用域目录,双击startWebLogic.cmdLinux或Unix平台:进入应用域目录,./startWebLogic.sh2 Weblogic关闭Windows平台:进入应用域目录,双击stopWebLogic.cmd或直接点击关闭桌面上的命令行窗口;Linux或Unix平台:进入应用域目录,./stopWebLogic.sh或ps –ef |grep –i weblogic 查出进程号(pid),然后用kill -9 pid3 Server状态查询通过IE访问weblogic console,左侧目录结构树,点击环境(environment)----服务器(server):查看server状态,确保部署应用的server处于running状态。
Oracle GoldenGate 12c 用户指南.pdf_1701870649.8259318说

Oracle GoldenGate 12c for Oracle Database 12cJagdev DhillonVice PresidentNick WagnerProduct ManagerSafe Harbor StatementThe following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.Program Agenda1 2 3 4 Oracle GoldenGate 12.1.2 Review Oracle GoldenGate 12.1.2.1 New Features Streams to GoldenGate ConversionsQ&AOracle GoldenGate 12c Generic Enhancements•DDL Trigger is no longer needed–Works with Oracle 11.2.0.4 and up and requires Integrated Extract–Works with Oracle Standard Edition as well as Enterprise Edition•DISCARDFILE now has defaults, and no longer needs to be specified for each Replicat •Improved Schema Wildcard resolution within the parameter files–Only captures first TABLE parameter for SCOTT.EMP DMLTABLE SCOTT.EMP, COLMAP(…);TABLE *.EMP;•Oracle 12c Expanded Data Type Support–Support for VARCHAR2 / NVARCHAR2 / RAW MAX options (32k length)Integrated Replicat•Integrated Replicat for Oracle target databases only–11.2.0.4 and 12c (12.1.+)•Leverages database parallel apply servers for automatic dependency aware parallel apply•Minimal changes to replicat configuration–Single replicat parameter file for all tables–No split transaction semanticsIntegrated ReplicatInbound Server (Database Apply Process) Delivery Lightweight Streaming API Receiver Preparer Coordinator Inbound Server Applier NApplier 2 Applier 1 Oracle DatabaseDelivery Delivery Delivery Delivery Customer defined splitSQL SQLSQL SQLTargetOracle and Non-Oracle DatabasesMAP sales.acct1, TARGET sales.acct1; MAP sales.acct2, TARGET sales.acct2; MAP sales.acct3, TARGET sales.acct3;Trail Files Thread Customer defined split SQL SQLSQLSQL Single replicationprocess forcustomerGoldenGatecoordinatesthread for barrieroperations TargetOracle and Non-Oracle DatabasesMAP sales.acct1, TARGET sales.acct1, THREAD (2); MAP sales.acct2, TARGET sales.acct2, THREAD (3); MAP sales.acct,3 TARGET sales.acct3, THREADANGE (4-9);Credential Store/Oracle Wallet•Oracle Wallet and Credential Store functionality now built into the Oracle GoldenGate Installation•Credential Store for storing usernames and passwords•Once a credential has been added to the wallet–Remove USERID, MININGDBUSERID, etc–Replace with USERIDALIAS, MININGDBUSERIDALIAS, etcHA Features for GoldenGate in 12.1.2•Oracle Active Data Guard and Oracle GoldenGate High-Availability Best Practices [CON7715]–Tuesday, Sep 30, 10:45 AM - 11:30 AM- Moscone South – 308•Full Integration with ASYNC FSFO–GoldenGate can now safely follow bounded data-loss failovers–Support enabled in Integrated Extract with the addition of the following parameter:TRANLOGOPTIONS HANDLEDLFAILOVER•Works for Oracle DB 11g and 12c•Full integration with Oracle’s XAG–XAG allows you to register a GoldenGate instance to improve HA–XAG provides increased availability in the face a loss of an instance or Primary databaseProgram Agenda1 2 3 4 Oracle GoldenGate 12.1.2 Review Oracle GoldenGate 12.1.2.1 New Features Streams to GoldenGate ConversionsQ&A12.1.2.1 Major Enhancements•Capture Enhancements–Integrated Extract Enhancements–Certification for Oracle 12.1.0.2 and In-Memory Database (IMDB) –Support for Capturing from ADG Standby database •Integrated Delivery Enhancements–Dependency Aware Batching–DDL and DML Handlers–Error Queue Support•Support for multiple Editions (Edition Based Redefinition) •Column Level Character Set Support•SOCKS 5 SupportIntegrated Extract Specific Enhancements•Continues to support Oracle SE and EE databases•Improved Startup Performance and Scalability (shared mining dictionary) •Tagged transaction can be excluded for Active-Active replication–EXCLUDETAG•Create Table As Select… can be applied as DDL + DML rather than DDL –TRANLOGOPTIONS GETCTASDML•Added redo log capture for ANYDATA and UDTs–TRANLOGOPTIONS USENATIVEOBJSUPPORT•Support for Edition Based Redefinition and multiple editionsClassic Extract can now capture from an ADG Standby database •Extract can be configured to run on the Standby Database•Configuration on the Primary database–Setup DDL capture (optional)–Configure Supplemental log data•Configuration on the Standby database–USERID Parameter points to the Primary database (USERID username@primary ) –Set TRANLOGOPTIONS MINEFROMACTIVEDGShared Logminer Dictionary•REGISTER EXTRACT ecap DATABASE•REGISTER EXTRACT ename DATABASE SHARE ecap–Ename is created as a “clone” of ecap–2nd extract (ename) uses same internal dictionary as ecap•Fast start of 2nd extract (no dictionary processing required)•Single extract does dictionary maintenance•REGISTER EXTRACT eother DATABASE SCN startatscn SHARE ecap –SCN parameter meaning is different when combined with SHAREEXCLUDETAG Functionality•TRANLOGOPTIONS EXCLUDETAG takes a single string value, but allows multiple lines to specify multiple tags•Extend EXCLUDETAG to exclude any tagged operation–EXCLUDETAG +–Similar to Streams is_null_tag setting.•Filtering of tagged transactions can be done in the Extract pump and REPLICAT12.1.2.1 Integrated Delivery Enhancements Dependency-Aware Batching for Integrated Replicat•Through the use of INTEGRATEDPARAMS BATCHSQL_MODE–Controls the ordering of transactions in BATCHSQL mode–Options:•SEQUENTIAL – transaction batched in sequential order•DEPENDENT – Dependency grouping, schedule when no active dependencies•DEPENDENT_EAGER – dependency grouping but allow scheduling when there are active dependencies–Default is DEPENDENT for Oracle 12.1.0.2–Requires new OGG/RDBMS bundled patch (bp2) but not available for 11.2.0.4.•Without patch, default is SEQUENTIAL•COMMIT_SERIALIZATION=FULL sets BATCHSQL_MODE=SEQUENTIALIntegrated Replicat Apply Handler Configuration•Uses the same package calls to set up as Streams does–DBMS_APPLY_ADM package•DML: Set_dml_handler or Add_stmt_handler•DDL: Alter_apply–The scope of handler is dependent on the configuration•Per Table , Per Operation (Ins/Upd/Del)•It is associated with the Inbound Server (Integrated Replicat process inside thedatabase)•Operations processed by the DML/DDL handler will not be applied by the Replicat •Integrated Replicat needs to be stopped and restarted when adding or removing handlers.PL/SQL Update Handler on DEMO.ORDERS table BEGINDBMS_APPLY_ADM.SET_DML_HANDLER(object_name => '"DEMO"."ORDERS"',object_type => 'TABLE',operation_name => 'UPDATE',error_handler => FALSE, ## if FALSE, then the handler replaces normal apply processing, ## if TRUE, then the handler is only executed on error.user_procedure => 'DEMO.ORDERS_DML_HANDLER',apply_database_link => NULL,apply_name => NULL); ## If NULL, then handler is used for ALL apply & inbound servers END;/12.1.2.1 Integrated Delivery Enhancements Statement DML Handlers•Statement DML handlers are up to 4x faster than procedural DML handlers –Statement DML handlers should be used to replace SQLEXEC in the Replicat when possible •Easy to Use–SQL statements, rather than PL/SQL procedures–DBMS_APPLY_ADM.ADD_STMT_HANDLER•Creates handler with SQL statement AND•Registers to Apply process–DBMS_STREAMS_HANDLER_ADM package procedures•Create or Drop handler•Add or Remove statements to/from handler•Register with apply12.1.2.1 Integrated Delivery EnhancementsEnable Error Queue Handling•In older versions of OGG, if an error occurs it falls back and lets the Replicat retry the operation. If the OGG retry fails it abends•Allow DBMS_Apply_Adm.Execute_Error capability for Integrated Replicat to retry operations in the error queue. Handles whether is message is added to the error queue.–DBOPTIONS _NO_DISABLE_ON_RETRY_ERROR•Allow OGG to retry, but if OGG fails, continue processing. If OGG successfully applies transaction, OGG deletes error from queue. Default behavior.–DBOPTIONS _NO_DISABLE_OR_RETRY_ERROR•Disable OGG retry and continue processing, recommended with COMMIT_SERIALIZATION=FULLManaging Apply Errors12.1.2.1 Integrated Delivery EnhancementsEdition Based Redefinition•DDL Replication now supports CREATE/DROP EDITION–Replicat will grant the user permission to use if it exists on target•Extract will capture the EDITION NAME owner•Replicat will switch session to the EDITION owner before applying DDL •DDL operations on editions can be filtered as well–DDL INCLUDE ALL, EXCLUDE OBJTYPE EDITION•Support for Column Level Character Sets–For cases where a table has column(s) with a character set that is different from the database character set.–Use SOURCECHARSET to enable this functionality•In MAP / TABLE statements use CHARSET to use your own settings•In DEFGEN use COLCHARSET to use your own settings•Enhanced Cloud support–SOCKS v5 Support•SOCKet Secure is a protocol that supports routing between client and server •Allows authentication•SOCKS can encrypt all traffic between client and server•Alternative to VPN for cloud to on-premise or vice-versa–New parameter SOCKSPROXY•SOCKSPROXY host:port, [PROXYCSALIAS <alias> [, PROXYCSDOMAIN domain]]•Enhanced Cloud support–Example for sending trail data from on-premise to cloud.•GoldenGate installed on with manager port 9000•Firewall only allows incoming connections on SSH port.–Use SSH as SOCKS proxy server on-premise•ssh –i ssh-key –N –f –D 1080 ******************************.com•Port 1080 is the client port that will route to an OGG installation on –Extract Parameter file:•RMTHOST , MGRPORT 9000, SOCKSPROXY localhost:1080Program Agenda1 2 3 4 Oracle GoldenGate 12.1.2 Review Oracle GoldenGate 12.1.2.1 New Features Streams to GoldenGate ConversionsQ&AMOS 1912338.1 Oracle Streams to Oracle GoldenGate Conversion •Streams is now deprecated (as of Oracle 12c)•Designed to help existing Streams users convert their replication into Oracle GoldenGate replication.–The streams2ogg tool will generate the appropriate GoldenGate 12c configuration files allowing for an easier way to migrate the Streams implementation into a GoldenGate implementation.•This tool will help–Eliminate manual conversion errors–Minimize the GoldenGate learning curve for Streams customers–Implement GoldenGate best practicesMOS 1912338.1 Oracle Streams to Oracle GoldenGate Conversion•The streams2ogg migration tool is run at the database level–connecting to the Streams Administrator schema–Load and execute the streams2ogg package–Oracle GoldenGate Parameter files are produced•OGG configuration files can be generated to run on a different database or machine to allowing for testing and platform migrations.NOTE:This tool does not provide the environment or process for switching from Streams over to your GoldenGate implementation. And does not support complete conversion of the CDC (Change Data Capture) feature of Oracle DB. Ideally suited for environments where the source and target object structure is the same.Streams2oggMOS 1912338.1 Oracle Streams to Oracle GoldenGate Conversion •Database package streams2ogg–Download from MOS Doc ID 1912338.1•Load package as Streams Administrator and answer 2 questions –@streams2ogg–Name of Oracle GoldenGate administrator schema–Name of staging directory for storing the generated files•Run procedure from Streams Administrator schema using either: –exec streams2ogg.main–exec streams2ogg.customize (if performing customizations)•All generated files will be in the staging directory.Streams2ogg Files GeneratedFile Name Descriptione capname.prm Extract file name based on capture namep capname.prm Pump file name based on capture name/propagation namer appname.prm Replicat file name based on apply namemgr.prm Manager file name - contains PORT number,other OGG mgr Best Practiceparameters (These are not based on Streams configuration) handlers.sql Sql script to configure Streams handlers after replicat process isregistered (does not include handler code)streams2ogg.trc Debug/Trace file – always generatedstreams2ogg.rpt Report file – always generatedFile Name Descriptionggconfig.oby GGSCI obey file to create extract, pump, replicat processes ggconfig2.oby GGSCI obey file to create additional extract processes based on firstextract SCNggconfig_trandata.oby GGSCI obey file to configure database supplemental logging create_subdirectories.sh Shell script to generate directory structure under the trail file storagedirectoryreg_extract.sh Helper shell script for ggconfig2.oby OGG 12.1.2.0 Register extract….SCN optionwatch.sh, watch.sql watch_status.sql Helper shell and sql script for ggconfig2.oby for OGG 12.1.2.1 Register extract….SHARE optionwatch_status.sql can be used to get status of capture initializationogg_name_map.csv Comma-separated name/value pairs for customizing streams2ogg filegenerationStreams2ogg Files Generated (continued)Streams2ogg Post Execution StepsMOS 1912338.1 Oracle Streams to Oracle GoldenGate Conversion •Parameter files and obey files need to be edited–Choose method to login: dblogin or dbloginalias–For dblogin, set password•Pump parameter file also needs to identify the host name for the RMTHOST command–If PORT number is changed in mgr.port, modify port number in pump file, too. •wait.sh script needs sqlplus login passwordProgram Agenda1 2 3 4 Oracle GoldenGate 12.1.2 Review Oracle GoldenGate 12.1.2.1 New Features Streams to GoldenGate ConversionsQ&A。
Oracle WebLogic Suite 12c 简介

Oracle白皮书2013 年 7 月Oracle WebLogic Server 12c 简介第 12.1.2 版跨传统环境与云环境的头号应用服务器执行概要 (4)云部署的灵活性 (6)为下一代应用程序提供任务关键的云平台 (7)使用优化的 Oracle WebLogic Server 和 Oracle 数据库集成实现高 RASP、多租户 .. 8使用动态集群实现云的灵活性 (12)使用 Oracle Exalogic 中间件云服务器优化实现高达 3 倍的性能提升 (13)使用自有云管理简化运营 (14)使用统一安装和修补框架提高效率 (14)一致的 Oracle Coherence 管理 (14)Java 消息服务 (JMS) 的灵活伸缩 (15)Oracle Enterprise Manager 12c 提供的额外的云管理功能 (16)使用现代开发平台缩短上市时间 (18)使用简化的 Maven 集成实现快速开发 (18)使用移动开发框架支持智能电话和平板电脑 (19)使用 WebSocket 和 Toplink 数据服务开发创新型移动应用程序 (19)使用适用于 HTML5 的 JSON-REST 服务释放数据 (20)Oracle WebLogic Server:市场领先的应用服务器 (21)结论 (23)免责声明以下内容旨在概述产品的总体发展方向。
该内容仅供参考,不可纳入任何合同。
其内容不构成提供任何材料、代码或功能的承诺,并且不应该作为制定购买决策的依据。
所描述的有关 Oracle 产品的任何特性或功能的开发、发布和时间安排均由 Oracle 自行决定。
执行概要如今的企业领导对IT 提出了挑战性的需求。
根据最近的一项IDC 调查,CIO 们将降低成本、快速推出新的和改进的产品以及提高生产效率列为首要任务。
1 许多组织都在努力满足这些迫切需要。
原因何在?竞争激烈的市场、业务模式、消费者喜好都在快速变化,要跟上变化的步伐,必须更改现有软件或编写全新的应用程序。
Oracle Enterprise Manager Cloud Control 12c 产品说明书

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted
2
Evolution of Datacenter
Changing Dynamics of Database Maintenance
Ever growing database population
Multiple versions and patch levels Compliance challenges Poor resource utilization High cost of deployment and operation
3. Self Service users or Admin can choose to migrate DBs over to the new home
Benefits:
– Scale: Subscription based, automated deployment and at mass scale
Distinct configs.
OHs are Different !!!
X with version and platform 9 Versions, 3 Platforms avg.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Restricted
downtime and rollback/switch back Mass automation - multiple targets with multiple patches
2020年(Oracle管理)Oracle数据库维护手册

(Oracle管理)Oracle数据库维护手册数据库维护手册目录2.1数据库启动42.2数据库停止52.3监听器的启停52.4用户管理62.5数据库参数文件62.6数据库概况的查询72.7常用对象的创建和使用82.8失效数据库对象的检测和编译92.9数据备份的技巧102.10数据库命中率的监测112.11最消耗资源进程的检测112.12锁的监测及处理122.13SQL语句执行技巧132.14表空间的管理142.15数据文件I/O的统计优化152.16错误号的跟踪出理153.1ORACLE数据库日常检查163.2会话连接日志的清理163.3数据库hang住时的停止和方法16 3.4扩表空间方法173.5死锁会话的杀死173.6未决两阶段事务的回滚184.1EM工具181前言本文主要是简单介绍和总结日常Oracle数据在运行维护方面的一些方法和技巧。
通过该手册以便于相关技术人员的日常运维工作。
2ORACLEDB维护方法2.1数据库启动1、以oracle用户用户登录,sqlplus‘/assysdba’sqlplus>startup2、以oracle用户或ora816用户登录sqlplus‘/assysdba’sqlplus>startupnomuntsqlplus>alterdatabasemount;sqlplus>alterdatabaseopen;3、第一种启动方式是最常用的手工启动方式,第二种启动方式是数据库有故障时常用的逐步启动方式,可以观察故障点。
因为startupnomount语句只读取spfile(serverparameterfile数据库参数文件),启动instance,启动SGA和后台进程;alterdatabasemount语句打开控制文件,确认数据文件和联机日志文件的位置,但此时不对数据文件和日志文件进行校验检查;alterdatabaseopen 打开包括Redolog文件在内的所有数据库文件,这种方式下可访问数据库中的数据。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Oracle 中间件WebLogic 12c 维护保养手册目录1日常监控及JVM查看工具 (3)1.1安装 (3)2VNC的安装及使用 (3)2.1安装 (3)2.2启动vnc (3)2.3运行VNC Viewer客户端 (3)2.4查询vnc服务 (4)2.5停止vnc服务 (5)2.6增加vnc服务终端 (5)3服务器相关参数配置 (5)3.1文件句柄数:根据实际服务器情况配置。
(5)4常见问题及处理办法 (5)4.1修改系统字符编码 (5)4.2手工删除DOMIAN的方法 (6)4.3域服务器启动端口冲突 (6)4.4启动后可刷新页面,查看服务状态 (6)4.5不重启服务情况下,替换静态文件 (6)4.6weblogic改为开发模式 (7)4.7版本管理 (7)4.8使用部署的目标定义的默认值的情况下,清理缓存文件路径 (7)4.9启动server,server**.out日志文件中包含乱码 (7)4.10weblogic.xml文件说明 (7)4.11weblogic控制台密码修改 (8)4.12节点管理器配置文件说明 (9)4.13设置GC日志的打印参数 (9)4.14部署模式设置 (9)1日常监控及JVM查看工具1.1安装2VNC的安装及使用2.1安装Linux系统默认已安装vnc服务器端。
2.2启动vnc若未用vncpasswd设置密码,则第一次运行vncserver时,会提示设置密码,再次确定密码,并分配终端编号。
输入命令:vncserverYou will require a password to access your desktops.Password:输入连接密码Verify:再次输入密码xauth: creating new authority file /webapp/.XauthorityNew 'gd-webapps01:1 (webapp)' desktop is gd-webapps01:1 分配终端编号Creating default startup script /webapp/.vnc/xstartupStarting applications specified in /webapp/.vnc/xstartupLog file is /webapp/.vnc/gd-webapps01:1.log2.3运行VNC Viewer客户端在Microsoft Windows上运行VNC Viewer“vncviewer.exe”,系统会出现”Connection details”对话框在“Connection details”对话框中的“VNC server”文本框中输入VNC Server的IP地址:终端编号,单击“连接”按钮,再输入密码后,进入vnc操作界面。
2.4查询vnc服务ps -ef|grep -i vnc2.5停止vnc服务vncserver -kill :1 1为终端编号2.6增加vnc服务终端vncserver :3 3为终端编号,不设置编号为随机设置编号New 'gd-webapps01:3 (webapp)' desktop is gd-webapps01:3Starting applications specified in /webapp/.vnc/xstartupLog file is /webapp/.vnc/gd-webapps01:3.log3服务器相关参数配置3.1文件句柄数:根据实际服务器情况配置。
备注:参考数值请参照现网服务器配置。
修改后如果不生效,需关闭当期weblogic系统的nodemanager管理器及web服务,重启后验证。
4常见问题及处理办法4.1修改系统字符编码编辑用户环境变量$vi .bash_profile加入如下内容:LANG="zh_CN.GB18030"保存后执行如下命令$ . .bash_profile重新登录后查看系统字符编码是否生效4.2手工删除DOMIAN的方法1、删除创建的domain,删除整个目录文件夹<bea_home>\Oracle\Middleware\user_projects\domains\<test_domain>2、删除<bea_home>\Oracle\Middleware\domain-registry.xml文件中的对应节点的<domain location="/root/webapps/weblogic/user_projects/domains/my_domain"/>4.3域服务器启动端口冲突先查询需要设置的端口是否已经占用netstat –apn | grep 8080,如果没有占用则修改配置文件:<bea_home>/user_projects/domains/<my_domain>/config/config.xml找到AdminServer,在此name节点下,增加端口号配置<server><name>AdminServer</name><listen-port>7008</listen-port><listen-address/></server>4.4启动后可刷新页面,查看服务状态4.5不重启服务情况下,替换静态文件使用部署的目标定义的默认值的情况下:找到当前web应用war包部署在server中的目录<MY_DOMAIN> /servers/webapp/stage/web/应用包.war/,替换所需对应的文件即可使部署能够通过下列位置进行访问的情况下,直接替换对应的目录文件即可。
4.6weblogic改为开发模式修改配置文件<MY_DOMAIN>/config/config.xml<production-mode-enabled>false</production-mode-enabled>4.7版本管理在web.war/META-INF/MANIFEST.MF 增加weblogic-Application_Version:Version14.8使用部署的目标定义的默认值的情况下,清理缓存文件路径<MY_DOMAIN>\servers\<MY_SERNAME>\tmp\_WL_user\$App_Name\4.9启动server,server**.out日志文件中包含乱码查询:export |grep LANG修改当前用户环境变量为LANG="zh_CN.GB18030"修改客户端软件,如secureCRT软件 菜单 options sessionOptions Terminal appearance 修改character字符编码格式。
4.10weblogic.xml文件说明<session-descriptor><timeout-secs>300</timeout-secs><invalidation-interval-secs>60</invalidation-interval-secs><persistent-store-type>replicated_if_clustered</persistent-store-type> </session-descriptor>将持久性存储方法设置为以下某个选项:memory - 禁用持久性会话存储。
replicated - 与memory 相同,但会话数据将在群集服务器之间复制。
replicated_if_clustered –如果Web 应用程序部署于群集服务器上,则会复制生效的persistent-store-type。
否则,memory 为默认值。
sync-replication-across-cluster –复制将在群集内同步发生。
async-replication-across-cluster –复制将在群集内异步发生。
file - 使用基于文件的持久性jdbc - 使用数据库存储持久性会话。
cookie –所有会话数据都存储于用户浏览器的cookie 中。
4.11weblogic控制台密码修改1、<MY_DOMAIN>→服务→安全领域2、点击领域进入,领域的设置-用户和组3、选择要修改密码的用户,进入用户设置-口令-保存。
4、注销后,停止服务。
5、修改<MY_DOMAIN>/servers/AdminServer/security/boot.properties文件把里面的用户名和密码改成你新的口令。
6、重启服务修改管理服务器密码后,受管服务器需同步一次server,参考2.10.2 多主机多服务器集群wlst工具的使用。
4.12节点管理器配置文件说明/root/webapps/wls/wlserver_12.1/common/nodemanager/nodemanager.domains 记录启动域路径nodemanager.properties 管理服务器启动端口及配置信息4.13设置GC日志的打印参数在<MY_DOMAIN>/bin/setDomainEnv.sh中设置GC日志的打印参数分析:MEM_ARGS=”-Xms2048m –Xmx2048m –verbosegclog:gc.log”Export MEM_ARGS该参数会在<MY_DOMAIN>/下输出gc.log4.14部署模式设置。