JDBC query scripts

The scripting library provides many script procedures to manage Java™ Database Connectivity (JDBC) configurations in your environment. See the usage information for scripts that retrieve configuration IDs for your JDBC configuration. You can run each script individually or combine many procedures to create custom automation scripts for your environment.

Each AdminJDBC script procedure is located in the app_server_root/scriptLibraries/resources/JDBC/V70 directory.

從第 7 版開始,Jython Script 程式庫提供了伺服器範圍的 JDBC 提供者、JMS 資源和資源提供者的 Script 功能。 您可以撰寫自己的自訂 Script 來配置 Cell、節點或叢集層次的資源。
避免困難 避免困難: 請勿編輯 Script 程式庫中的 Script 程序。 如果要撰寫自訂 Script 程式庫程序,請利用 app_server_root/scriptLibraries 目錄中的 Script 作為 Jython 語法範例。請將自訂 Script 儲存在新的子目錄中,以免改寫程式庫。gotcha
Fast path: 從第 Fix Pack 5 開始,Jython Script 程式庫提供了 Cell、節點、伺服器或叢集範圍的 JDBC 提供者、JMS 資源和資源提供者的 Script 功能。 資源提供者包括郵件提供者、URL 提供者和資源環境提供者。 您不需要撰寫特定範圍的自訂 Script 來配置資源。
Use the following script procedures to query your JDBC configuration:

listDataSources

This script displays a list of configuration IDs for the data sources in your configuration.

No input arguments are required for the script. However, you can specify a data source name to return a specific configuration id, as defined in the following table:
Table 1. listDataSources script. Run the script to list data sources.
Argument Description
dsName Optionally specifies the name of the data source of interest.

Syntax

AdminJDBC.listDataSources(dsName)

Example usage

AdminJDBC.listDataSources()
AdminJDBC.listDataSources("myDataSource")

listDataSourceTemplates

This script displays a list of configuration IDs for the data source templates in your environment.

No input arguments are required for the script. However, you can specify a template name to return a specific configuration id, as defined in the following table:
Table 2. listDataSourceTemplates script. Run the script to list data source templates.
Argument Description
templateName Optionally specifies the name of the template of interest.

Syntax

AdminJDBC.listDataSourceTemplates(templateName)

Example usage

AdminJDBC.listDataSourceTemplates()
AdminJDBC.listDataSourceTemplates("Derby JDBC Driver DataSource")

listJDBCProviders

This script displays a list of configuration IDs for the JDBC providers in your environment.

No input arguments are required for the script. However, you can specify a JDBC provider name to return a specific configuration id, as defined in the following table:
Table 3. listJDBCProviders script. Run the script to list JDBC providers.
Argument Description
jdbcName Optionally specifies the name of the JDBC provider of interest.

Syntax

AdminJDBC.listJDBCProviders(jdbcName)

Example usage

AdminJDBC.listJDBCProviders()
AdminJDBC.listJDBCProviders("myJDBCProvider")

listJDBCProviderTemplates

This script displays a list of configuration IDs for the JDBC provider templates in your environment.

No input arguments are required for the script. However, you can specify a template name to return a specific configuration id, as defined in the following table:
Table 4. listJDBCProviderTemplates script. Run the script to list JDBC provider templates.
Argument Description
templateName Optionally specifies the name of the template of interest.

Syntax

AdminJDBC.listJDBCProviderTemplates(templateName)

Example usage

AdminJDBC.listJDBCProviderTemplates()
AdminJDBC.listJDBCProviderTemplates("Derby JDBC Provider")

指出主題類型的圖示 參照主題



時間戳記圖示 前次更新: July 9, 2016 11:14
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rxml_7adminjdbc2
檔名:rxml_7adminjdbc2.html