SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jul 2005
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    LoadRunner with MSSQL

    I worte a client which directly call the MSSQL server's store procedure(For example, test(@p1)). And I used the Siebel MSSQL prototol to record the script, then replayed it.I could see the script was working fine through querying the database. In the Controller I found the transaction succeed.But there are some errors in both VU and Controller.
    It's something like
    "The test(@p1) need @p1 but it's not provided"
    I ensure the script working and the table has been updated.
    Then I check the script line by line:


    lrd_init(&InitInfo, DBTypeVersion);
    lrd_open_context(&Ctx1, LRD_DBTYPE_ODBC, 0, 0, 0);
    lrd_open_context(&Ctx2, LRD_DBTYPE_ODBC, 0, 0, 0);
    lrd_db_option(0, OT_ODBC_CP_OFF, 0, 0);
    lrd_alloc_connection(&Con1, LRD_DBTYPE_ODBC, Ctx2, 0 /*Unused*/, 0);
    lrd_db_option(Con1, OT_ODBC_LOGIN_TIMEOUT, (void FAR const *)120, 0);
    lrd_open_connection(&Con1, LRD_DBTYPE_ODBC, "", lr_decrypt("453f1797e"), "", lr_decrypt
    ("453f1797ebb8c63fd3c2e4f33648b2ed3190947eae7ec144 "
    "b470087b9378b4a701f78e1578492837f384d29314a2afc6d 52499cef6b7"
    "4a66e8ca142ddb45a7d236aacf98536a193c3fa02a003d813 ac16fba5724"
    "32b4174b4410a471d55869c2c920bc6e22f05b36"), Ctx2, 1, 0);
    lrd_alloc_connection(&Con2, LRD_DBTYPE_ODBC, Ctx2, 0 /*Unused*/, 0);
    lrd_db_option(Con2, OT_ODBC_LOGIN_TIMEOUT, (void FAR const *)120, 0);
    lrd_open_connection(&Con2, LRD_DBTYPE_ODBC, "", lr_decrypt("453f1797e"), "", lr_decrypt
    ("453f1797ebb8c63fd3c2e4f33648b2ed3190947eae7ec144 "
    "b470087b937fbabd14e7800a715f3f7ed0a8e495329f8a8fc e22c3f29aa3"
    "204fbac51223d71283b927c7d8f5477e0f3535d6326823964 edc13bb5932"
    "50b2765b330cde61d54e69d3cd4e8a2731e15339"), Ctx2, 1, 0);
    lrd_open_cursor(&Csr1, Con1, 0);
    lrd_db_option(Csr1, OT_ODBC_QUERY_TIMEOUT, (void FAR const *)30, 0);
    lrd_stmt(Csr1, "A_Insert_Monitor_Request", -1, 1, 0 /*None*/, 1);
    lrd_cancel(0, Csr1, 0 /*Unused*/, 0);
    lrd_db_option(Csr1, OT_ODBC_CURSOR_CLOSE, 0, 0);
    lrd_db_option(Csr1, OT_ODBC_CURSOR_CLOSE, 0, 0);
    lrd_assign(&_1_D1, "4", 0, 0, 0);
    lrd_bind_placeholder(Csr1, "1", &_1_D1, LRD_BIND_FOR_INPUT_ONLY, 0);
    lrd_stmt(Csr1, "{ call A_Insert_Monitor_Request(?) }", -1, 1, 0 /*None*/, 0);
    lrd_result_set(Csr1, 0, 0, 0);
    lrd_db_option(Csr1, OT_ODBC_CURSOR_CLOSE, 0, 0);
    lrd_cancel(0, Csr1, 0 /*Unused*/, 0);
    lrd_close_cursor(&Csr1, 0);

    I found there are two lrd_stmt functions and the second one is doing what I want the script to do. The first one is the reason why the result show the error and I don't know what's the mean. Why the function has been called twice?

    Any help will be very appreciated!

  2. #2
    Moderator
    Join Date
    Aug 2001
    Location
    NC
    Posts
    6,018
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: LoadRunner with MSSQL

    Ask yourself some questions
    <ul type="square">[*] Why did I choose "Siebel MSSQL" when I just wanted to connect to "MSSQL?"[*] My two submitted statements, "A_Insert_Monitor_Request" and "{ call A_Insert_Monitor_Request(?) }", are non identical. Is this an artifact of the methods used to develop the custom client? If I were to place a "sniffer" inline would I see the client also make two requests?[*] If this is my first tme venturing into two tier client server, do I need training or to work with a mentor who has "been there and done that" previously?[/list]
    James Pulley

    Replace ineffective offshore contracts, LoadRunnerByTheHour. Starting @ $19.95/hr USD.

    Put us to the test, skilled expertise is less expensive than you might imagine.

    Twitter: @LoadRunnerBTH @PerfBytes

  3. #3
    Member
    Join Date
    Jul 2005
    Posts
    31
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: LoadRunner with MSSQL

    Hi James
    Thank you for your reply!

    1 To be honest, I don't know what protocol I should choose.So I tried some according to my understanding of protocol.When I choose "Siebel MSSQL", The script worked fine and the data in database had been updated.Am I not right?
    2 Could you please tell me the difference between "A_Insert_Monitor_Request" and "{ call A_Insert_Monitor_Request(?) }". I checked the help file but I did not understand.In help file, it says that lrd_stmt "Sets an SQL statement to be processed". Just set?When excuted? Which command corresponding?
    3 I don't know who I can ask for help.

    I'm new to performance testing. Sorry for my unclear expression.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:51 PM.

Copyright BetaSoft Inc.