Set database startup instance
Use operating system authentication to log on
Rebuilding Scott user environment
Switch to database DBA
Specify a separate tablespace for Scott.
C: \ Documents ents and
Settings \ Administrator>Set oracle_sid = orcl
C: \ Documents ents and
Settings \ Administrator>Sqlplus/nolog
SQL * Plus: Release 10.1.0 . 2.0
-Production on Sunday May 15 21:34:02 2011
Copyright (c) 1982,200 4, Oracle. All rights reserved.
SQL>
@ % ORACLE_HOME % \ RDBMS \ admin \ Scott. SQL
SQL> show user
The user is Scott"
SQL> Conn/As sysdba
Connected.
SQL>Create tablespace scott_space
Datafile 'J: \ oracle \ user_space \ scott_space.dbf' size 100 m ;
The tablespace has been created.
SQL>Alter user Scott default tablespace
Scott_space quota unlimited on scott_space;
The user has changed.
SQL>
Using the network service name
First, Set$ ORACLE_HOME \ Network \ admin \ tnsnames. ora
My local path is J: \ oracle \ product \ 10.1.0 \ Db_1 \ Network \ admin \ tnsnames. ora
Orcl =
(Description =
(Address = (Protocol = TCP) (host = WWW-6E8BB 23133f ) (Port = 1521 ))
(CONNECT_DATA =
(Server = dedicated)
(SERVICE_NAME = orcl)
)
)
The following section specifies the Protocol protocol, host, and Port
(Address = (Protocol = TCP) (host =
WWW-6E8BB 23133f ) (Port
= 1521 ))
This section knows the service name
(SERVICE_NAME = orcl)
Set server files$ ORACLE_HOME \ Network \ admin \ listener. ora
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc)
(ORACLE_HOME = J: \ oracle \ product \ 10.1.0 \ Db_1)
(Program = EXTPROC)
)
)
Listener =
(Description_list =
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = WWW-6E8BB 23133f ) (Port = 1521 ))
)
)
)
C: \ Documents ents and
Settings \ Administrator>Tnsping orcl
TNS Ping utility for 32-bit windows:
Version 10.1.0 . 2.0-production on-2011 22:31:36
Copyright (c) 1997,200 3, Oracle. All rights reserved.
Used parameter files:
J: \ oracle \ product \ 10.1.0 \ Db_1 \ Network \ admin \ sqlnet. ora
Alias resolved using tnsnames Adapter
Attempting to contact (description =
(Address = (Protocol = TCP) (host = WWW-6E8BB 23133f ) (Port = 1521) (CONNECT_DATA = (Server =
Dedicated)
(SERVICE_NAME = orcl )))
OK (20 ms)
C: \ Documents ents and
Settings \ Administrator>LSNRCTL start
C: \ Documents ents and
Settings \ Administrator>Sqlplus Scott @ orcl
SQL * Plus: Release 10.1.0 . 2.0
-Production on Sunday May 15 21:53:19 2011
Copyright (c) 1982,200 4, Oracle. All rights reserved.
Enter the password:
Connect:
Oracle Database 10g Enterprise Edition Release 10.1.0 . 2.0
-Production
With the partitioning, OLAP and Data Mining
Options
SQL> show user
The user is Scott"
SQL>
SQL> Conn/As sysdba
Connected.
SQL>Show parameter SERVICE_NAME;
Name type value
------------------------------------
--------------------------
Service_names string orcl
SQL>
Database startup Method
Startup
The options are as follows:
Nomount: only starts database instances
Mount: Start the instance and load data files
Open
Start the instance, load the data file, and open
Open
Open the database in read-only mode
Open
Open the database in read/write mode
Force:
If the database is already started, no error is reported, but the current database is automatically shutdown abort and then started
Restrict
Pfile
Database shutdown Method
Shutdown
The options are as follows:
Normal
1,
Prohibit users from creating new connections
2,
Wait until the current user disconnects (the user waits continuously)
3,
Close the database, uninstall the database, and close the instance.
Disable immediate immediately
1,
Roll back all uncommitted transactions
2,
The connection has been created, and the SQL statement being executed waits for it to be completed. If it does not exist, it is immediately disconnected.
3,
Close the database, uninstall the database, and close the instance.
Transactional closes a transaction
1,
New connections cannot be created.
2,
The created connection cannot generate new transactions.
3,
Disconnect after uncommitted transactions are committed.
4,
Close the database, uninstall the database, and close the instance.
Abort
Terminate the database immediately
1,
Disconnect all users
2,
Terminate all transactions (ongoing transactions are not rolled back)
3,
Close the database, uninstall the database, and close the instance.