on ‎2012 Aug 16 9:57 AM
Hi,
I was wondering if there is a way to use "OS" environment variable in an sql file.
Im trying to to something like this ->
START LOGGING '%temp%\\sql.log'; UPDATE...; CREATE... ; ALTER... ; STOP LOGGING; INPUT INTO DBA.DB_UPDATE_LOG (TEXT) FROM '%temp%\\sql.log'; COMMIT;
Works fine, if i use a path without the %temp% variable. I want to avoid "access denied" errors while writing the log file.
Regards Stefan
Request clarification before answering.
Just for the record:
v16 has introduced the xp_get_env() system procedure that returns the value of an environment variable.
(As discussed, it would not help in the particular question as that requires a "DBISQL variable", which is already available via PARAMETERs, as Breck has pointed out.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 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.