密碼中的特殊字元

您可以在某些密碼中使用某些特殊字元。

如果您是從 8.0.0.1 或更早版本升級或移轉,請安裝 8.1 安裝伺服器,完成升級或移轉程序,然後更新密碼以使用特殊字元。

您可以在密碼中使用的特殊字元如下:
. + - [ ] * ~ _ @ # : ?
註: 不支援空格。

您可以在資料庫使用者密碼、資料庫綱目擁有者的作業系統帳戶,以及 IBM® WebSphere® Application Server 密碼中使用這些特殊字元。

如果在密碼中使用特殊字元,您必須以引號括住密碼。 請使用下列語法:
IBM Db2® 連線字串
若為 Db2 資料庫,當您在連線字串中提供密碼時,請使用下列語法:
在 Linux 或 AIX® 上,請使用 \' 括住密碼。例如:
clpplus -nw openpage/\'DB~Password\'@host:50000/opx
在 Windows 上,請使用單引號括住密碼:
clpplus -nw openpage/'DB~Password'@host:50000/opx
CLPPlus 中的 IBM Db2 Script 參數
若為 Db2 資料庫,當您在 Script 參數中提供密碼時,請使用下列語法:
在 Linux 或 AIX 上,使用下列其中一個選項:
  • 使用 \' 括住密碼。例如:
    clpplus -nw @sql-wrapper CustomIndexing_Step1_AddTextIndexing_to_DB.sql /tmp/log.log c6de0652985e 50000 OPX db2inst1 \'DB~Password\' openpage
  • 使用 \" 括住密碼:
    clpplus -nw @sql-wrapper CustomIndexing_Step1_AddTextIndexing_to_DB.sql /tmp/log.log c6de0652985e 50000 OPX db2inst1 \"DB~Password\" openpage
在 Windows 上,使用下列其中一個選項:
  • 使用 ' 括住密碼。例如:
    clpplus -nw @sql-wrapper CustomIndexing_Step1_AddTextIndexing_to_DB.sql /tmp/log.log jwinpages.swg.usma.ibm.com 50000 OPX db2admin 'DB~Password' openpage
  • 使用 \" 括住密碼:
    clpplus -nw @sql-wrapper CustomIndexing_Step1_AddTextIndexing_to_DB.sql /tmp/log.log jwinpages.swg.usma.ibm.com 50000 OPX db2admin \"DB~Password\" openpage
Db2 公用程式
執行 Db2 公用程式(例如 db2 connectdb2rbind)時,請不要使用引號括住密碼。
Oracle 連線字串
若為 Oracle 資料庫,當您在連線字串中提供密碼時,請使用 \" 括住密碼。例如:
sqlplus sys/\"DB~Password\"@op as sysdba
SQL*Plus 中的 Oracle Script 參數
若為 Oracle 資料庫,當您在 Script 參數中提供密碼時,請使用下列語法:
  • 在 Windows 上,請使用雙引號括住密碼。
    sqlplus /nolog @sql-wrapper.sql update-storage c:\temp\upd-storage-output.log op openpages "pass~word" LFS eng11 eng11 Windows c:\OpenPages\openpages-storage
  • 在 Linux 或 AIX 上,請使用單引號括住密碼。
    sqlplus /nolog @sql-wrapper.sql update-storage /home/op/upd-storage-output.log op openpages 'pass~word' LFS  aix11 aix11 Unix /usr/opdata/openpages-storage
安裝 Script、工具及公用程式
對於採用密碼作為參數的工具及公用程式,請使用下列語法:
  • 在 Windows 上,請使用雙引號括住密碼。
    op-validate-dba-install.bat "DB~Password"
  • 在 Linux 或 AIX 上,請使用單引號括住密碼。
    ./op-validate-dba-install.sh 'DB~Password'
內容檔中的密碼
對於 .env 檔案和 .properties 檔案,請不要使用任何引號括住密碼。
WebSphere 指令和公用程式
對於 WebSphere 指令和公用程式(例如 stopManagerstopServerstopAllServers 等),請在所有平台上以雙引號括住 WebSphere 密碼。
例如:
  • Windows:
    StopAllServers.cmd <username> "WAS~Password"
  • Linux 或 AIX:
    ./stopAllServers.sh <username> "WAS~Password"