?1?/**
?2??*????Project?Name?:?Oracle_Database_11g_Study_Notes
?3??*????File?Name?:?1.Start_Login.sql
?4??*????Author?:?Alex刺客
?5??*????Date?:?June?21,2010
?6??*/
?7?
?8http://www.oracle.com/technology/global/cn/pub/articles/smiley-11gr1-install.html
?9?
10?1.啟動和停止監聽器:
11?????監聽器接受客戶端的連接請求,并在驗證證書后創建數據庫連接。要使用?OEM,必須先啟動監聽器。
12?????[oracle@localhost?~]$??lsnrctl?start
13?????[oracle@localhost?~]$??lsnrctl?stop
14?
15?2.啟動和停止數據庫:
16?????2.1.啟動和停止數據庫的最簡單方法是從?OEM?控制臺啟動和停止。要從命令行執行此操作,請在以?oracle?身份登錄后使用?SQL*Plus,如下所示:
17?????啟動:
18?????????[oracle@localhost?~]$?sqlplus
19?????????Enter?user-name:?/?as?sysdba
20?????????SQL>?startup
21?????????SQL>?exit
22?
23?????停止:
24?????????[oracle@localhost?~]$??sqlplus
25?????????Enter?user-name:?/?as?sysdba
26?????????SQL>?shutdown?immediate
27?????????SQL>?exit
28?
29?????2.2.以下命令也可以啟動和停止數據庫
30?????????[oracle@localhost?~]$??dbstart
31?????????[oracle@localhost?~]$??dbshut
32?
33?3.啟動和停止?Oracle?企業管理器數據庫控制:
34?????[oracle@localhost?~]$??emctl?start?dbconsole
35?????[oracle@localhost?~]$??emctl?stop?dbconsole
36?
37?4.Oracle相關管理工具
38?
39?????Net?Manager
40?????[oracle@localhost?~]$??netmgr
41?
42?????Net?Configuration?Assistant
43?????[oracle@localhost?~]$??netca
44?
45?????Database?Configuration?assistant
46?????[oracle@localhost?~]$??dbca
47?
48?????Database?Upgrade?Assistant
49?????[oracle@localhost?~]$??dbua
50?
51?????Locale?Builder
52?????[oracle@localhost?~]$??lbuilder
53?
54?5.登錄SQLPlus
55?????[oracle@localhost?~]$??sqlplus?username/password@要連接的數據庫(不是IP在Net?Configuration?Assistant里配置的)
56??
57?6.運行SQL腳本
58?????SQL>?@~/test.sql
59?
60?7.斷開數據庫連接
61?????SQL>?DISCONNECT
62????
63?8.重新連接上數據庫
64?????SQL>?CONNECT
65?
66?9.退出
67?????SQL>?EXIT
68?
?2??*????Project?Name?:?Oracle_Database_11g_Study_Notes
?3??*????File?Name?:?1.Start_Login.sql
?4??*????Author?:?Alex刺客
?5??*????Date?:?June?21,2010
?6??*/
?7?
?8http://www.oracle.com/technology/global/cn/pub/articles/smiley-11gr1-install.html
?9?
10?1.啟動和停止監聽器:
11?????監聽器接受客戶端的連接請求,并在驗證證書后創建數據庫連接。要使用?OEM,必須先啟動監聽器。
12?????[oracle@localhost?~]$??lsnrctl?start
13?????[oracle@localhost?~]$??lsnrctl?stop
14?
15?2.啟動和停止數據庫:
16?????2.1.啟動和停止數據庫的最簡單方法是從?OEM?控制臺啟動和停止。要從命令行執行此操作,請在以?oracle?身份登錄后使用?SQL*Plus,如下所示:
17?????啟動:
18?????????[oracle@localhost?~]$?sqlplus
19?????????Enter?user-name:?/?as?sysdba
20?????????SQL>?startup
21?????????SQL>?exit
22?
23?????停止:
24?????????[oracle@localhost?~]$??sqlplus
25?????????Enter?user-name:?/?as?sysdba
26?????????SQL>?shutdown?immediate
27?????????SQL>?exit
28?
29?????2.2.以下命令也可以啟動和停止數據庫
30?????????[oracle@localhost?~]$??dbstart
31?????????[oracle@localhost?~]$??dbshut
32?
33?3.啟動和停止?Oracle?企業管理器數據庫控制:
34?????[oracle@localhost?~]$??emctl?start?dbconsole
35?????[oracle@localhost?~]$??emctl?stop?dbconsole
36?
37?4.Oracle相關管理工具
38?
39?????Net?Manager
40?????[oracle@localhost?~]$??netmgr
41?
42?????Net?Configuration?Assistant
43?????[oracle@localhost?~]$??netca
44?
45?????Database?Configuration?assistant
46?????[oracle@localhost?~]$??dbca
47?
48?????Database?Upgrade?Assistant
49?????[oracle@localhost?~]$??dbua
50?
51?????Locale?Builder
52?????[oracle@localhost?~]$??lbuilder
53?
54?5.登錄SQLPlus
55?????[oracle@localhost?~]$??sqlplus?username/password@要連接的數據庫(不是IP在Net?Configuration?Assistant里配置的)
56??
57?6.運行SQL腳本
58?????SQL>?@~/test.sql
59?
60?7.斷開數據庫連接
61?????SQL>?DISCONNECT
62????
63?8.重新連接上數據庫
64?????SQL>?CONNECT
65?
66?9.退出
67?????SQL>?EXIT
68?