Advertisement
viktarb

Untitled

Feb 7th, 2024
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. [oracle@12cr2db ~]$ sqlplus / as sysbda
  2.  
  3. SQL*Plus: Release 12.2.0.1.0 Production
  4.  
  5. Copyright (c) 1982, 2016, Oracle. All rights reserved.
  6.  
  7. Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus statements.
  8.  
  9. Usage 1: sqlplus -H | -V
  10.  
  11. -H Displays the SQL*Plus version and the
  12. usage help.
  13. -V Displays the SQL*Plus version.
  14.  
  15. Usage 2: sqlplus [ [<option>] [{logon | /nolog}] [<start>] ]
  16.  
  17. <option> is: [-AC] [-C <version>] [-L] [-M "<options>"] [-NOLOGINTIME] [-R <level>]
  18. [-S]
  19.  
  20. -AC Enable Application Continuity.
  21. -C <version> Sets the compatibility of affected commands to the
  22. version specified by <version>. The version has
  23. the form "x.y[.z]". For example, -C 10.2.0
  24. -L Attempts to log on just once, instead of
  25. reprompting on error.
  26. -M "<options>" Sets automatic HTML or CSV markup of output. The options
  27. have the form:
  28. {HTML html_options|CSV csv_options}
  29. See SQL*Plus User's Guide for detailed HTML and CSV options.
  30. -NOLOGINTIME Don't display Last Successful Login Time.
  31. -R <level> Sets restricted mode to disable SQL*Plus commands
  32. that interact with the file system. The level can
  33. be 1, 2 or 3. The most restrictive is -R 3 which
  34. disables all user commands interacting with the
  35. file system.
  36. -S Sets silent mode which suppresses the display of
  37. the SQL*Plus banner, prompts, and echoing of
  38. commands.
  39.  
  40. <logon> is: {<username>[/<password>][@<connect_identifier>] | / }
  41. [AS {SYSDBA | SYSOPER | SYSASM | SYSBACKUP | SYSDG | SYSKM | SYSRAC}] [EDITION=value]
  42.  
  43. Specifies the database account username, password and connect
  44. identifier for the database connection. Without a connect
  45. identifier, SQL*Plus connects to the default database.
  46.  
  47. The AS SYSDBA, AS SYSOPER, AS SYSASM, AS SYSBACKUP, AS SYSDG,
  48. AS SYSKM and AS SYSRAC options are database administration privileges.
  49.  
  50. <connect_identifier> can be in the form of Net Service Name
  51. or Easy Connect.
  52.  
  53. @[<net_service_name> | [//]Host[:Port]/<service_name>]
  54.  
  55. <net_service_name> is a simple name for a service that resolves
  56. to a connect descriptor.
  57.  
  58. Example: Connect to database using Net Service Name and the
  59. database net service name is ORCL.
  60.  
  61. sqlplus myusername/mypassword@ORCL
  62.  
  63. Host specifies the host name or IP address of the database
  64. server computer.
  65.  
  66. Port specifies the listening port on the database server.
  67.  
  68. <service_name> specifies the service name of the database you
  69. want to access.
  70.  
  71. Example: Connect to database using Easy Connect and the
  72. Service name is ORCL.
  73.  
  74. sqlplus myusername/mypassword@Host/ORCL
  75.  
  76. The /NOLOG option starts SQL*Plus without connecting to a
  77. database.
  78.  
  79. The EDITION specifies the value for Session Edition.
  80.  
  81.  
  82. <start> is: @<URL>|<filename>[.<ext>] [<parameter> ...]
  83.  
  84. Runs the specified SQL*Plus script from a web server (URL) or the
  85. local file system (filename.ext) with specified parameters that
  86. will be assigned to substitution variables in the script.
  87.  
  88. When SQL*Plus starts, and after CONNECT commands, the site profile
  89. (e.g. $ORACLE_HOME/sqlplus/admin/glogin.sql) and the user profile
  90. (e.g. login.sql in the working directory) are run. The files may
  91. contain SQL*Plus commands.
  92.  
  93. Refer to the SQL*Plus User's Guide and Reference for more information.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement