weblogic命令行操作

啟動和停止子節點:

[root@oud bin]# cd /sotware/oracle_ldap/Middleware/user_projects/domains/base_domain/bin/
[root@oud bin]# ./startManagedWebLogic.sh Server-0 http://192.168.63.129:7001 -Dweblogic.management.username=weblogic -Dweblogic.management.password=weblogic123 -Dweblogic.system.StoreBootIdentity=true
.
.
JAVA Memory arguments: -Xms256m -Xmx512m  -XX:MaxPermSize=512m
.
WLS Start Mode=Production
.
CLASSPATH=/sotware/oracle_ldap/Middleware/oracle_common/modules/oracle.jdbc_11.1.1/ojdbc6dms.jar:/sotware/oracle_ldap/Middleware/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/sotware/oracle_ldap/Middleware/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/java/jdk1.7.0_76/lib/tools.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/weblogic.jar:/sotware/oracle_ldap/Middleware/modules/features/weblogic.server.modules_10.3.6.0.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/webservices.jar:/sotware/oracle_ldap/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/sotware/oracle_ldap/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/sotware/oracle_ldap/Middleware/oracle_common/modules/oracle.jrf_11.1.1/jrf.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/xqrl.jar:.:/usr/java/jdk1.7.0_76/lib/dt.jar:/usr/java/jdk1.7.0_76/lib/tools.jar
.
PATH=/sotware/oracle_ldap/Middleware/wlserver_10.3/server/bin:/sotware/oracle_ldap/Middleware/modules/org.apache.ant_1.7.1/bin:/usr/java/jdk1.7.0_76/jre/bin:/usr/java/jdk1.7.0_76/bin:/usr/lib64/qt-3.3/bin:/root/perl5/bin:/usr/local/sbin:/usr/java/jdk1.7.0_76/bin:/usr/bin:/bin:/usr/sbin:/sbin:[root@oud bin]# ./stopManagedWebLogic.sh Server-0  t3://192.168.63.129:7001
Stopping Weblogic Server...Initializing WebLogic Scripting Tool (WLST) ...Welcome to WebLogic Server Administration Scripting ShellType help() for help on available commandsConnecting to t3://192.168.63.129:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.Warning: An insecure protocol was used to connect to the 
server. To ensure on-the-wire security, the SSL port or 
Admin port should be used instead.Shutting down the server Server-0 with force=false while connected to AdminServer ...Exiting WebLogic Scripting Tool.Done
Stopping Derby Server...

第一次時會在節點下的security里會生成個boot.properties文件,會保存賬戶密碼,可以通過下面命令找到這個文件

- Dweblogic.system.BootIdentityFile=/weblogic/user_projects/domains/test_domain/servers/AdminServer/security/boot.properties  

weblogic.Deployer命令
基于weblogic.Deployer可以進行應用部署相關操作。

java [ SSL參數 ] weblogic.Deployer [ 連接參數 ] [ 用戶憑據參數 ] COMMAND-NAME  命令選項  [ Common Arguments ]

SSL參數
java [-Dweblogic.security.TrustKeyStore = DemoTrust]?
? ? ?[-Dweblogic.security.JavaStandardTrustKeyStorePassPhrase = password]?
? ? ?[-Dweblogic.security.CustomTrustKeyStoreFileName = filename?
? ? ? ?-Dweblogic.security.TrustKeystoreType = jks?
? ? ? ?[-Dweblogic.security.CustomTrustKeyStorePassPhrase = password]?
? ? ?]?
? ? ?[ -Dweblogic.security.SSL.hostnameVerifier = classname]?
? ? ?[-Dweblogic.security.SSL.ignoreHostnameVerification = true]?
weblogic.Deployer?
? ? ?[ 用戶憑據參數 ]?
? ? ? COMMAND-NAME ?命令參數?
?

-Dweblogic.security.TrustKeyStore = DemoTrust

導致weblogic.Deployer證明信任密鑰庫(WL_HOME\server\lib\DemoTrust.jks)中的CA證書信任。

如果要連接的服務器實例正在使用演示身份和證書,則此參數是必需的。

默認情況下,weblogic.Deployer僅信任Java標準信任密鑰庫(SDK_HOME\jre\lib\security\cacerts)中的CA證書。
?

-Dweblogic.security.JavaStandardTrustKeyStorePassPhrase = 密碼

用于保護Java Standard Trust密鑰庫的密碼。

如果Java Standard Trust密鑰庫受密碼保護,并且如果要信任其CA證書,則必須使用此參數。

默認情況下,Java Standard Trust密鑰庫不受密碼保護。

-Dweblogic.security.CustomTrustKeyStoreFileName = filename  
-Dweblogic.security.TrustKeystoreType = jks
導致weblogic.Deployer在位于文件名的自定義密鑰庫中信任CA證書。您必須使用這兩個參數來信任自定義密鑰庫。該文件名完全匹配,必須ServerMBean.CustomTrustKeyStoreFileName在堅持價值config.xml;?如果屬性中指定的值CustomTrustKeyStoreFileName是相對路徑名,則還必須在此參數中指定相同的相對路徑名
-Dweblogic.security.CustomTrustKeyStorePassPhrase = 密碼

用于保護自定義密鑰庫的密碼。

只有在自定義密鑰庫受密碼保護的情況下,才必須使用此參數

-Dweblogic.security.SSL.hostnameVerifier = classname
自定義主機名驗證者類的名稱。該類必須實現該weblogic.security.SSL.HostnameVerifier接口。
-Dweblogic.security.SSL.ignoreHostnameVerification =真
禁用主機名驗證。

連接參數

java [ SSL參數 ] weblogic.Deployer?
? ? ?[-adminurl protocol:// listen_address:port_number ]?
? ? ?[ 用戶憑據參數 ] COMMAND-NAME ?命令選項 [ Common Arguments ]
大多數weblogic.Deployer命令要求您指定-adminurl中所描述的參數連接到管理服務器實例

-adminurl [ protocol://] Admin-Server-listen-address:listen-port 

監聽管理服務器的地址和監聽端口。

要使用不受SSL保護的端口,格式為-adminurl [protocol]Admin-Server-listen-address:port其中t3,http,iiop,和iiops有效的協議。

為了使用具有HTTP協議的管理員,必須在WebLogic Server管理控制臺中啟用HTTP隧道選項。有關詳細信息,請參閱在Oracle WebLogic Server的管理服務器環境中設置WebLogic Server進行HTTP隧道。有關啟用在WebLogic Server管理控制臺HTTP隧道的說明,請參閱配置HTTP協議中的Oracle WebLogic Server管理控制臺聯機幫助。

要使用由SSL保護的端口,格式是-adminurl?secure-protocol://Admin-Server-listen-address:port哪里t3s并且https是有效的安全協議。

要通過配置的管理通道連接到管理服務器,您必須指定有效的管理端口號:?-adminurl?secure-protocol://Admin-Server-listen-address:domain-wide-admin-port

此參數沒有默認值。

用戶證書參數
java [ SSL參數 ] weblogic.Deployer [ 連接參數 ]?
? ? ?[{-username username [-password password ]} |?
? ? ?[-userconfigfile config-file [-userkeyfile admin-key ]]]
? ? ? COMMAND-NAME ?command-options [ Common Arguments ]
大多數weblogic.Deployer命令要求您提供WebLogic Server管理員的用戶憑據。

-username 用戶名 
管理員用戶名。如果您提供該-username選項但不提供相應的-password選項,則weblogic.Deployer提示您輸入密碼。
-password 密碼 

管理員用戶的密碼。

為了避免在腳本或進程實用程序中顯示純文本密碼,例如ps首先使用WebLogic Sc??ripting Tool(WLST)storeUserConfig命令在配置文件中存儲用戶名和加密密碼,如WLST“WebLogic Server命令參考”中所述。省略-username和-password選項以weblogic.Deployer使用存儲在默認配置文件中的值。

如果要使用特定的配置文件和密鑰文件,而不是默認文件,請使用-userconfigfile和-userkeyfile選項weblogic.Deployer。

-userconfigfile 配置文件 
用于管理用戶名和密碼的用戶配置文件的位置。使用此選項,而不是-user和-password選項,在自動化腳本或者在你不希望有密碼屏幕上或進程級實用工具,如所示的情況ps。在指定-userconfigfile屬性之前,必須首先使用WebLogic腳本工具(WLST)storeUserConfig命令生成文件,如WLST“WebLogic Server命令參考”中所述。
-userkeyfile admin-key 
指定用戶密鑰文件用于加密和解密用戶配置文件(-userconfigfile選項)中存儲的用戶名和密碼信息的位置。在指定-userkeyfile屬性之前,必須首先使用WebLogic腳本工具(WLST)storeUserConfig命令生成文件,如WLST“WebLogic Server命令參考”中所述。


?

幫助及示例命令
#查看weblogic.Deployer幫助
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -help

#查看weblogic.Deployer更多參數

[root@oud bin]# java -cp /sotware/oracle_ldap/Middleware/wlserver_10.3/server/lib/weblogic.jar weblogic.Deployer -advanced
Usage: java weblogic.Deployer [options] [action] [Deployment units(s)]where options include:-help             Print the standard usage message.            -version          Print version information.                   -adminurl <<protocol>://<server>:<port>> [option] Administration     server URL: default t3://localhost:7001      -username <username> [option] user name                           -password <password> [option] password for the user               -userconfigfile <userconfigfile> [option] The user config file       contains the user security credentials; it   is administered by the weblogic.Admin tool   -userkeyfile <keyConfigFile> [option] The users key file; it is      administered by the weblogic.Admin tool.     -distribute       [action] Distribute application to the       targets.                                     -start            [action] Makes an already distributed        application available on a target.           -stop             [action] Makes an application unavailable on targets.                                     -redeploy         [action] Replace a running application       partially or entirely.                       -undeploy         [action] Take an application out of service. -deploy           [action] Make an application available for   service.                                     -update           [action] Update an application configuration in place.                                    -cancel           [action] Attempts to cancel the task <id> if it is has not yet completed.                 -list             [action] Lists the target status of each     task <id>.                                   -listtask         [action] Lists the target status of each     task <id>.                                   -listapps         [action] Lists all the deployed applications in the domain.                               -purgetasks       Flush out deployment tasks that are retired  java weblogic.Deployer -adminurl url         -username username -password password        -purgetasks                                  -examples         [option] Displays example usage of this tool.-name <application name> [option] Defaults to the basename of the    deployment file or directory.                -targets <<target(s)>> [option] A comma separated list of targets   for the current operation. If not specified, all configured targets are used. For a new   application, the default target is the       administration server.                       -plan <Deployment plan path> [option] Specifies location of          deployment plan                              -library          [option] Indicates that the unit being       deployed is a library. This option is        required when the application is a library.  -verbose          Displays additional status during the        deployment process, 
including notifications when the application is prepared and activated on each target.                    -output <raw>     [deprecated option] raw|formatted            -debug            [option] Displays debug level messages to    the standard output.                         -upload           [option] Causes the specified source file(s) to be transferred to the administration      server. This is used when the Deployer tools is not being used on the same machine as the administration server or the user does not   otherwise have access to place the targeted  files on the administration server.          -delete_files     [option] Causes the server to remove the     files that are specified in the file list    and leave the application activated. This    option is valid only for unarchived Web      applications.                                -remote           [option] Indicates that the tool is not      running on the same machine as the admin     server and the "-source" path is the actual  path on the server. By default, this tool    assumes any "-source" path to be valid on    the local machine. In that case, the         "-upload" option must be used if the tool    needs to copy the application over to the    admin server.                                -nostage          [option] This application will not be staged and deployed from the source location. When  specified, the application must be available at the location provided in the "-source"    option on all target servers. Default:       "nostage" for admin server and "stage" for   managed server targets.                      -external_stage   [option] Indicates that the user wants to    copy the application in the server staging   area externally or using a third-party tool. When specified, WebLogic Server looks for    the application under "StagingDirectoryName  (of target server)/applicationName".         -stage            [option] Indicates that the application      needs to be copied into the target server    staging area before deployment. Default:     "nostage" for admin server and "stage" for   managed server targets.                      -nowait           [option] Once the action is initiated, the   tool prints the task ID and exits. This is   used to initiate multiple tasks and then     monitor them later using the -list action.   -timeout <seconds> [option] The maximum time in seconds to wait for the completion of the deployment task.   When the time expires, the current status is printed and the program exits.               -deploymentorder <deployment order> [option] The deployment order    for the application.                         -source <archive file or directory> [option] Location of the file    source.                                      -altappdd <File Path> [option] Location of the alternate           application deployment descriptor on the     admin server.                                -altwlsappdd <File Path> [option] Location of the alternate WebLogic application deployment descriptor on the     admin server.                                -appversion <application version> [option] The version identifier of the application. If not specified, the       currently active version of the application  is assumed.                                  -planversion <deployment plan version> [option] The version          identifier of the deployment plan. If not    specified, the currently active version of   the applications deployment plan is assumed. -noversion        Notifies the deployment system that this     application has no version associated with   it, and thus the version checks on the       source of the application are no performed.  -retiretimeout <The retirement timeout in seconds> [option] The      retirement timeout in seconds for timeout    retirement policy. If not specified,         graceful retirement policy is assumed.       -id <task identifier> [option] Optional client supplied unique     identifier for the deployment task.          -adminmode        [option] The administration mode. If not     specified, production mode is assumed.       -graceful         [option] Graceful shutdown. If not           specified, force shutdown is assumed.        -ignoresessions   [option] Ignore pending HTTP sessions during graceful shutdown. Can be used with          -graceful option only. Default is false.     -rmigraceperiod <The RMI grace period in seconds> [option] Grace     period for RMI requests during graceful      shutdown. Can be used with -graceful option  only. Default is no grace period.            -allversions      [option] Force undeploy all application      versions irrespective of in-flight work. Can be used with -allversions option only.       Default is false.                            -submoduletargets <submod@mod-jms.xml@target | submoduleName@target> [option] SubModule level targets for JMS Modules.-securityModel <DDOnly|CustomRoles|CustomRolesAndPolicies|Advanced> [option] Security model to be used for this deployment.-enableSecurityValidation [option] Enables validation of security    data.                                        -libspecver <library specification version> [option] Specifies the   specification version of the library, if it  is not present in the manifest. Requires the -library option.                             -libimplver <library implementation version> [option] Specifies the  implementation version of the library, if it is not present in the manifest. Requires the -library option.                             -usenonexclusivelock [option] Used to indicate the deployment     operation will utilize an existing lock on   the domain already acquired by the same      user. This is useful when the user is        employing multiple deployment tools          simultaneously and one of them has acquired  a lock on the domain configuration.          -advanced         Print advanced usage options.                The optional trailing arguments are deployment units and may 
represent the archive being deployed, the name of a previously 
deployed application or a list of files for a partial redeploy operation.

#查看weblogic.Deployer使用例子
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -examples
?web應用操作命令
查看部署web應用命令
#查看部署的web應用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 ?-listtask
?啟動web應用命令? 停止web應用命令
#停止web應用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-11 -stop -adminmode

默認情況下,WebLogic Server立即停止應用程序,而不考慮掛起的HTTP會話或進程內工作。如果要等待待處理的HTTP會話來完成工作,然后停止應用程序到客戶端請求并將其置于管理模式下,請添加以下?-graceful?選項
#停止web應用前處理完請求
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-11 -stop -adminmode ?-graceful

如果沒有使用該 -appversion 選項顯式指定應用程序版本,則該 -stop 命令將僅停止應用程序的活動版本。如果還有其他版本的應用程序,您也想停止(或者你想停止代替或活動版本),您必須使用該 -appversion 選項指定它們。
要重新啟動先前已停止的應用程序,使其可用于外部客戶端,請使用該-start命令并指定部署名稱。您不需要重新部署已停止的應用程序來使其普遍可用:
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-11 -start

?war包操作命令
?部署war包命令
#部署war包并啟動web應用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-12 -deploy ${war_path} -targets Server-1
?重新部署war命令
#重新部署war包并啟動web應用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-12 -redeploy
?更新部署war包命令
#更新部署war包并啟動web應用
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-12 -redeploy -source ${war_one_path}
?更新部署war服務器命令
#更新部署war的服務器(多個服務用英文逗號分隔),此舊服務器服務不會停
java -cp ${wls_jar_dir}/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password 12345678 -name hi-12 -redeploy -targets Server-2

將新應用程序或獨立模塊部署到域中的服務器后,部署名稱將與您選擇的部署文件保持關聯。即使在所有服務器上停止部署后,仍可使用WebLogic Server管理控制臺或weblogic.Deployer實用程序重新部署文件。

如果要從域中刪除部署名稱及其關聯的部署文件,則必須明確取消部署應用程序或獨立模塊。要從域中取消部署部署單位weblogic.Deployer,請指定以下-undeploy命令:

java weblogic.Deployer -adminurl http:// localhost:7001 -user weblogic
? ?-password weblogic -name mymodule -undeploy

使用?-undeploy?不帶?-targets?和?-submoduletargets?標志的命令可以完全從所有WebLogic Server實例中刪除應用程序或獨立模塊,并對所有JMS子模塊資源進行目標定位。

取消部署部署單元不會刪除用于部署的原始源文件。它僅從域中刪除部署的配置,以及WebLogic Server在部署期間創建的任何部署文件(例如,使用階段部署模式復制的文件和上傳到管理服務器的文件

cd /app/war/;mv console.war /app/war/warbak/console/console.war`date +"%Y%m%d-%H%M%S"`;cd /app/war/remote/;mv console.war /app/war/;chown -R weblogic:weblogic /app/war/*;source /etc/profile;java -Djava.security.egd=file:/dev/./urandom -Xms512M -Xmx1024M  -cp /app/weblogic/oralce_home/wlserver/server/lib/weblogic.jar  weblogic.Deployer -adminurl t3://10.246.152.133:7001 -username weblogic -password TestSiam#20210419 -deploy -name console -targets console -source /app/war/console.warsource /etc/profile;java -Djava.security.egd=file:/dev/./urandom -Xms512M -Xmx1024M  -cp /app/weblogic/oracle_home/wlserver/server/lib/weblogic.jar  weblogic.Deployer -adminurl t3://10.246.152.110:7001 -username weblogic -password TestSiam#20210419 -undeploy -name console -targets console;kill -9 `ps -ef |grep /app/weblogic/oracle_home |grep -v grep`
WLS_HOME='*'
username='*'
password='*'
#shengli
#password='*'RESULT=$(/app/jdk1.7.0_76/bin/java -cp ${WLS_HOME}/lib/weblogic.jar weblogic.Admin -adminurl ${url} -username ${username}  -password ${password} GET -pretty -type ServerRuntime -property OverallHealthState |grep -i OverallHealthState |grep HEALTH_WARN |wc -l

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

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

相關文章

Ansible系列--Copy模塊

copy模塊 copy模塊在ansible里的角色就是把ansible執行機器上的文件拷貝到遠程節點上。 與fetch模塊相反的操作 常用參數 參數名是否必須默認值選項說明srcno 用于定位ansible執行的機器上的文件&#xff0c;需要絕對路徑。如果拷貝的是文件夾&#xff0c;那么文件夾會整體…

ANSIBLE--handlers的概念

handlers可以理解成另一種tasks&#xff0c;handlers是另一種’任務列表’&#xff0c;handlers中的任務會被tasks中的任務進行”調用”&#xff0c;但是&#xff0c;被”調用”并不意味著一定會執行&#xff0c;只有當tasks中的任務”真正執行”以后&#xff08;真正的進行實際…

ansible--- tags

tags可以幫助我們對任務進行’打標簽’的操作&#xff0c;當任務存在標簽以后&#xff0c;我們就可以在執行playbook時&#xff0c;借助標簽&#xff0c;指定執行哪些任務&#xff0c;或者指定不執行哪些任務。在實際的使用中&#xff0c;我們應該讓tags的值能夠見名知義。 當…

ANSIBLE---變量

注冊變量 ansible的模塊在運行之后&#xff0c;其實都會返回一些”返回值”&#xff0c;只是默認情況下&#xff0c;這些”返回值”并不會顯示而已&#xff0c;我們可以把這些返回值寫入到某個變量中&#xff0c;這樣我們就能夠通過引用對應的變量從而獲取到這些返回值了&…

inux中限制用戶進程CPU和內存占用率

#!/bin/sh PIDStop -bn 1 | grep "^ *[1-9]" | awk { if($9 > 50 || $10 > 25 && id -u $2 > 500) print $1} echo $PIDS for PID in $PIDS dorenice 10 $PIDecho "renice 10 $PID" done

按月拆分數據庫表--oracle

生產有一張日志表&#xff0c;數據量很大&#xff0c;需要按月進行存儲&#xff0c;存儲過程如下&#xff1a; CREATE OR REPLACE PROCEDURE NEWLOG4_SUB_TABLE IStable_name1 VARCHAR2(50);create_table_sql VARCHAR2(4000);insert_data_sql VARC…

plsql定時器

Oralce中的任務有2種&#xff1a;Job和Dbms_job&#xff0c;兩者的區別有&#xff1a; 1&#xff0e; jobs是oracle數據庫的對象&#xff0c; dbms_jobs只是jobs對象的一個實例&#xff0c; 就像對于tables&#xff0c; emp和dept都是表的實例。 2&#xff0e; 創建方式也有…

PL/SQL批處理語句:BULK COLLECT 和 FORALL

PL/SQL程序中運行SQL語句是存在開銷的&#xff0c;因為SQL語句是要提交給SQL引擎處理&#xff0c;這種在PL/SQL引擎和SQL引擎之間的控制轉移叫做上下文卻換&#xff0c;每次卻換時&#xff0c;都有額外的開銷 請看下圖&#xff1a; 但是&#xff0c;FORALL和BULK COLLEC…

oracle 中DATETIME與TIMESTAMP區別

1.DATETIME的日期范圍是1001——9999年&#xff0c;TIMESTAMP的時間范圍是1970——2038年。 2.DATETIME存儲時間與時區無關&#xff0c;TIMESTAMP存儲時間與時區有關&#xff0c;顯示的值也依賴于時區。在mysql服務器&#xff0c;操作系統以及客戶端連接都有時區的設置。 3.DAT…

PARALLEL(并行)

在Oracle中&#xff0c;PARALLEL&#xff08;并行&#xff09;方式最大化調用計算機資源來成倍提高數據分析效率。 1&#xff0e; 用途 強行啟用并行度來執行當前SQL。這個在Oracle 9i之后的版本可以使用&#xff0c;之前的版本現在沒有環境進行測試。也就是說&#xff0c;加…

Oracle數據庫查詢優化

1.對查詢進行優化&#xff0c;應盡量避免全表掃描&#xff0c;首先應考慮在 where 及 order by 涉及的列上建立索引。 2.應盡量避免在 where 子句中對字段進行 null 值判斷&#xff0c;否則將導致引擎放棄使用索引而進行全表掃描&#xff0c;如&#xff1a; select id from t w…

redis-full-check

https://github.com/alibaba/RedisFullCheck/releases redis-full-check是阿里云Redis&MongoDB團隊開源的用于校驗2個redis數據是否一致的工具。 ??redis-full-check通過全量對比源端和目的端的redis中的數據的方式來進行數據校驗&#xff0c;其比較方式通過多輪次比較&a…

2021-06-22

服務器信息 [rootiZs7z01dz0z12dyttz9zn5Z cluster]# /app/redis/redis-3.2.1/src/redis-cli -c -h 10.252.120.9 -p 8003 10.252.120.9:8003> cluster nodes b1f543d646c5c97a70b0635439a44a72f8a143b1 10.252.120.10:8004 master - 0 1624349601417 7 connected 0-5460 1…

Docker目錄掛載

Docker容器啟動的時候&#xff0c;如果要掛載宿主機的一個目錄&#xff0c;可以用-v參數指定。 譬如我要啟動一個centos容器&#xff0c;宿主機的/test目錄掛載到容器的/soft目錄&#xff0c;可通過以下方式指定&#xff1a; # docker run -it -v /test:/soft centos /bin/ba…

Redis主從復制原理學習

Redis主從復制原理學習總結 - 運維筆記 和Mysql主從復制的原因一樣&#xff0c;Redis雖然讀取寫入的速度都特別快&#xff0c;但是也會產生讀壓力特別大的情況。為了分擔讀壓力&#xff0c;Redis支持主從復制&#xff0c;Redis的主從結構可以采用一主多從或者級聯結構&#xff…

redis數據恢復

公司線上一個項目數據存儲采用MySQL&#xff0c;共分為10個庫&#xff0c;分布在4臺機器上&#xff0c;每個庫數據量約為10G&#xff0c;各機器均采用RAID5加速磁盤訪問&#xff1b; 當同時在線人數達高峰期&#xff08;10w&#xff09;&#xff0c;DB磁盤IO壓力巨大&#xff0…

Redis哨兵模式(sentinel)學習總結及部署記錄(主從復制、讀寫分離、主從切換)

Redis的集群方案大致有三種&#xff1a;1&#xff09;redis cluster集群方案&#xff1b;2&#xff09;master/slave主從方案&#xff1b;3&#xff09;哨兵模式來進行主從替換以及故障恢復。 一、sentinel哨兵模式介紹 Sentinel(哨兵)是用于監控redis集群中Master狀態的工具&…

Redis之Redis內存模型

Redis是目前最火爆的內存數據庫之一&#xff0c;通過在內存中讀寫數據&#xff0c;大大提高了讀寫速度&#xff0c;可以說Redis是實現網站高并發不可或缺的一部分。 我們使用Redis時&#xff0c;會接觸Redis的5種對象類型&#xff08;字符串、哈希、列表、集合、有序集合&…

MySQL 數據庫誤刪除后的數據恢復操作說明

在日常運維工作中&#xff0c;對mysql數據庫的備份是萬分重要的&#xff0c;以防在數據庫表丟失或損壞情況出現&#xff0c;可以及時恢復數據。 線上數據庫備份場景&#xff1a; 每周日執行一次全量備份&#xff0c;然后每天下午1點執行MySQLdump增量備份. 下面對這種備份方案…

MySQL 之binlog日志說明及利用binlog日志恢復數據操作記錄

眾所周知&#xff0c;binlog日志對于mysql數據庫來說是十分重要的。在數據丟失的緊急情況下&#xff0c;我們往往會想到用binlog日志功能進行數據恢復&#xff08;定時全備份binlog日志恢復增量數據部分&#xff09;&#xff0c;化險為夷&#xff01; 一、簡單了解binlog MySQ…