Show
Transformation for this command is pending
Description
Shows the value of a SQLPlus system variable or the current SQLPlus environment. (Oracle SQL Plus User's Guide and Reference)
SHO[W] system_variable ALL BTI[TLE] CON_ID CON_NAME EDITION ERR[ORS] [ {ANALYTIC VIEW | ATTRIBUTE DIMENSION | HIERARCHY | FUNCTION | PROCEDURE | PACKAGE | PACKAGE BODY | TRIGGER | VIEW | TYPE | TYPE BODY | DIMENSION | JAVA CLASS } [schema.]name]HISTORY LNO LOBPREF[ETCH] PARAMETER[S] [parameter_name] PDBS PNO RECYC[LEBIN] [original_name] REL[EASE] REPF[OOTER] REPH[EADER] ROWPREF[ETCH] SGA SPOO[L] SPPARAMETER[S] [parameter_name] SQLCODE STATEMENTC[ACHE] TTI[TLE] USER XQUERY
Snowflake does not have a direct equivalent for this command. However, some of its functionalities can be emulated.
1. Show ERRORS
Shows the compilation errors of a stored procedure (includes stored functions, procedures, and packages). After you use the CREATE command to create a stored procedure, a message is displayed if the stored procedure has any compilation errors.
In Snowflake, performing an extra statement to display all the compilation errors is unnecessary. The compilation errors are displayed immediately when executing the CREATE statement.
Oracle
CREATE OR REPLACE PROCEDURE RANCOM_PROC
AS
BEGIN
INSERT INTO NE_TABLE SELECT 1 FROM DUAL;
END;
SHOW ERRORS
LINE/COL ERROR
-------- -----------------------------------------------------------------
4/3 PL/SQL: SQL Statement ignored
4/10 PL/SQL: ORA-00925: missing INTO keyword
Note that the INTO keyword is misspelled in order to cause a compilation error.
SnowSQL (CLI Client)
CREATE OR REPLACE PROCEDURE RANCOM_PROC ()
RETURNS VARCHAR
LANGUAGE SQL
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'
EXECUTE AS CALLER
AS
$$
BEGIN
INSERT INTO NE_TABLE
SELECT 1 FROM DUAL;
END;
$$;
!!!RESOLVE EWI!!! /*** SSC-EWI-0073 - PENDING FUNCTIONAL EQUIVALENCE REVIEW FOR 'SHOW STATEMENT' NODE ***/!!!
SHOW ERRORS;
001003 (42000): SQL compilation error:
syntax error line 3 at position 7 unexpected 'INT'.
syntax error line 3 at position 11 unexpected 'PUBLIC'.
Show ALL
Lists the settings of all SHOW options, except ERRORS and SGA, in alphabetical order.
In order to display all the possible options in SnowCLI you can run the !options
command.
Oracle
show all;
appinfo is OFF and set to "SQL*Plus"
arraysize 15
autocommit OFF
autoprint OFF
autorecovery OFF
autotrace OFF
blockterminator "." (hex 2e)
btitle OFF and is the first few characters of the next SELECT statement
cmdsep OFF
colinvisible OFF
coljson OFF
colsep " "
compatibility version NATIVE
concat "." (hex 2e)
copycommit 0
COPYTYPECHECK is ON
define "&" (hex 26)
describe DEPTH 1 LINENUM OFF INDENT ON
echo OFF
editfile "afiedt.buf"
embedded OFF
errorlogging is OFF
escape OFF
escchar OFF
exitcommit ON
FEEDBACK ON for 6 or more rows SQL_ID OFF
flagger OFF
flush ON
fullcolname OFF
heading ON
headsep "|" (hex 7c)
history is OFF
instance "local"
jsonprint NORMAL
linesize 80
lno 5
loboffset 1
lobprefetch 0
logsource ""
long 80
longchunksize 80
markup HTML OFF HEAD "<style type='text/css'> body {font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} p {font:10pt Arial,Helvetica,sans-serif; color:black; background:White;} table,tr,td {font:10pt Arial,Helvetica,sans-serif; color:Black; background:#f7f7e7; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px;} th {font:bold 10pt Arial,Helvetica,sans-serif; color:#336699; background:#cccc99; padding:0px 0px 0px 0px;} h1 {font:16pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; border-bottom:1px solid #cccc99; margin-top:0pt; margin-bottom:0pt; padding:0px 0px 0px 0px;-
} h2 {font:bold 10pt Arial,Helvetica,Geneva,sans-serif; color:#336699; background-color:White; margin-top:4pt; margin-bottom:0pt;} a {font:9pt Arial,Helvetica,sans-serif; color:#663300; background:#ffffff; margin-top:0pt; margin-bottom:0pt; vertical-align:top;}</style><title>SQL*Plus Report</title>" BODY "" TABLE "border='1' width='90%' align='center' summary='Script output'" SPOOL OFF ENTMAP ON PREFORMAT OFF
markup CSV OFF DELIMITER , QUOTE ON
newpage 1
null ""
numformat ""
numwidth 10
pagesize 14
PAUSE is OFF
pno 1
recsep WRAP
recsepchar " " (hex 20)
release 2103000000
repfooter OFF and is NULL
repheader OFF and is NULL
rowlimit OFF
rowprefetch 1
securedcol is OFF
serveroutput OFF
shiftinout INVISIBLE
showmode OFF
spool OFF
sqlblanklines OFF
sqlcase MIXED
sqlcode 0
sqlcontinue "> "
sqlnumber ON
sqlpluscompatibility 21.0.0
sqlprefix "#" (hex 23)
sqlprompt "SQL> "
sqlterminator ";" (hex 3b)
statementcache is 0
suffix "sql"
tab ON
termout ON
timing OFF
trimout ON
trimspool OFF
ttitle OFF and is the first few characters of the next SELECT statement
underline "-" (hex 2d)
USER is "SYSTEM"
verify ON
wrap : lines will be wrapped
xmloptimizationcheck OFF
SnowSQL (CLI Client)
!options
+-----------------------------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
| Name | Value | Help |
|-----------------------------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------|
| auto_completion | True | Displays auto-completion suggestions for commands and Snowflake objects |
| client_session_keep_alive | False | Keeps the session active indefinitely, even if there is no activity from the user. |
| client_store_temporary_credential | False | Enable Linux users to use temporary file to store ID_TOKEN. |
| connection_options | {} | Set arbitrary connection parameters in underlying Python connector connections. |
| echo | False | Outputs the SQL command to the terminal when it is executed |
| editor | vim | Changes the editor to use for the !edit command |
| empty_for_null_in_tsv | False | Outputs an empty string for NULL values in TSV format |
| environment_variables | [] | Specifies the environment variables to be set in the SnowSQL variables. |
| | | The variable names should be comma separated. |
| execution_only | False | Executes queries only. No data will be fetched |
| exit_on_error | False | Quits when SnowSQL encounters an error |
| fix_parameter_precedence | True | Fix the connection parameter precedence in the order of 1) Environment variables, 2) Connection parameters, 3) Default connection parameters. |
| force_put_overwrite | False | Forces OVERWRITE=true for PUT. This is to mitigate S3's eventually consistent issue. |
| friendly | True | Shows the splash text and goodbye messages |
| header | True | Outputs the header in query results |
| insecure_mode | False | Turns off OSCP certificate checks |
| key_bindings | emacs | Changes keybindings for navigating the prompt to emacs or vi |
| log_bootstrap_file | ../snowsql_rt.log_bo.. | SnowSQL bootstrap log file location |
| log_file | ../snowsql_rt.log | SnowSQL main log file location |
| log_level | DEBUG | Changes the log level (critical, debug, info, error, warning) |
| login_timeout | 120 | Login timeout in seconds. |
| noup | False | Turns off auto upgrading Snowsql |
| ocsp_fail_open | True | Sets the fail open mode for OCSP Failures. For help please refer the documentation. |
| output_file | None | Writes output to the specified file in addition to the terminal |
| output_format | psql | Sets the output format for query results. |
| paging | False | Enables paging to pause output per screen height. |
| progress_bar | True | Shows progress bar while transferring data. |
| prompt_format | [user]#[warehouse]@[.. | Sets the prompt format. For help, see the documentation |
| quiet | False | Hides all output |
| remove_comments | False | Removes comments before sending query to Snowflake |
| remove_trailing_semicolons | False | Removes trailing semicolons from SQL text before sending queries to Snowflake |
| results | True | If set to off, queries will be sent asynchronously, but no results will be fetched. |
| | | Use !queries to check the status. |
| rowset_size | 1000 | Sets the size of rowsets to fetch from the server. |
| | | Set the option low for smooth output, high for fast output. |
| sfqid | False | Turns on/off Snowflake query id in the summary. |
| sfqid_in_error | False | Turns on/off Snowflake query id in the error message |
| sql_delimiter | ; | Defines what reserved keyword splits SQL statements from each other. |
| sql_split | snowflake.connector... | Choose SQL spliter implementation. Currently snowflake.connector.util_text, or snowflake\.cli.sqlsplit. |
| stop_on_error | False | Stops all queries yet to run when SnowSQL encounters an error |
| syntax_style | default | Sets the colors for the text of SnowSQL. |
| timing | True | Turns on/off timing for each query |
| timing_in_output_file | False | Includes timing in the output file. |
| variable_substitution | False | Substitutes variables (starting with '&') with values |
| version | 1.2.24 | SnowSQL version |
| wrap | True | Truncates lines at the width of the terminal screen |
+-----------------------------------+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
Known Issues
1. It's not possible in SnowCLI to display de value of a single option.
SnowCLI does not provide a way to display the value of a specific option. You may use !options
to watch the value of the option.
2. Research is pending to match each SQLPLUS option to a SnowflakeCLI equivalent.
It is pending to define an equivalent for each SQLPLUS option.
Related EWIs
SSC-EWI-0073: Pending Functional Equivalence Review.
Last updated