zoukankan      html  css  js  c++  java
  • Jmeter连接数据库

    连接 SQL Server 2012 AlwaysOn:
     
    1.在jmeter的lib文件夹下,加入对应的jar包:sqljdbc4.jar(下文附有下载地址)
    2. 在“测试计划”中添加线程组,在“线程组”中添加JDBC Connection Configuration
    配置如下:

    数据库连接配置可参照如下(表格官网可见

    java.net.ConnectException

    DatabaseDriver classDatabase URL
    MySQL com.mysql.jdbc.Driver jdbc:mysql://host[:port]/dbname
    PostgreSQL org.postgresql.Driver jdbc:postgresql:{dbname}
    Oracle oracle.jdbc.OracleDriver jdbc:oracle:thin:@//host:port/service OR
    jdbc:oracle:thin:@(description=(address=(host={mc-name})(protocol=tcp)(port={port-no}))(connect_data=(sid={sid})))
    Ingres (2006) ingres.jdbc.IngresDriver jdbc:ingres://host:port/db[;attr=value]
    SQL Server (MS JDBC driver) com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc:sqlserver://host:port;DatabaseName=dbname
    Apache Derby org.apache.derby.jdbc.ClientDriver jdbc:derby://server[:port]/databaseName[;URLAttributes=value[;…]]
    3.在“线程组”中添加JDBC Request
    配置如下:

    4.添加CSV文件

     

    4.运行,可能会报错

    错误为:没有为集成身份验证配置驱动程序  

    原因是:C:Windows  下缺少了sqljdbc_auth.dll文件

    下载sqljdbc_auth.dll,并放到C:Windows  下,重新启动,再次运行Ok。

    注意:64位系统用X64中的,32位系统用x86中的

    下载地址https://yunpan.cn/c6M7VbVCKJiu4  访问密码 1c01(内附sqljdbc_auth.dll及sqljdbc4.jar)

  • 相关阅读:
    Sicily shortest path in unweighted graph
    Sicily connect components in undirected graph
    Sicily 1931. 卡片游戏
    Sicily 1021. Couples
    c++ 高效文本读写
    Sicily 1129. ISBN
    Sicily 1133. SPAM
    Sicily 1282. Computer Game
    小工具?不,这是小工具的集合!
    .Net Core建站(4):FTP发布项目及连接服务器数据库
  • 原文地址:https://www.cnblogs.com/zh26/p/5737613.html
Copyright © 2011-2022 走看看