Dataguard配置Step by Step

简介:

1.主节点备份并生成备用数据库控制文件 

设置主节点为force Logging模式(为了双向切换,建议备用节点也设置为force logging模式)

ALTER DATABASE FORCE LOGGING;

设置主节点为归档模式
登陆主节点,进行数据库备份,并生成备用数据库控制文件

Last login: Mon Aug 9 16:46:47 2004 from 172.16.32.65 [root@standby root]# su - oracle 
[oracle@standby oracle]$ sqlplus "/ as sysdba" 
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Aug 16 10:16:18 2004

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 135337420 bytes
Fixed Size 452044 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.

SQL> select name from v$datafile;

NAME
------------------------------------------------------------
/opt/oracle/oradata/primary/system01.dbf
/opt/oracle/oradata/primary/undotbs01.dbf
/opt/oracle/oradata/primary/users01.dbf


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
[oracle@standby oracle]$ ls
admin dictionary.ora jre oradata oraInventory oui product soft

[oracle@standby oracle]$ tar -cvf oradata.tar oradata
oradata/
oradata/primary/
oradata/primary/archive/
oradata/primary/control01.ctl
oradata/primary/control02.ctl
oradata/primary/control03.ctl
oradata/primary/redo01.log
oradata/primary/redo02.log
oradata/primary/redo03.log
oradata/primary/system01.dbf
oradata/primary/undotbs01.dbf
oradata/primary/temp01.dbf
oradata/primary/users01.dbf

[oracle@standby oracle]$ ls -l *.tar
-rw-r--r-- 1 oracle dba 576512000 Aug 16 10:22 oradata.tar
[oracle@standby oracle]$ id
uid=800(oracle) gid=800(dba) groups=800(dba)
[oracle@standby oracle]$ hostname
standby
[oracle@standby oracle]$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Mon Aug 16 10:27:54 2004

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 135337420 bytes
Fixed Size 452044 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /opt/oracle/oradata/primary/archive
Oldest online log sequence 88
Next log sequence to archive 90
Current log sequence 90
SQL> alter database create standby controlfile as '/opt/oracle/stdcotrl.ctl';

Database altered.

SQL> !
ls[oracle@standby oracle]$ ls
admin dictionary.ora jre oradata oradata.tar oraInventory oui product soft stdcotrl.ctl

 


2.从主节点创建pfile文件

SQL> create pfile from spfile; 
File created.

 

SQL> !

[oracle@standby oracle]$ cd $ORACLE_HOME/dbs
[oracle@standby dbs]$ ls
initdw.ora init.ora initprimary.ora lkPRIMARY orapwprimary spfileprimary.ora sqlnet.log

 


3.登陆备用节点,ftp获得数据库文件、备用控制文件及参数文件

Last login: Mon Aug 16 08:47:58 2004 from 172.16.32.65 
[root@eygle root]# su - oracle
[oracle@eygle oracle]$ ls
admin doc jre oradata oraInventory oui product
[oracle@eygle oracle]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 5154852 3360600 1532396 69% /
/dev/sda7 101089 25744 70126 27% /home
/dev/sda5 4127076 2686152 1231280 69% /opt
none 515296 0 515296 0% /dev/shm
/dev/sda2 4127108 2218172 1699288 57% /usr
/dev/sda6 2063504 107744 1850940 6% /var
[oracle@eygle oracle]$ ftp 172.16.33.58
Connected to 172.16.33.58 (172.16.33.58).
220 (vsFTPd 1.2.0)
Name (172.16.33.58:root): oracle
331 Please specify the password.
Password:
230 Login successful.
ftp> ls
227 Entering Passive Mode (172,16,33,58,222,252)
150 Here comes the directory listing.
drwxr-xr-x 3 800 800 4096 Jun 30 07:02 admin
-rw-r--r-- 1 800 800 5422222 Jul 13 11:58 dictionary.ora
-rw-r--r-- 1 800 800 1165 Aug 16 02:51 initprimary.ora
drwxrwxr-x 4 800 800 4096 Jun 30 06:29 jre
drwxrwxr-x 12 800 800 4096 Jun 30 06:44 oraInventory
drwxr-xr-x 3 800 800 4096 Jul 01 06:15 oradata
-rw-r--r-- 1 800 800 576512000 Aug 16 02:22 oradata.tar
drwxrwxr-x 6 800 800 4096 Jun 30 06:29 oui
drwxr-xr-x 3 800 800 4096 Jun 30 05:18 product
drwxr-xr-x 6 800 800 4096 Jun 30 04:24 soft
-rw-r----- 1 800 800 1662976 Aug 16 02:37 stdcotrl.ctl
226 Directory send OK.
ftp> bin
200 Switching to Binary mode.
ftp> mget oradata.tar
mget oradata.tar? y
227 Entering Passive Mode (172,16,33,58,238,132)
150 Opening BINARY mode data connection for oradata.tar (576512000 bytes).
226 File send OK.
576512000 bytes received in 49.2 secs (1.1e+04 Kbytes/sec)
ftp> mget *.ctl
mget stdcotrl.ctl? y
227 Entering Passive Mode (172,16,33,58,73,35)
150 Opening BINARY mode data connection for stdcotrl.ctl (1662976 bytes).
226 File send OK.
1662976 bytes received in 0.14 secs (1.2e+04 Kbytes/sec)
ftp> mget initprimary.ora
mget initprimary.ora? y
227 Entering Passive Mode (172,16,33,58,194,239)
150 Opening BINARY mode data connection for initprimary.ora (1165 bytes).
226 File send OK.
1165 bytes received in 0.000325 secs (3.5e+03 Kbytes/sec)
ftp> bye
221 Goodbye.

 

[oracle@eygle oracle]$ ls
admin doc initprimary.ora jre oradata oradata.tar oraInventory oui product stdcotrl.ctl
[oracle@eygle oracle]$ mv initprimary.ora $ORACLE_HOME/dbs
[oracle@eygle oracle]$ cd $ORACLE_HOME/dbs
[oracle@eygle dbs]$ ls
a.sql initdw.ora init.ora initprimary.ora initrac1.ora initrac2.ora initrac.ora orapw 
orapwrac1 orapwrac2 spfilerac.ora

 


解包数据文件

[oracle@eygle oracle]$ ls 
admin doc jre oradata oradata.tar oraInventory oui product stdcotrl.ctl 
[oracle@eygle oracle]$ tar -xvf oradata.tar 
oradata/
oradata/primary/
oradata/primary/archive/
oradata/primary/control01.ctl
oradata/primary/control02.ctl
oradata/primary/control03.ctl
oradata/primary/redo01.log
oradata/primary/redo02.log
oradata/primary/redo03.log
oradata/primary/system01.dbf
oradata/primary/undotbs01.dbf
oradata/primary/temp01.dbf
oradata/primary/users01.dbf

修改initprimary.ora文件
修改控制文件名称及路径(如果和原配置不同),增加几个参数,修改后如下:

[oracle@eygle dbs]$ cat initprimary.ora 
*.aq_tm_processes=1 
*.background_dump_dest='/opt/oracle/admin/primary/bdump' 
*.compatible='9.2.0.0.0' 
*.control_files='/opt/oracle/oradata/primary/stdcotrl.ctl' 
*.core_dump_dest='/opt/oracle/admin/primary/cdump' 
... 
*.log_archive_dest_1='LOCATION=/opt/oracle/oradata/primary/archive' 
*.log_archive_dest_2='' *.log_archive_format='%t_%s.dbf' 
*.log_archive_start=true 
... 
*.user_dump_dest='/opt/oracle/admin/primary/udump' 
*.utl_file_dir='/opt/oracle' 
*.standby_archive_dest='/opt/oracle/oradata/primary/stdarch' 
*.fal_server='PRIMARY' 
*.fal_client='STANDBY' 
*.standby_file_management='AUTO'
创建必要的目录

 

[oracle@eygle oracle]$ cd $ORACLE_BASE/admin
[oracle@eygle admin]$ mkdir primary
[oracle@eygle admin]$ ls
primary rac
[oracle@eygle admin]$ cd primary/
[oracle@eygle primary]$ ls
[oracle@eygle primary]$ mkdir bdump cdump udump

 

4.配置主节点监听器及tnsnames.ora文件
配置后如下:

[oracle@standby oracle]$ cd /opt/oracle/product/9.2.0/network/admin/
[oracle@standby admin]$ cat listener.ora 
# LISTENER.ORA Network Configuration File: /opt/oracle/product/9.2.0/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = standby)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = primary)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(SID_NAME = primary)
)
)

[oracle@standby admin]$ cat tnsnames.ora 
# TNSNAMES.ORA Network Configuration File: /opt/oracle/product/9.2.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

STANDBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.33.46)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = primary)
)
)
PRIMARY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.33.58)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = primary)
)
)

[oracle@standby admin]$ lsnrctl start

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 16-AUG-2004 10:46:31

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Starting /opt/oracle/product/9.2.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /opt/oracle/product/9.2.0/network/admin/listener.ora
Log messages written to /opt/oracle/product/9.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=standby)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date 16-AUG-2004 10:46:31
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /opt/oracle/product/9.2.0/network/admin/listener.ora
Listener Log File /opt/oracle/product/9.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=standby)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "primary" has 1 instance(s).
Instance "primary", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

 


5.配置备用数据库监听器及tnsnames.ora文件
配置后文件如下:

[oracle@eygle admin]$ cd $ORACLE_HOME/network/admin 
[oracle@eygle admin]$ cat listener.ora 
# LISTENER.ORA Network Configuration File: /opt/oracle/product/9.2.0/network/admin/listener.ora 
# Generated by Oracle configuration tools. 

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = eygle)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = primary)
(ORACLE_HOME = /opt/oracle/product/9.2.0)
(SID_NAME = primary)
)
)
[oracle@eygle admin]$ cat tnsnames.ora
# TNSNAMES.ORA Network Configuration File: /opt/oracle/product/9.2.0/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

STANDBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.33.46)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = primary)
)
)
PRIMARY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.33.58)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = primary)
)
)


[oracle@eygle admin]$

 

 


6.在主备节点用tnsping测试网络连通性

[oracle@standby admin]$ tnsping standby 
TNS Ping Utility for Linux: Version 9.2.0.4.0 - Production on 16-AUG-2004 10:46:50

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
/opt/oracle/product/9.2.0/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.33.46)(PORT = 1521))) 
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = primary)))
OK (10 msec)
[oracle@standby admin]$ tnsping primary

TNS Ping Utility for Linux: Version 9.2.0.4.0 - Production on 16-AUG-2004 10:46:55

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
/opt/oracle/product/9.2.0/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.33.58)(PORT = 1521)))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = primary)))
OK (0 msec)

[oracle@eygle admin]$ tnsping primary

TNS Ping Utility for Linux: Version 9.2.0.4.0 - Production on 16-AUG-2004 10:10:01

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
/opt/oracle/product/9.2.0/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.33.58)(PORT = 1521))) 
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = primary)))
OK (50 msec)
[oracle@eygle admin]$ tnsping standby

TNS Ping Utility for Linux: Version 9.2.0.4.0 - Production on 16-AUG-2004 10:10:06

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
/opt/oracle/product/9.2.0/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.33.46)(PORT = 1521))) 
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = primary)))
OK (10 msec)

 

 

7.启动备用数据库

[oracle@eygle primary]$ hostname
eygle
[oracle@eygle primary]$ sqlplus "/ as sysdba" 
SQL*Plus: Release 9.2.0.4.0 - Production on Mon Aug 16 11:09:40 2004 
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 135337420 bytes
Fixed Size 452044 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
SQL> alter database mount standby database;

Database altered.

SQL> alter database recover managed standby database disconnect from session;

Database altered.

 

8.在主节点设置归档路径

SQL> alter system set log_archive_dest_2='service=standby mandatory reopen=60'; 
System altered. 

SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

SQL> 


在备用节点观察日志

[oracle@eygle bdump]$ tail -f alert_primary.log 
MRP0: Background Managed Standby Recovery process started 
Starting datafile 1 recovery in thread 1 sequence 90 
Datafile 1: '/opt/oracle/oradata/primary/system01.dbf' 
Starting datafile 2 recovery in thread 1 sequence 90 
Datafile 2: '/opt/oracle/oradata/primary/undotbs01.dbf' 
Starting datafile 3 recovery in thread 1 sequence 90 
Datafile 3: '/opt/oracle/oradata/primary/users01.dbf' 
Media Recovery Waiting for thread 1 seq# 90 
Mon Aug 16 11:10:50 2004 
Completed: alter database recover managed standby database di 
Mon Aug 16 11:13:34 2004 
Media Recovery Log /opt/oracle/oradata/primary/stdarch/1_90.dbf 
Media Recovery Waiting for thread 1 seq# 91 
Media Recovery Log /opt/oracle/oradata/primary/stdarch/1_91.dbf 
Media Recovery Waiting for thread 1 seq# 92 
Mon Aug 16 12:09:38 2004 
Media Recovery Log /opt/oracle/oradata/primary/stdarch/1_92.dbf

9.在主节点进行同样的配置,以便切换后继续日志传递

[oracle@standby oracle]$ ls
admin dictionary.ora initprimary.ora jre oradata oradata.tar oraInventory oui product soft stdcotrl.ctl

[oracle@standby oracle]$ cd oradata
[oracle@standby oradata]$ ls
primary
[oracle@standby oradata]$ cd primary/
[oracle@standby primary]$ ls
archive control02.ctl redo01.log redo03.log temp01.dbf 
users01.dbfcontrol01.ctl control03.ctl redo02.log system01.dbf 
undotbs01.dbf
[oracle@standby primary]$ mkdir stdarch
[oracle@standby primary]$ exit
exit

SQL> alter system set standby_archive_dest='/opt/oracle/oradata/primary/stdarch';

System altered.

 


10.停止主数据库,启用备用数据库

SQL> alter database commit to switchover to physical standby; 
Database altered.

SQL> shutdown immediate
ORA-01507: database not mounted


ORACLE instance shut down.

 


在备用模式启用主数据

SQL> startup nomount; 
ORACLE instance started. 
Total System Global Area 135337420 bytes
Fixed Size 452044 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
SQL> alter database mount standby database;

Database altered.


SQL> select name,open_mode,PROTECTION_MODE,DATABASE_ROLE from v$database;

NAME OPEN_MODE PROTECTION_MODE DATABASE_ROLE
--------- ---------- -------------------- ----------------
PRIMARY MOUNTED MAXIMUM PERFORMANCE PHYSICAL STANDBY


SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Database altered.

 


打开备用数据库

 

[oracle@eygle oracle]$ sqlplus "/ as sysdba"

 

SQL*Plus: Release 9.2.0.4.0 - Production on Mon Aug 16 12:11:11 2004

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL> alter database commit to switchover to primary;

Database altered.

SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 135337420 bytes
Fixed Size 452044 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> alter system switch logfile;

System altered.

 

在主库上观察日志应用情况

[oracle@standby bdump]$ tail -f alert_primary.log 
Starting datafile 2 recovery in thread 1 sequence 93 
Datafile 2: '/opt/oracle/oradata/primary/undotbs01.dbf' 
Starting datafile 3 recovery in thread 1 sequence 93 
Datafile 3: '/opt/oracle/oradata/primary/users01.dbf' 
Media Recovery Log /opt/oracle/product/9.2.0/dbs/arch1_93.dbf 
Mon Aug 16 15:08:43 2004 
Media Recovery Log /opt/oracle/oradata/primary/stdarch/1_94.dbf 
Media Recovery Waiting for thread 1 seq# 95 
Media Recovery Log /opt/oracle/oradata/primary/stdarch/1_95.dbf 
Media Recovery Waiting for thread 1 seq# 96
11.进行数据修改
SQL> create table t as select * from dba_users; Table created.

SQL> alter system switch logfile;

System altered.

 


在从库上以read only打开数据库,执行查询

 

SQL> select username from t;
select username from t
*
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only

 


SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Database altered.

SQL> ALTER DATABASE OPEN READ ONLY;

Database altered.

SQL> select username from t;

USERNAME
------------------------------
SYS
SYSTEM
DBSNMP
OUTLN
WMSYS

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;


Database altered.

SQL>

 

12.把数据库切换回到主节点

在主节点

SQL> alter database commit to switchover to physical standby;

Database altered.

SQL> shutdown immediate
ORA-01507: database not mounted


statORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 135337420 bytes
Fixed Size 452044 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes

SQL> alter database mount standby database;

Database altered.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Database altered.

 

在备用节点

SQL> alter database commit to switchover to primary;

Database altered.

SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 135337420 bytes
Fixed Size 452044 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.

 


完成自由切换





本文转自 baiying 51CTO博客,原文链接:http://blog.51cto.com/baiying/626702,如需转载请自行联系原作者
目录
相关文章
|
自然语言处理 关系型数据库 MySQL
免费的CMS系统有哪些?
内容管理系统(Content Management System,简称CMS) 是一种用于创建、编辑、组织和发布内容的软件系统。它提供了一个用户友好的界面,使用户可以轻松管理网站的内容,而无需具备编程或技术知识。 下面给大家介绍几款目前国内比较常用,而且发展历史比较长的免费CMS系统:
636 1
|
关系型数据库 测试技术 分布式数据库
PolarDB | PostgreSQL 高并发队列处理业务的数据库性能优化实践
在电商业务中可能涉及这样的场景, 由于有上下游关系的存在, 1、用户下单后, 上下游厂商会在自己系统中生成一笔订单记录并反馈给对方, 2、在收到反馈订单后, 本地会先缓存反馈的订单记录队列, 3、然后后台再从缓存取出订单并进行处理. 如果是高并发的处理, 因为大家都按一个顺序获取, 容易产生热点, 可能遇到取出队列遇到锁冲突瓶颈、IO扫描浪费、CPU计算浪费的瓶颈. 以及在清除已处理订单后, 索引版本未及时清理导致的回表版本判断带来的IO浪费和CPU运算浪费瓶颈等. 本文将给出“队列处理业务的数据库性能优化”优化方法和demo演示. 性能提升10到20倍.
1239 4
|
网络协议 网络架构 Windows
NDP 常用报文格式
【2月更文挑战第27天】
|
XML Java 关系型数据库
Maven实战从入门到精通(全)
目录前言1. 安装及配置2. 核心概念 前言 了解Maven的具体概念、功能、具体执行步骤以及如何搭建等 Maven 具体功能: maven 是自动化构建工具,可以部署项目;管理jar文件,自动下载jar、文档和源代码;管理jar直接的依赖以及版本;编译程序,把java编译为class;测试代码是否正确;打包文件,形成jar文件或者war文件 具体构建步骤: 构建是面向过程,主要步骤是 清理:把之前项目编译的东西删除掉,为新的编译代码做准备。 编译: 把程序源代码编译为执行代码, 把java编译成clas
847 0
Maven实战从入门到精通(全)
|
内存技术
音频格式G711转PCM的代码
音频格式G711转PCM的代码
672 0
IDEA好看的主题(自用)
IDEA好看的主题(自用)
286 0
|
JSON 前端开发 数据可视化
Apifox才是最强Postman替代品,看看国产软件到底有对牛!
著名 UI 设计软件 Figma 宣布制裁大疆! 近日,网上流传一份 Figma 发送给大疆的内部邮件。 启用国产软件势在必行!
Apifox才是最强Postman替代品,看看国产软件到底有对牛!
|
机器学习/深度学习 存储 达摩院
Python动物图像分割API简单调用实例演示,阿里达摩院视觉智能开放平台使用步骤
图像分割的目标是将图像中的像素分成不同的组或区域,使具有相似特征的像素属于同一组,从而实现目标对象的提取。常见的图像分割方法之一是语义分割(Semantic Segmentation)。 语义分割通过深度学习模型,如卷积神经网络(CNN),学习图像的特征表示,并生成像素级的分割结果。通常,语义分割使用全卷积网络(FCN)或其改进版本作为网络结构。编码器用于提取图像的特征表示,而解码器通过上采样操作将特征图还原到原始图像的尺寸,并生成分割结果。
588 0
|
JavaScript Android开发
uniapp 项目双屏异显插件使用方式
uniapp 项目双屏异显插件使用方式
1158 0
uniapp 项目双屏异显插件使用方式