What's the equivalent of SET NOEXEC ON in SQL Anywhere? I want to validate a stored procedure without creating it.
Request clarification before answering.
I use this procedure to look ahead a change effect. It's designed to work on the SQL Anywhere 11 System Views :
CREATE PROCEDURE "DBA"."ANALYSE_IMPACT"(in cSearch char(128),in cOwner char(128))
RESULT(OBJET char(10),DESIGNATION char(257))
BEGIN
DECLARE nUser integer;
SET nUser = USER_ID(cOwner);
SET cSearch = '.*' || UCASE(TRIM(cSearch)) || '.*';
SELECT 'PROCEDURE' AS OBJET,proc_name AS DESIGNATION
FROM SYSPROCEDURE WHERE creator IN (nUser,USER_ID('DBA'))
AND UCASE(proc_defn) REGEXP cSearch
UNION ALL
SELECT 'TABLE',T.table_name
FROM SYSTAB T JOIN SYSTABCOL C ON T.table_id = C.table_id
WHERE T.creator = nUser AND T.table_type = 1 AND
(UCASE(T.table_name) REGEXP cSearch OR UCASE(C.column_name) REGEXP cSearch)
GROUP BY T.table_name
UNION ALL
SELECT 'TRIGGER',T.table_name || '.' || C.trigger_name
FROM SYSTAB T JOIN SYSTRIGGER C ON T.table_id = C.table_id
WHERE T.creator = nUser AND C.trigger_name is not null
AND UCASE(C.trigger_defn) REGEXP cSearch
UNION ALL
SELECT 'VIEW',T.table_name
FROM SYSTAB T JOIN SYSVIEW C ON T.object_id = C.view_object_id
WHERE T.creator = nUser AND UCASE(C.view_def) REGEXP cSearch
UNION ALL
SELECT 'TASK',event_name
FROM SYSEVENT
WHERE creator = USER_ID('DBA') AND UCASE(source) REGEXP cSearch
ORDER BY OBJET,DESIGNATION;
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.