设为首页 收藏本站
查看: 671|回复: 0

[经验分享] IBM SPSS Modeler 配置使用 DashDB 数据库

[复制链接]

尚未签到

发表于 2015-10-4 09:39:11 | 显示全部楼层 |阅读模式
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 valuethat 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 DataSource 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.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-122419-1-1.html 上篇帖子: IBM JDK 垃圾收集及内存管理机制(转) 下篇帖子: IBM服务器“水货”大揭密
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表