码迷,mamicode.com
首页 > 数据库 > 详细

IBM SPSS Modeler 配置使用 DashDB 数据库

时间:2015-07-08 18:34:24      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:

Create:

1 Register a IBM id and log in IBM Bluemix. https://console.ng.bluemix.net
2 Go to "DASHBOARD" and create a space.
3 Find  ADD A SERVICE OR API and click. Choose dashDB and create database.

Connect:
1  Launch the dashDB database and you can load data and so on.
2  Choose Connect ->  Connect Setting. there are some parameters needed.
3 download driver package first and install, and refer this link to install:

http://www-01.ibm.com/support/knowledgecenter/SS6NHC/com.ibm.swg.im.dashdb.doc/connecting/connect_driver_package.html
 

From a command prompt, enter the following commands. These commands create new entries in the driver configuration file (db2dsdriver.cfg) on your computer and set the connection attributes. You need to do this step only one time.
NOTE: the "db2cli" is located in folder "bin"

        For a connection without SSL:
        db2cli writecfg add -database BLUDB -host hostname -port 50000
        db2cli writecfg add -dsn alias -database BLUDB -host hostname -port 50000

        For a connection with SSL:
        db2cli writecfg add -database BLUDB -host hostname -port 50001
        db2cli writecfg add -dsn alias -database BLUDB -host hostname -port 50001
        db2cli writecfg add -database BLUDB -host hostname -port 50001 -parameter "SecurityTransportMode=SSL"

    where:
    hostname
        The host name of the dashDB database that you obtained from the Connect > Connection Settings page.
    alias
        The name for an alias that you want to use to establish the connection. Choose a name that is meaningful to you; for example, analytics.

    Optional: To test the connection to the dashDB database, run this command from the command prompt:
    db2cli validate -dsn alias -connect -user userid -passwd password

    where:
    alias
        The name of the alias that you created with the db2cli writecfg command in step 1
    userid
        Your dashDB user ID.
    password
        The password that you use to connect to dashDB.
Please refer:  http://www-01.ibm.com/support/knowledgecenter/SS6NHC/com.ibm.swg.im.dashdb.doc/connecting/connect_connecting_cli_and_odbc_applications.html

The file db2dsdriver.cfg is located in C:\ProgramData\IBM\DB2\IBMDBCL1\cfg  in windows, ./dsdriver/cfg in linux.


In Windows:
Use the ODBC Data Source Administrator window to add an ODBC data source name (DSN) for the dashDB database:
        On the User DSN tab, click Add.
        On the Create New Data Source window, select the driver that is named IBM DB2 ODBC DRIVER and click Finish.
In the ODBC IBM Driver - Add window, enter a data source name (usually the name of the database you are connecting to), and click Add.
From the CLI/ODBC Settings window, on the Data Source tab, enter the user ID and password by using the ODBC DSN settings for your database that are provided in the Connect your applications to the database page.

On the Advanced Settings page, for each of the following parameters, click Add to open the Add CLI Parameter window to begin the step, and click OK to return to the Advanced Settings page:
    Select the Database parameter, then click OK to open the CLI/ODBC Settings window. In the Pending Value field, enter the database name value that you noted from the Set Up > Connect Applications page.
    Select the Hostname parameter, then click OK to open the CLI/ODBC Settings window. In the Pending Value field, enter the host name value that you noted from the Set Up > Connect Applications page.
    Select the Port parameter, then click OK to open the CLI/ODBC Settings window. In the Pending Value field, enter the port number value that you noted from the Set Up > Connect Applications page.
    Select the Protocol parameter, then click OK to open the CLI/ODBC Settings window. Select TCP/IP.


Click OK to return to the ODBC Data Source Administrator window.
On the User DSN tab, select the data source name, then click Configure.
On the CLI/ODBC Settings window, click Connect to test the connection.
    If the connection is successful, click OK to return to the ODBC Data Source Administrator window, and then click OK to exit the window.
    If the connection is not successful, note and correct any errors before you test the connection again.
Refer:http://www-01.ibm.com/support/knowledgecenter/SS6NHC/com.ibm.swg.im.dashdb.doc/connecting/connect_connecting_spss_statistics.html

 

In linux

After the steps above,  enter <Modeler Server>/bin directory, run below command to create symbol link for libspssodbc_db2cli.so:
    # rm -f libspssodbc.so
    # ln -s libspssodbc_db2cli.so libspssodbc.so

Then edit the modelersrv.sh and add db2profile file:
    . /<dashdb driver>/db2profile
NOTE: there is a space between . and /


Now you can start modeler server and test it.

IBM SPSS Modeler 配置使用 DashDB 数据库

标签:

原文地址:http://www.cnblogs.com/shnj/p/4630730.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!