db_name,instance_name,service_names,db_domain,dbid,oracle_sid等區別與聯系

最近整理了一篇文章:oracle listener 有網友對數據庫是否顯式設置了instance_name和service_names提出疑問。

由此引發出db_name,instance_name,oracle_sid等等這些常見的參數都代表什么意思,怎么取值的,有什么區別?

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
PL/SQL Release 11.2.0.3.0 - Production
CORE??? 11.2.0.3.0????? Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

SQL> show parameter name

NAME???????????????????????????????? TYPE??????? VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert???????????? string
db_name?????????????????????????????? string?????? ORCL
db_unique_name??????????????????? string?????? ORCL
global_names???????????????????????? boolean??? FALSE
instance_name?????????????????????? string?????? ORCL
lock_name_space?????????????????? string
log_file_name_convert????????????? string
processor_group_name??????????? string
service_names??????????????????????? string?????? ORCL

看到這么多參數,但是服務器參數(spfile)中僅僅設置了db_name那么其它的name比如db_unique_name,instance_name,service_names的值是怎么出來的?

官方是這樣說的:When an Oracle instance starts, it reads initialization parameters from an initialization parameter file. This file must at a minimum specify the DB_NAME parameter. All otherparameters have default values.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------

SQL> create pfile='/u01/pfile.ora' from spfile;

File created.

[oracle@resoft u01]$ vi pfile.ora

ORCL.__db_cache_size=243269632
ORCL.__java_pool_size=4194304
ORCL.__large_pool_size=4194304
ORCL.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
ORCL.__pga_aggregate_target=293601280
ORCL.__sga_target=553648128
ORCL.__shared_io_pool_size=0
ORCL.__shared_pool_size=289406976
ORCL.__streams_pool_size=4194304
*.audit_file_dest='/u01/app/oracle/admin/ORCL/adump'
*.audit_trail='DB','EXTENDED'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/ORCL/control01.ctl','/u01/app/oracle/fast_recovery_area/ORCL/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='ORCL'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4322230272
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
*.memory_target=847249408
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'

各種name或者id的解釋:--括弧內中文名稱是我們一致認為比較合理的翻譯,但是如果想準確的表達,請直接說英文名稱,不要去翻譯,以免造成誤解。

db_name(數據庫名)

Property??????????????????????????????????????????????? Description
Parameter type????????????????????????????????????? String
Syntax????????????????????????????????????????????????? DB_NAME = database_name
Default value????????????????????????????????????????? There is no default value.
Modifiable????????????????????????????????????????????? No
Basic??????????????????????????????????????????????????? Yes
Oracle RAC?????????????????????????????????????????? You must set this parameter for every instance. Multiple instances must have the same value, or the same value must be

???????????????????????????????????????????????????????????? specified in the STARTUP OPEN SQL*Plus command or the ALTER DATABASE MOUNT SQL statement.

DB_NAME must be set to a text string of no more than eight characters. During database creation, the name provided for DB_NAME is recorded in the datafiles, redo log files, and control file of the database. If during database instance startup the value of the DB_NAME parameter (in the parameter file) and the database name in the control file are different, the database does not start.

db_name必須是一個不超過8個字符的文本串。在數據庫創建過程中,db_name被記錄在數據文件,日志文件和控制文件中。如果數據庫實例啟動過程中參數文件中的db_name和控制文件中的db_name名稱不一樣,則數據庫不能啟動。db_name是最具有穩定意義的參數,官網說不能修改,修改后會導致數據庫不能啟動。

DB_NAME 也就是數據庫的名字標示。這里,數據庫里可能有多個實例,比如RAC里的多節點,這多個節點是不同的實例,但是卻有相同的名字,他們的 DB_NAME是相同的但是Instance_name是不同的。DB_NAME會保持在數據文件頭里,所以更改DB_NAME不能僅僅修改parameter,還需要用nid 來進行更改,并且更改后還需要手工做些工作,是其生效。

db_unique_name(數據庫唯一名)

Property??????????????????????????????????????????????? Description
Parameter type????????????????????????????????????? String
Syntax????????????????????????????????????????????????? DB_UNIQUE_NAME = database_unique_name
Default value??????????????????????????????????????? ? Database instances: the value of DB_NAME
??????????????????????????????????????????????????????????? Automatic Storage Management instances: +ASM
Modifiable????????????????????????????????????????????? No
Basic??????????????????????????????????????????????????? Yes
Oracle RAC?????????????????????????????????????????? Multiple instances must have the same value.

DB_UNIQUE_NAME specifies a globally unique name for the database. Databases with the same DB_NAME within the same DB_DOMAIN (for example, copies of a database created for reporting or a physical standby) must have a unique DB_UNIQUE_NAME. Every database's DB_UNIQUE_NAME must be unique within the enterprise. The value of DB_UNIQUE_NAME can be up to 30 characters and is case insensitive. The following characters are valid in a database name: alphanumeric characters, underscore (_), number sign (#), and dollar sign ($)?? --E文不好,翻譯還不如看原版。

DB_UNIQUE_NAME這在另一個HA的應用,Dataguard會經常提及的,和DB_NAME不一樣的作用,在DG里,要求物理DG,主從庫都有一樣的DB_NAME,雖然他們和RAC不一樣,并不是同一個庫。這里是數據庫的唯一名字。但是他們的DB_UNIQUE_NAME是不一樣的,用以進行不同的標示。DB_UNQUIE_NAME的會影響到Service_names,也會影響到動態監聽的時候的service_name

比如如下片段
Service "zxdbdg1" has 1 instance(s).
Instance "zxdb", status BLOCKED, has 1 handler(s) for this service...
Service "zxdbdg1_XPT" has 1 instance(s).
Instance "zxdb", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
這里的zxdbdg1就是dg中的從庫。從庫的db_name和主庫保持一樣為zxdb,DB_UNIQUE_NAME不同。在動態監聽后,注冊為
zxdbdg1的service,啟動的instance_name還是zxdb
Instance_name簡單講就是ORACLE_SID,oracle里通過ORSCLE_SID來管理不同的數據庫實例。
另,
上面的動態監聽信息里出現了Instance "zxdb", status BLOCKED
這里是因為我的從庫數據庫不是open狀態。

instance_name (數據庫實例名)

Property????????????????????????????????????????????????????????????????? Description
Parameter type??????????????????????????????????????????????????????? String
Syntax??????????????????????????????????????????????????????????????????? INSTANCE_NAME = instance_id
Default value??????????????????????????????????????????????????????????? The instance's SID
????????????????????????????????????????????????????????????????????????????? Note: The SID identifies the instance's shared memory on a host, but
????????????????????????????????????????????????????????????????????????????? may not uniquely distinguish this instance from other instances.
Modifiable??????????????????????????????????????????????????????????????? No
Range of values?????????????????????????????????????????????????????? Any alphanumeric characters and the underscore (_) character
Basic????????????????????????????????????????????????????????????????????? No

In a Real Application Clusters environment, multiple instances can be associated with a single database service. Clients can override Oracle's connection load balancing by

In a single-instance database system, the instance name is usually the same as the database namespecifying a particular instance by which to connect to the database. INSTANCE_NAME specifies the unique name of this instance.

用于和操作系統之間的聯系,用于對外部連接時使用。在操作系統中要取得與數據庫之間的交互,必須使用數據庫實例名。該值允許修改,但一般設置與數據庫名相同即可

INSTANCE_NAME 的默認值就是oracle SID。 一般跟數據庫庫名稱相同,也可以不相同。

服務器參數spfile中沒有設置instance_name,所以取默認值oracle_sid,我這里sid 為ORCL 所以instance_name=ORCL

oracle_sid(數據庫實例名)

SID的全稱為site identifier,Oracle_SID則為Oracle site identifier.

Unix/Linux查看oralce_sid: export $oracle_sid? 或者直接查看環境變量文件 more .bash_profile

下面引用Tom(Thomas Kyte)的一段話來解釋Oracle_SID

If you’re unfamiliar with the term SID or ORACLE_SID, a full definition is called for. The SID is a site identifier. It and ORACLE_HOME (where the Oracle software is installed) are hashed together in UNIX to create a unique key name for attaching an SGA. If your ORACLE_SID or ORACLE_HOME is not set correctly, you’ll get the ORACLE NOT AVAILABLE error, since you can’t attach to a shared memory segment that is identified by this unique key. On Windows, shared memory isn’t used in the same fashion as UNIX, but the SID is still important. You can have more than one database on the same ORACLE_HOME, so you need a way to uniquely identify each one, along with their configuration files.

即:在Unix/Linux系統中,SID和ORACLE_HOME在一起哈希后得到一個唯一的值作為SGA的key。

當oracle實例啟動時,在操作系統上的fork進程則根據Oracle_SID來創建相關后臺進程。

Oracle 11g 支持Oracle_SID的長度為12位,db_name的長度為8位

作用:

用于區別同一臺主機上不同的Oracle實例

決定實例所啟動后臺進程的名稱。(實例由SGA和后臺進程組成)

決定了參數文件的名稱。如spfile<ORACLE_SID>.ora,init<ORACLE_SID>.ora

決定后臺進程產生的相關跟蹤文件、日志文件等。

如alert_<ORACLE_SID>.log,<ORACLE_SID>_arc1_<spid>.trc,<SID>_ora_<SPID>.trc

同一主機上不同的$ORACLE_HOME,可以創建相同的ORACLE_SID

由此可以得出

ORACLE_HOME相同時,可以使用不同的ORACLE_SID

ORACLE_HOME不同時,可以使用相同的ORACLE_SID

[oracle@RESOFT~]$ export ORACLE_SID=orcl --設定ORACLE_SID為orcl

SQL> ho ps -ef | grep oracle???????? --ORACLE_SID參與了后臺進程命名

oracle 3272 1 0 09:46 ? 00:00:00 ora_pmon_orcl

oracle 3274 1 0 09:46 ? 00:00:00 ora_psp0_orcl

oracle 3276 1 1 09:46 ? 00:00:00 ora_mman_orcl

oracle 3278 1 0 09:46 ? 00:00:00 ora_dbw0_orcl

oracle 3280 1 0 09:46 ? 00:00:00 ora_lgwr_orcl

oracle 3282 1 0 09:46 ? 00:00:00 ora_ckpt_orcl

oracle 3284 1 0 09:46 ? 00:00:00 ora_smon_orcl

---------............部分結果省略.............. --------------

dbid(數據庫id)

An internal, uniquely generated number that differentiates databases. Oracle creates this number automatically when you create the database.

DBID 可以看成是db_name在數據庫內部的表示。 DBID是在創建數據庫時,用db_name 結合一種算法來創建的。 具體用什么算法,不太清楚。它存在與數據文件和控制文件,用于表示數據文件的歸屬。 所以這個DBID 是唯一的。 對于不同的數據庫,DBID 是不同的,但是db_name 有可能相同。

用身份證打個比方: 可以有同名的人,但是它的省份證號碼肯定是不同的。

查看DBID:

SQL> select dbid from v$database;

DBID

----------

1318255748

global_names (全局數據庫名)

Property?????????????????????????????????????????????????????????????????? Description
Parameter type???????????????????????????????????????????????????????? Boolean
Default value???????????????????????????????????????????????????????????? false
Modifiable???????????????????????????????????????????????????????????????? ALTER SESSION, ALTER SYSTEM
Range of values???????????????????????????????????????????????????????? true | false
Basic??????????????????????????????????????????????????????????????????????? No

GLOBAL_NAMES specifies whether a database link is required to have the same name as the database to which it connect.

If the value of GLOBAL_NAMES is false, then no check is performed. If you use or plan to use distributed processing, then Oracle recommends that you set this parameter to true to ensure the use of consistent naming conventions for databases and links in a networked environment.

Global_names 是一個布爾值,global_names的作用是創建db link時是否強制使用遠程數據庫的global_name,如果global_names=true,則db link name必須要求是remote database的global_name,否則創建之后db link 不能連同,缺省值是false。多用于分布式系統。

global_name命名規則= db_name+[db_domain]

也就是由db_name.db_domain構成。

查看Global_name:

SQL> SELECT * FROM GLOBAL_NAME;

GLOBAL_NAME

--------------------------------------------------------------------------------

RACDB

我們可以修改GLOBAL_NAME. 如:

ALTER DATABASE RENAME GLOBAL_NAME TO sales.us.example.com;

db_domain(數據庫域名)

Property??????????????????????????????????????????????????????????????????????????? Description
Parameter type????????????????????????????????????????????????????????????????? String
Syntax????????????????????????????????????????????????????????????????????????????? DB_DOMAIN = domain_name
Default value????????????????????????????????????????????????????????????????????? There is no default value.
Modifiable????????????????????????????????????????????????????????????????????????? No
Range of values???????????????????????????????????????????????????????????????? Any legal string of name components, separated by periods and up to

??????????????????????????????????????????????????????????????????????????????????????? 128 characters long (including the periods). This value cannot be NULL.
Basic??????????????????????????????????????????????????????????????????????????????? Yes
Oracle RAC?????????????????????????????????????????????????????????????????????? You must set this parameter for every instance, and multiple instances must have the same value.

In a distributed database system, DB_DOMAIN specifies the logical location of the database within the network structure. You should set this parameter if this database is or ever will be part of a distributed system. The value consists of the extension components of a global database name, consisting of valid identifiers (any alphanumeric ASCII characters), separated by periods. Oracle recommends that you specify DB_DOMAIN as a unique string for all databases in a domain.

This parameter allows one department to create a database without worrying that it might have the same name as a database created by another department. If one sales department's DB_DOMAIN is JAPAN.ACME.COM, then their SALES database (SALES.JAPAN.ACME.COM) is uniquely distinguished from another database with DB_NAME = SALES but with DB_DOMAIN = US.ACME.COM

If you omit the domains from the name of a database link, Oracle expands the name by qualifying the database with the domain of your local database as it currently exists in the data dictionary, and then stores the link name in the data dictionary. The characters valid in a database domain name are: alphanumeric characters, underscore (_), and number sign (#)

通常用于分布式數據庫系統中標識一個數據庫的邏輯位置。為數據定義一個域,該參數作為Global_names的一部分,即在不同的域中可以使用相同的數據庫名稱,該參數缺省情況下位空,在RAC環境中需要為每一個實例指定該值,且多實例具有相同的值

SQL> show parameter db_domain

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

db_domain string

service_names(數據庫服務名)

Property??????????????????????????????????????????????????????????????????????? Description
Parameter type????????????????????????????????????????????????????????????? String
Syntax????????????????????????????????????????????????????????????????????????? SERVICE_NAMES =db_service_name [, db_service_name [ ... ] ]
Default value????????????????????????????????????????????????????????????????? DB_UNIQUE_NAME.DB_DOMAIN if defined
Modifiable????????????????????????????????????????????????????????????????????? ALTER SYSTEM
Range of values????????????????????????????????????????????????????????????? Any ASCII string or comma-separated list of string names
Basic???????????????????????????????????????????????????????????????????????????? No
Oracle RAC??????????????????????????????????????????????????????????????????? Do not set the SERVICE_NAMES parameter for Oracle RAC
???????????????????????????????????????????????????????????????????????????????????? environments. Instead, define services using Oracle Enterprise?
???????????????????????????????????????????????????????????????????????????????????? Manager and manage those services using Server Control (SRVCTL) utility

SERVICE_NAMES specifies one or more names by which clients can connect to the instance. The instance registers its service names with the listener. When a client requests a service, the listener determines which instances offer the requested service and routes the client to the appropriate instance.

You can specify multiple service names in order to distinguish among different uses of the same database. For example:
SERVICE_NAMES = sales.acme.com, widgetsales.acme.com

You can also use service names to identify a single service that is available from two different databases through the use of replication.

If you do not qualify the names in this parameter with a domain, Oracle qualifies them with the value of the DB_DOMAIN parameter. If DB_DOMAIN is not specified, then no domain will be applied to the non-qualified SERVICE_NAMES values.

service_names 在tnsnames.ora中用的最多。

service_names=DB_UNIQUE_NAME.DB_DOMAIN

我的環境中db_unique_name,db_domanin都沒有設置,而db_unique_name在單實例下默認值為:db_name = ORCL

所以service_names=ORCL

這也就解釋了剛開始提出的問題:沒有在spfile中設置instance_name,service_names 但是動態注冊時怎么發生的?

總結:

DB 相關的: DBID, ORCLE_SID

PFILE中的參數:DB_NAME,DB_DOMAIN, INSTANCE_NAME,

DB_UNIQUE_NAME,SERVICE_NAMES,

GLOBAL_NAME,GLOBAL_NAMES

Listener.ora中參數:

SID_NAME,GLOBAL_DBNAME

Tnsnames.ora中參數:

SERVICE_NAME,SID

轉載于:https://www.cnblogs.com/AlbertCQY/archive/2013/04/05/3000987.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:
http://www.pswp.cn/news/376750.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/376750.shtml
英文地址,請注明出處:http://en.pswp.cn/news/376750.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

檢測版本更新

如果我們要檢測app版本的更新&#xff0c;那么我們必須獲取當前運行app版本的版本信息和appstore 上發布的最新版本的信息。 當前運行版本信息可以通過info.plist文件中的bundle version中獲取&#xff1a; [cpp] view plaincopy NSDictionary *infoDic [[NSBundle mainBundle…

linux 啟動/關閉多個py腳本

后臺運行腳本 需求&#xff1a;很多時候我們會在 linux 服務器上執行 python 腳本&#xff0c;然而腳本程序執行的時間可能比較長&#xff0c;當耗時過長的情況下&#xff0c;我們使用 ssh 遠程登錄到 linux 服務器上容易造成超時自動斷開連接&#xff0c;當用戶注銷時&#x…

在熟練使用2B鉛筆前,請不要打開Axure

在互聯網產品領域&#xff0c;Axure已成為產品經理、產品設計師以及交互設計師的必備工具&#xff0c;從某種程度講&#xff0c;Axure幫助我們建立低保真模型&#xff0c;便于與用戶的需求驗證&#xff0c;也幫助我們構思交互細節&#xff0c;使前端和開發人員更容易理解我們的…

啟用isqlplus

iSQL*Plus是sqlplus基于web方式發布的&#xff0c;要使用它只要在服務器上開啟即可&#xff1a; [oraclelocalhost ~]$ isqlplusctl start perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE (unset), LC_ALL (unset)…

YUI 的模塊信息配置優先級關系梳理

背景 YUI的配置參數較多&#xff0c; 可以在好幾個地方配置一個module的相關信息&#xff0c; 如&#xff1a; //在全局配置&#xff0c; 所以YUI實例共享 YUI_config {modules: {w-autcomplete: {requires: [module1],path: test1.js,}},groups: {modules: {w-autocomplete: …

echarts 怎么知道鼠標點擊的哪根柱子

有個需求&#xff0c;點擊柱子&#xff0c;然后得到該柱子的信息&#xff0c;然后展示這個機房的時序圖。 第一步卡住了&#xff0c;就是不知道如何獲取柱子的序號。后參考&#xff1a;https://blog.csdn.net/zt_fucker/article/details/72461572?utm_sourceblogxgwz1 得到思路…

Oracle經典sql語句總結@sql-plus重點函數串講與sql語句案例@中文排序詳講).doc

1.經典的select sql語句 //注意&#xff1a;包含空值的數學表達式求出的結果為空值 SQL> select salcomm from emp; //連接員工編號與員工姓名這兩個字段 SQL> select empno||ename as "員工編號和員工姓名" from emp; //查詢去掉重復行的員工部門編號 SQL>…

C++模板簡單分析與舉例

C模板簡單分析與舉例 #pragma once #include <iostream> /*/ C 模板 /*/ /* --- 函數模板 --- */ /// 聲明 template <typename T1, typename T2> void TFunc(T1, T2); /// 一般定義 template <typename T1, typename T2> void TFunc(T1, T2) { std::cout &l…

flash builder4.7 for Mac升級AIRSDK詳解

使用flash builder 打包ANE時或者打包ipa時候常常會遇到AIRSDK版本低的問題&#xff0c;然而flash builder4.7默認使用的AIRSDK是3.4而flash builder4.7 中 Flex SDK中默認的AIRSDK是3.1,大家可能有疑問怎么有二個AIRSDK。我的理解是Flex SDK中的AIRSDK是低版本&#xff0c;低版…

echarts formatter鼠標懸停顯示信息

由于echarts中柱狀圖&#xff0c;鼠標放上去默認顯示的是x軸名稱以及y軸值。 而我現在需要再添加一些顯示信息。 下面是操作&#xff1a; 在tooltip對象中補充trigger: “axis”,屬性&#xff0c;然后再設置formatter。 tooltip : {formatter: function (params) {// do some …

codeforces 261 D

題目鏈接&#xff1a; 解題報告&#xff1a;給出一個序列a1,a2,a3.........an&#xff0c;f(i , j ,x) ak 等于x的個數(i < k < j)&#xff0c;令i < j&#xff0c;求有多少對 i 和 j 使得 f(1,i,ai) > f(j,n,aj)。 從左往右掃一遍這個序列&#xff0c;num1[i] 等于…

javascript下漢字和Unicode編碼互轉代碼

近日在為網站做一資料功能&#xff0c;這些顯示在頁面上面的文字數據都是存放在js文件裏面的&#xff0c;由於這些js文件裏面的中文都是經過unicode編碼的&#xff0c;頁面上顯示是沒有問題的&#xff0c;問題是我做的網站是繁體中文&#xff0c;而js文件裏面的中文數據是簡體中…

python 線程異步執行踩坑

有個需求&#xff0c;一個線程在得到n個數據之后&#xff0c;異步地執行一個子線程函數&#xff0c;在子線程函數中完成數據庫的打開、寫入數據、關閉操作。在子線程函數返回前父線程先返回結果。 在此之前&#xff0c;先導入我們需要的模塊&#xff1a; from concurrent.futu…

關于window.history.back()后退問題

Windows下的window.history.back()后退后返回的不僅僅是前一個頁而是前一個頁的狀態。假設一個頁我改動了3次那必須后退3次才干回到前一個頁。并且數據庫中刪除的數據依舊顯示在上面感覺很的不有用。 解決的方法&#xff1a;history.back()后再加一個reload()這樣就能夠回到刷新…

每日英語:Smog Levels in Hong Kong Hit Highs

Hong Kong’s pollution levels hit nearly decade-level highs this week, sending locals scurrying inside and obscuring the city’s skyline behind a blanket of white. scurry&#xff1a;急跑&#xff0c;急趕    In the city’s central business district, road…

轉載 | pymysql.err.InterfaceError: (0, ‘‘)解決辦法

導致這個錯誤的原因是通過pymysql連接MySQL&#xff0c;沒有關閉連接的操作&#xff0c;所以短時間內不會出問題&#xff0c;長時間保持這個連接會出現連接混亂。雖然看著自己的代碼沒錯&#xff0c;還是會報 pymysql.err.InterfaceError: (0, ‘’)錯誤。所以這個連接要么連上…

不使用物理引擎,自己動手做真實物理的模擬投籃游戲

最近打算做一個2D投籃游戲&#xff0c;由于對于BOX2D等物理引擎并不熟悉&#xff0c;加之一開始低估了游戲所需要的碰撞檢測復雜度&#xff0c;認為僅僅涉及4面墻&#xff0c;籃球&#xff0c;籃板&#xff0c;籃筐&#xff0c;籃網的碰撞檢測并不復雜。因此決定自己實現所需要…

GoldenGate DDL雙向復制

繼續上一篇的實驗。 節點說明&#xff1a; dd1(源庫)--->>kf2(目標庫) dd1(目標庫)<<---kf2(源庫) 在配置反向復制過程中&#xff0c;可暫時把源庫和目標庫調換位置&#xff0c;配置基本上雷同。 但在官網上有說明要注意的一個地方&#xff1a; Do ei…

轉載|pymysql.err.InternalError: Packet sequence number wrong - got 45 expected 0

原文鏈接&#xff1a;https://www.cnblogs.com/heiao10duan/p/9373237.html 原因&#xff1a; 使用了多線程&#xff0c;多線程共享了同一個數據庫連接&#xff0c;但每個execute前沒有加上互斥鎖 方法&#xff1a; 方法一&#xff1a;每個execute前加上互斥鎖 lock.acquire…

JSF入門

1. 簡介 JSF技術是Sun公司在2004年發布的用于開發Web應用的框架。當前版本是2.2&#xff0c;由JSR344規范定義。它是Java EE 7推薦的Web標準框架。Mojarra(https://javaserverfaces.java.net/)是Oracle官方采用的JSF的參考實現&#xff0c;其他的參考實現還有Apache基金的MyFac…