Start and Stop an Oracle database in SQLPLUS

Source: Internet
Author: User

Start and Stop Oracle Database in SQLPLUS 1. Start and Stop database 1. Start www.2cto.com SQL> connect system/manager as sysdba; SQL> startup open database instance name. Another method is as follows: install the database and run the alter database command. SQL> connect system/manager as sysdba; SQL> startup mount database instance name; SQL> alter database open; 2 stop SQL> connect system/manager as sysdba SQL> shutdown immediate; note: if you disable the database for backup, use shutdown or shutdown immediate. if a problem occurs during shutdown, use shoutdown abort and startup, and then use Shutdown. note: Enter the host string of "SQLPLUS" SQLPLUS directly during running: A does not enter the host string (database instance name) on this server ), B must add the TNS name (TNS name, which is configured through Net Configuraltion) to other machines. 2. 1. Execute Linux sqlplus *. after using sqlplus to log on to the database, enter @ file name full path to execute *. SQL file: Assume that there is a test. the path of the SQL file is/home/oracle/. Execute it now. 1. log on to the database sqlplus system/manager 2. Enter SQL> @/home/oracle/test at the prompt. SQL; 2. garbled Chinese characters After Oracle executes the SQL script in Linux: First confirm the character set of Oracle, and then execute the statement after sqlplus logs on to Oracle: [SQL] Select userenv ('language') from dual; Return Value example: AMERICAN_AMERICA.ZHS16GBK modify Linux's NLS_LANG environment variable, modify the Linux user specified by Oracle under ". base_profile file, add the following: [SQL] export NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK" using the Linux Command "source ~ /. Base_profile "or restart to make the environment variable settings take effect. The Linux Command for viewing the environment variable is" echo $ NLS_LANG ".
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.