-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
long.sql #45
Comments
With the latest long.sql it should work? Perhaps I pushed the actual code too late - but "in my laptop it works"? So when you run |
Or were you referring to the inaccuracy in the prompt output
Feel free to send a PR :-) And as a general topic, I wonder if more scripts should be standardized from |
Yes, it's the prompt output, sorry I should have been more clear. I was looking to implement PR, but got bogged down in trying to make it default to 1=1, seems it's not quite as easy as I thought :) |
Are you looking for option to have default vaues in sqlplus script parameters? |
Thanks for the idea @jgebal - I have thought about it, but I think I won't do it in the foreseeable future as I would have to change a lot of scripts (most of them!) for consistency and now many people use my scripts via SQL Developer (and soon VSCode Oracle plugin) and I'm not sure if these engines handle the defaults well. My path for easier usage is to document more scripts (and with better default argument examples) in That way people can just copy paste the example "default usage" commands from help.sql and as an added bonus, have a history of exact commands - with their exact arguments in the SQLDev/commandline history too:
|
SQL> @help long
NAME DESCRIPTION USAGE
long.sql Display session long operations @long <filter_expression>
@long 1=1
@long username='SOE'
But in long.sql:
prompt Show session long operations from v$session_longops for sid &1
sid in (select sid from v$session where &1)
I'm guessing it should work as per the help, just fix has been lost in actual code.
Happy to add that if that's what is expected.
Btw presumably it would also be easy (and sensible) to default to 1=1 if argument is missing
The text was updated successfully, but these errors were encountered: