Hi,
In Oracle SQL*Plus there is a HOST command that can be used to display the operating system prompt. From there I can enter operating system commands which do not effect my SQL*Plus session which stays connected to the DB. There doesn't seem to be a HOST command in vsql. Anyone know if there is a work around?
Oracle SQL*Plus HOST command
Moderator: NorbertKrupa
Oracle SQL*Plus HOST command
Thank you!
Joshua
Joshua
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Oracle SQL*Plus HOST command
Hi,
In vsql you can use the \! meta-command all by itself to temporarily leave vsql.
The example below will show you that the vsql session is unaffected:
I did not commit the data.
In vsql use the meta-command \! to leave vsql, and then type "exit" at the OS prompt to get back into vsql:
Back in vsql, the session id remains the same and the T table still has the uncommitted data:
In vsql you can use the \! meta-command all by itself to temporarily leave vsql.
The example below will show you that the vsql session is unaffected:
Code: Select all
dbadmin=> create table t (c int);
CREATE TABLE
dbadmin=> insert into t values (1);
OUTPUT
--------
1
(1 row)
dbadmin=> select current_session(), * from t;
current_session | c
----------------------------------+---
vertica01.avnet.com-6565:0x7b2a5 | 1
(1 row)
In vsql use the meta-command \! to leave vsql, and then type "exit" at the OS prompt to get back into vsql:
Code: Select all
dbadmin=> \!
[dbadmin@vertica01 ~]$ exit
exit
Code: Select all
dbadmin=> select current_session(), * from t;
current_session | c
----------------------------------+---
vertica01.avnet.com-6565:0x7b2a5 | 1
(1 row)
dbadmin=> rollback;
ROLLBACK
dbadmin=> select * from t;
c
---
(0 rows)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.