从 SQL*Plus 连接到 Oracle AI Database
SQL*Plus 是可以从中访问 Oracle AI Database 的客户机程序。本主题说明如何启动 SQL*Plus 并连接到 Oracle AI Database。
注:对于下列过程中的步骤 3 和步骤的 4,需要用户名和口令。
要从 SQL*Plus 连接到 Oracle AI Database,请执行以下操作:
-
如果您位于 Windows 系统上,请打开 Windows 命令提示符。
-
在命令提示符处,键入 sqlplus 并按 Enter 键。
-
在用户名提示下,键入您的用户名,然后按 Enter 键。
-
在密码提示符下,键入密码,然后按 Enter 键。
注:为安全起义,您的口令在屏幕上不可见。
系统会将您连接到 Oracle AI Database 实例。
您在 SQLPlus 环境中。在
SQL>提示符处,可以输入并运行 SQLPlus 命令、SQL 语句、PL/SQL 语句和操作系统命令。要退出 SQL*Plus,请键入 exit 并按 Enter 键。
注:退出 SQLPlus 将结束 SQLPlus 会话,但不会关闭数据库实例。
示例 2-1 :启动 SQLPlus、连接到 Oracle AI Database、运行 SQL
SELECT语句并退出 SQLPlus。用户输入以粗体显示。
示例 2-1 从 SQL*Plus 连接到 Oracle Database 12c
> sqlplus
SQL*Plus: Release 12.1.0.1.0 Production on Thu Dec 27 07:43:41 2012
Copyright (c) 1982, 2012, Oracle. All rights reserved.
Enter user-name: your_user_name
Enter password: your_password
Connected to:
Oracle Database 12c Enterprise Edition Release - 12.1.0.1.0 64bit Production
SQL> select count(*) from employees;
COUNT(*)
----------
107
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release - 12.1.0.1.0 64bit Production
>
另请参见:
-
“关于 SQLPlus ”了解 SQLPlus 的简要说明
-
SQL*Plus User’s Guide and Reference(了解有关启动 SQL*Plus 并连接到数据库的详细信息)