Dear readers of our blog, we'd like to recommend you to visit the main page of our website, where you can learn about our product SQLS*Plus and its advantages.
 
SQLS*Plus - best SQL Server command line reporting and automation tool! SQLS*Plus is several orders of magnitude better than SQL Server sqlcmd and osql command line tools.
 

REQUEST COMPLIMENTARY SQLS*PLUS LICENCE

Enteros UpBeat offers a patented database performance management SaaS platform. It proactively identifies root causes of complex revenue-impacting database performance issues across a growing number of RDBMS, NoSQL, and deep/machine learning database platforms. We support Oracle, SQL Server, IBM DB2, MongoDB, Casandra, MySQL, Amazon Aurora, and other database systems.

Command line parameters to run SQLS*Plus

28 May 2020

COMMAND LINE PARAMETERS TO RUN SQLS*PLUS

Console version of SQLS*Plus can be run by specifying additional command line parameters.

Let’s list the most important command line parameters for SQLS*Plus:

-S (-SILENT) – “silent” mode, in which invitations will be suppressed, repeated commands entered by the user, banner displayed when connecting to SQLS*Plus, etc. will be suppressed. It is strongly recommended to use this parameter only together with the parameters defining the user name, password and the database to which you connect (otherwise, SQL*Plus will display the invitation to enter the user name and password, but it will be impossible to see it). Usually this parameter is used when writing query results to a file when starting SQL*Plus from the operating system batch file, when extra information is not needed in the generated file.

In addition to the above parameters, when starting SQL*Plus, you can immediately specify the user name, password and database instance to which you will connect, for example:

sqlpslusw xxx/pwd@sqldb001

In this case, scott is the name of the user to whom the connection is made, tiger is the password of this user, and sqldb001 is the name of the SQL Server instance (database) to which the connection is made. If the connection parameters are specified correctly, the connection in the database will be made at the start of SQLS*Plus, and the invitation to enter the username and password will no longer be displayed.

It seems very convenient, if you constantly have to connect to the same database on behalf of the same account, to create a batch file (or Windows shortcut), which will run SQLS*Plus with the user name, password and SQL Server instance. However, you should immediately consider that specifying the username and password in plain text is a potential security hole. The user password will also be visible in the history of execution of tasks on the command line, so you should use this syntax very carefully.

You can use abbreviated options to communicate information about the connection. For example, a command like:
sqlpslus /

will try to log on to the server using information about the user name in the operating system (by default user name in operating_system).
It is also possible not to specify the name of the SQL Server instance to which the connection is made:

sqlplusw xxx/yyy

In this case, you will connect to the SQL Server instance by default (depending on the SQL Server client settings on your computer).

SQLS*Plus can also be run in the mode when connection to the server is not made. All you need to do is specify the /NOLOG keyword:

sqlsplus /NOLOG

This feature is used very often. for example, when you need to make the original SQL*Plus settings, or by administrators when they need to perform any operations on a disabled SQL Server instance.

The last feature of the SQLS*Plus command line parameters is that you can execute a script saved in a file on disk right after starting. For example, to automatically run the script C:\sqls.sql, you can use the command

sqlsplus xxx/yyy@sqldb01 @C:\sqls.sql

 
Tags: ,

MORE NEWS

 

Preamble​​NoSql is not a replacement for SQL databases but is a valid alternative for many situations where standard SQL is not the best approach for...

Preamble​​MongoDB Conditional operators specify a condition to which the value of the document field shall correspond.Comparison Query Operators $eq...

5 Database management trends impacting database administrationIn the realm of database management systems, moreover half (52%) of your competitors feel...

The data type is defined as the type of data that any column or variable can store in MS SQL Server. What is the data type? When you create any table or...

Preamble​​MS SQL Server is a client-server architecture. MS SQL Server process starts with the client application sending a query.SQL Server accepts,...

First the basics: what is the master/slave?One database server (“master”) responds and can do anything. A lot of other database servers store copies of all...

Preamble​​Atom Hopper (based on Apache Abdera) for those who may not know is an open-source project sponsored by Rackspace. Today we will figure out how to...

Preamble​​MongoDB recently introduced its new aggregation structure. This structure provides a simpler solution for calculating aggregated values rather...

FlexibilityOne of the most advertised features of MongoDB is its flexibility.  Flexibility, however, is a double-edged sword. More flexibility means more...

Preamble​​SQLShell is a cross-platform command-line tool for SQL, similar to psql for PostgreSQL or MySQL command-line tool for MySQL.Why use it?If you...

Preamble​​Writing an application on top of the framework on top of the driver on top of the database is a bit like a game on the phone: you say “insert...

Preamble​​Oracle Coherence is a distributed cache that is functionally comparable with Memcached. In addition to the basic function of the API cache, it...

Preamble​​IBM pureXML, a proprietary XML database built on a relational mechanism (designed for puns) that offers both relational ( SQL / XML ) and...

  What is PostgreSQL array? In PostgreSQL we can define a column as an array of valid data types. The data type can be built-in, custom or enumerated....

Preamble​​If you are a Linux sysadmin or developer, there comes a time when you need to manage an Oracle database that can work in your environment.In this...

Preamble​​Starting with Microsoft SQL Server 2008, by default, the group of local administrators is no longer added to SQL Server administrators during the...