Set to zero to allow unlimited execution. Timeout Syntax: timeout= Description: Specifies the timeout of your query in seconds. Default: shortnames=true Note: To emulate the output format of the dbquery command from DB Connect 1.x.x, set the output to csv and shortnames to true. Set the shortnames argument to true to return fields called. Shortnames Syntax: shortnames= Description: By default, the returned fields will be in the TABLE> form. Example:The values of actor_id and actor_name are defined in params="3,BOB", which is 3 and BOB respectively.ĭbxquery query="select * from actor where actor_id > ? and actor_name = ?" connection="mysql" params="3,BOB"Īnother example for using stored procedure, 150 and BOB are the values for the variables in the procedure sakila.test_procedure.ĭbxquery procedure="" connection="mysql" params="150,BOB" The space character is not skipped inside the quotation marks. Note: The value of params="BOB" is different from params=" BOB". The value of the params is in CSV format. Params Syntax: params="string1,string2" Description: The value(s) of the variable(s) you defined in query or procedure. In this case, you should experiment with setting maxrows to a lower number that is manageable by your Splunk Enterprise server hardware. There is no maximum value for this argument, but retrieving a very large number of records may result in performance issues or out-of-memory messages. If you do not specify a value for maxrows, dbxquery returns 100,000 rows at most. Maxrows Syntax: maxrows= Description: The maximum number of rows to return. The maximum value for this option is 10,000. Depending on the RPC server's maximum heap size and whether the target database table contains any unusually large columns, you may want to specify a smaller value for this argument. This argument specifies how many rows are in each of those pieces. To avoid running out of memory, the query result set is divided into multiple pieces and returned to DB Connect one piece at a time. SELECT * FROM ACT WHERE ACTNO Description: The number of rows to return at a time from the database. Stored procedure example (IBM DB2 for Linux) CREATE OR REPLACE PROCEDURE TEST_IBMSP (IN actor_id varchar(30))ĭECLARE result_set CURSOR WITH RETURN TO CLIENT FOR See the IBM DB2 for Linux stored procedure example below for details.
0 Comments
Leave a Reply. |