Method R Discussion GroupMethod R helps developers, DBAs, and decision-makers optimize Oracle-based software in every phase of the software life cycle. |
||
Discuss Method R products, techniques, and events. Ask new questions or post your own responses. |
This question was asked recently:
After opening one session and setting it up to capture the statisics (@hcaptureon), I then opened another session and tried to run the do script. I'm getting these error messages from the output of @do. What's the problem? SQL> @do Enter .sql file name (without extension): timec_needs_subm2 Enter the workspace name : needs_subm Enter the scenario name : subm2 Display results of SQL (ON/OFF)? : OFF Load trace files (Y/N)? : N Enter value for htst_scenario_id: subm2 SP2-0640: Not connected SP2-0641: "EXECUTE" requires connection to server Enter value for htst_scenario_id: subm2 SP2-0640: Not connected SP2-0641: "EXECUTE" requires connection to server SP2-0640: Not connected SP2-0641: "EXECUTE" requires connection to server SP2-0640: Not connected SP2-0641: "EXECUTE" requires connection to server SP2-0640: Not connected SP2-0640: Not connected SP2-0641: "EXECUTE" requires connection to server SP2-0640: Not connected SP2-0641: "EXECUTE" requires connection to server SP2-0640: Not connected SP2-0640: Not connected SP2-0640: Not connected SP2-0641: "EXECUTE" requires connection to server SP2-0640: Not connected SP2-0640: Not connected SP2-0641: "EXECUTE" requires connection to server SP2-0734: unknown command beginning "SP2-0640: ..." - rest of line ignored. SP2-0640: Not connected ANSWER: The solution in this case was that @hconfig had not been executed to configure the harness for that user. In order for database connections to be made properly, @do relies upon the configuration information set up by executing @hconfig. If it has not been previously executed, you must do so before attempting to run @do. So, execute @hconfig and fill in all the prompts similiar to the following: SQL> @hconfig Test Harness Configuration Options Setup ======================================== Enter a value for each prompt or press ENTER to accept the default Enter Harness User : OP Enter Harness User Password : OP Enter Database Instance : ORA10R2 Enter SQL*Plus HOST command (host,!,$): host Enter OS erase command (erase,del,rm) : rm Enter the full path and executable program name for your preferred editor. The entry should be enclosed in single quotes. For example: 'C:\Program Files\Cool Editor v4\cooledit.exe' Enter Preferred Editor : 'vi' Once that is complete, try to connect manually as follows: SQL> connect <your id>/<your password>@<your instance> also manually connect as follows: SQL> connect <your id>/<your password> If you get any error on these connections, you need to find out why you can't connect this way. It could be a problem with an environment variable (ORACLE_SID) not being set with the instance name correctly. Only you, and perhaps you'll need to enlist a DBA if you aren't one, will be able to resolve this issue...it's not a harness thing. The harness, however, must be able to connect using one of these formats in order for things to work properly. If one of the above connect strings works, but the other doesn't, then you can edit the do.sql script to make it use the one that works for you. There are several places in the do.sql script where you'll find 2 lines as follows: @hconnect &hotsos_testharness_user/&hotsos_testharness_passwd@&HOTSOS_TESTHARNESS_INSTANCE rem @hconnect &hotsos_testharness_user/&hotsos_testharness_passwd One line is commented out (rem). Simply comment out (or delete) the one that doesn't work and leave the one that does. You'll find these two lines 3 times in do.sql. Change all 3. After you make the change, try to run @do again. |
Powered by FogBugz