本站用于记录日常工作内容,虚拟化云计算,系统运维,数据库DBA,网络与安全。
How To Shrink A Temporary Tablespace in Oracle DatabaseBy adminQuestion: How to resize the TEMPFILE(s) for a temporary tablespace after they have grown larger than needed?Large sort operations can cause temporary tablespaces to grow very large and as such there may be a need to ‘downsize’ after such operations. Until Oracle 11g there was no SQL command to release the unused allocated temporary space. One workaround for this problem is to create a new empty temporary tablespace with a smaller size, assign this new tablespace to the users and then drop the old tablespace. The disadvantage of this procedure is that it requires that no active sort operations are happening within the old temporary tablespace while it is being dropped.In Oracle 11g, a new feature was added that can be used to shrink temporary tablespaces. This command can be used to shrink only locally managed temporary tablespaces :ALTER TABLESPACE tablespace SHRINK SPACE | TEMPFILE tempfile_name [KEEP size];The&nbs...
 
0
What is MySQL Query CacheMySQL server features Query Cache Feature for a long time. When in use, the query cache stores the text of a SELECT query together with the corresponding result that is sent to a client. If another identical query is received, the server can then retrieve the results from the query cache rather than parsing and executing the same query again.It caches the full result set produced from a SELECT query:Queries executed must be identical.Cache is stored in system memory.Cache is checked before the query is parsed.Associated table updates invalidate query cache results. Prepared statements can be cached, but limitations exist. Some statements that do not use the query cache are:Queries that use nondeterministic functions.Queries that are a subquery of an outer queryQueries that are executed within the body of a stored function, trigger, or eventMySQL Query Cache SettingsThe query cache adds a few MySQL system variables for mysqld which may be set in a configuration...
Windows下Oracle因主机名或IP变动,导致EM无法启动的问题。错误信息:WIN的事件查看器:An error occured while trying to initialize the service.手工启动:emctl start dbconsoleEnvironment variable ORACLE_SID not defined. Please define it.当执行set OARCLE_SID=orcl,继续报错Unable to determine local host from URL REPOSITORY_URL= http://localhost:%EM_UPLOAD_PORT%/em/upload/注意以下地方:1: 主机名:C:/WINDOWS/system32/drivers/etc/hosts添加IP与主机名信息。Windows系统中打开 数据库配置助手,配置数据库选件,根据提示配置账号与密码,会重新生成dbcosole相关数据。完成后,最好重启下系统,看下自己的监听配置。2: EM链接JDBC:$ORACLE_HOME/oc4j/j2eeOC4J_DBConsole_fox-kook_kookOC4J_DBConsole_localhost_kook (从fox-kook主机名复制这个目录为localhost)3: 监听修改为主机名的连接方式,不要以IP方式。$ORACLE_HOME/NETWORK/ADMIN/listener.oraSID_LIST_LISTENER =  (SID_LIST =    (SID_DESC =      (GLOBAL_DBNAME = kook.glfsoft.com)     ...
oracle 12C(12.1.0.2) 自动化静默安装脚本脚本使用安装前配置点击打开链接需要使用root用户执行(尽量安装纯净的OS环境) 下载脚本:https://github.com/domdanrtsey/Oracle12c_autoinstall.git点击打开链接下载-安装脚本安装前请将Oracle 12C安装包(linuxamd64_12102_database_1of2.zip、 linuxamd64_12102_database_2of2.zip )放置在 /opt/ 目录下(脚本提示是/opt,实际可随意存放)系统需要具备512MB的swap交换分区OS可连通互联网(如果不通外网,可以使用如下方法,将依赖包下载下来,再上传到目标服务器安装,以解决依赖问题)安装插件 # yum -y install yum-plugin-downloadonly 创建目录 # mkdir /root/mypackages/ 下载依赖 # yum install --downloadonly --downloaddir=/root/mypackages/ yum install -y binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 glibc glibc.i686 \ glibc-devel glibc-devel.i686 ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libX11 libX11.i686 \ libXau libXau.i686 libXi libXi.i686 libXtst libXtst.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 \ libstdc++-devel libstdc++...
使用sqldeveloper将MySQL5迁移到Oracle11g一、环境和需求1、环境  mysql Server version: 5.7 oracle version:oracle 11g r22、需求       把MYSQL库中的表数据迁移到ORACLE中,Mysql的备文件是sql文件。二、mysql数据恢复 1,新建一个mysql数据库aemp,我这里就直接使用root账号,将sql文件导入到对应的aemp库中。     我这里使用phpstudy建了一个mysql数据库,相当于恢复好aemp库数据。2,在oracle数据库中建好表空间aemp与账号aemp,给添加上RESOUCE,CONNECT,DBA角色。用来将mysql数据迁移到aemp用户下,建用户与角色信息如下:CREATE USER AEMP IDENTIFIED BY "123456" DEFAULT TABLESPACE AEMP TEMPORARY TABLESPACE TEMP PROFILE "DEFAULT" QUOTA UNLIMITED ON AEMP;GRANT "CONNECT" TO AEMP;GRANT "RESOURCE" TO AEMP;GRANT "DBA" TO AEMP;ALTER USER AEMP DEFAULT ROLE "CONNECT", "RESOURCE";再建个oracle账号mysql,用来创建档案资料库,当然可以使用上面的aemp账号,只是资料都在一起了。CREATE...
MySQL Router实现MySQL的读写分离 1.简介MySQL Router是MySQL官方提供的一个轻量级MySQL中间件,用于取代以前老版本的SQL proxy。既然MySQL Router是一个数据库的中间件,那么MySQL Router必须能够分析来自前面客户端的SQL请求是写请求还是读请求,以便决定这个SQL请求是发送给master还是slave,以及发送给哪个master、哪个slave。这样,MySQL Router就实现了MySQL的读写分离,对MySQL请求进行了负载均衡。因此,MySQL Router的前提是后端实现了MySQL的主从复制。MySQL Router很轻量级,只能通过不同的端口来实现简单的读/写分离,且读请求的调度算法只能使用默认的rr(round-robin),更多一点、更复杂一点的能力都不具备。所以,在实现MySQL Router时,需要自行配置好后端MySQL的高可用。高可用建议通过Percona XtraDB Cluster或MariaDB Galera或MySQL官方的group replication实现,如果实在没有选择,还可以通过MHA实现。所以,一个简单的MySQL Router部署图如下。本文将使用MySQL Router分别实现后端无MySQL主从高可用情形的读写分离,至于为什么不实现后端有MySQL高可用的读写分离情形。在我看来,MySQL Router只是一个玩具,不仅功能少,而且...
附件是emcli工具软件Downloading and Deploying EM CLIThis chapter discusses the following Enterprise Manager Command Line Interface (EM CLI) topics:EM CLI InstallationDownloading and Deploying the EM CLI ClientGetting Started with EM CLISecurity and AuthenticationFormat Option Availability for Output Data Verbs2.1 EM CLI InstallationEM CLI provides two installable kits:EM CLI StandardThis kit supports the Standard mode only.EM CLI with Scripting modeThis kit supports all three modes, but only Interactive and Scripting modes enable you to provide Jython-based scripts.EM CLI consists of two components used to access the Enterprise Manager framework functionality:EM CLI clientThe EM CLI client is a command-line program (Sun Java JRE-based) that sends EM CLI verbs to a specific Oracle Management Service (OMS). In some respects, the EM CLI client functions as a command-line equivalent of an Enterprise Manager Cloud Control console. You can download the EM CLI client on any system within your...
oracle查看与删除oem企业管理器Web管理中自动备份任务调度job 1.在oracle oem中可以执行自动备份的job,注意,其不在dba_jobs,dba_scheduler_jobs中2.查看oem中的jobselect a.job_name, b.execution_hours, b.execution_minutes  from sysman.mgmt_job a, sysman.mgmt_job_schedule bwhere a.schedule_id = b.schedule_id   and a.job_type = 'Backup';3.删除oem中的job,注意必需先DELETE_ALL_EXECUTIONS,而后STOP_ALL_EXECUTIONS,最后DELETE_JOBDECLAREBEGIN  MGMT_JOBS.DELETE_ALL_EXECUTIONS(P_JOB_NAME => 'BACKUP_LABAPROD_000022', P_JOB_OWNER => 'SYS');  MGMT_JOBS.STOP_ALL_EXECUTIONS(P_JOB_NAME => 'BACKUP_LABAPROD_000022', P_JOB_OWNER => 'SYS');  MGMT_JOBS.DELETE_JOB(P_JOB_NAME => 'BACKUP_LABAPROD_000022', P_JOB_OWNER => 'SYS');END;
    总共52页,当前第1页 | 页数:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11