on 06-09-2017 3:56 PM
Using HANA 1.00 or 2.00.
If the feature exists, please let know which version or SP to use of HANA.
Consider this stored procedure (not SQLScript):
In a HANA stored procedure (not SQLScript) is there some tracing statement I can use to write to some log that I can look up later.
For example, consider this procedure:
CREATE PROCEDURE sp_test( p_new_TRANSID NVARCHAR( 32 ) )
AS
lv_uuid1 NVARCHAR( 40 );
BEGIN
lv_uuid1 = SYSUUID;
INSERT INTO "TTEST_SYN_VALD" ( "MANDT", "GUID", "TRANSID", "TABLE_NAME" )
VALUES( '230', lv_uuid1, p_new_TRANSID, 'T_WORKORD' );
// I want to add the UUID to some HANA trace file to view later
END
After generating the SYSUUID, I would like to print that value out into some HANA tracing file so that after the fact (14 days later) I can view this output.
The output would look something like this:
sp_test:UUID:<the generated value> TRANSID:<p_new_TRANSID>
Hopefully it would have some form at timestamp on it for later reference.
In other databases I can do this with a "MESSAGE statement" like this:
MESSAGE 'sp_test:UUID:' + string(lv_uuid1) + ' TRANSID:' + string(p_new_TRANSID) + ' when:' + string(CURRENT TIMESTAMP);
I am looking for some equivalent in HANA.
Thanks in advance for any responses.
David
I suppose you know that about other databases, because at one point you checked the documentation.
Let's try the same for HANA!
Then you could find the TRACE command for SQL Script.
Alternatively you could write your own logger via "anonymous transactions" (another keyword to use in the docu search)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.