Why can't I log on to Oracle only with sys and system?

Source: Internet
Author: User

Oracle Sys users cannot log on with the default password change_on_install (error code: ORA-28009)

When you log on to the database using the default Oracle SQL Plus, you can use the system user's default password manager to log on to the database.


However, if you enter the user sys and the default password change_on_install, you cannot log on.

The following error is reported:


ERROR:

ORA-28009: connection to sys shoshould be as sysdba or sysoper


Problem Analysis:


Usage: CONN [ECT] [logon] [AS {SYSDBA | SYSOPER}]

Where: = [/] [@] |/If you log on as a sys user, you must log on in the complete format !!


Solution:

1. Log On with the system user, and switch to the sys user in the complete format:

SQL> conn as sysdba

Connected. 2. The host string on the logon interface is followed by the string as sysdba:
 

(2) familiar solutions:

Environment win2000 server oracle8.1.7

SQL> create tablespace price datafile price. ora size 10 M; the tablespace has been created.

SQL> drop tablespace price; the tablespace is discarded.

SQL> create tablespace plate datafile plate. ora size 10 M; the tablespace has been created.

SQL> create user plate identified by plate default tablespace plate; you have created

SQL> grant connect, resource to plate; authorization successful.

SQL> connect plate/plate is connected.

SQL>

// Close the database

Microsoft Windows; 2000 [Version 5.00.2195]

(C) Copyright 1985-2000 Microsoft Corp.


C: Documents and SettingsAdministrator> svrmgrl

........

Oracle8i Enterprise Edition Release 8.1.7.0.0-Production

With the Partitioning option

JServer Release 8.1.7.0.0-Production

SVRMGR> connect internal/oracle

Connection successful.

SVRMGR> shutdown immediate

The database has been closed.

The database has been detached.

The ORACLE instance has been disabled.

// Delete the data file plate. ora to simulate data file loss

SVRMGR> startup

The ORACLE instance has been started.

The total number of global system regions is 29431836 bytes.

Fixed Size 75804 bytes

Variable Size 28459008 bytes

Database Buffers: 819200 bytes

Redo Buffers 77824 bytes

The database has been attached.

ORA-01157 :???? /?????? 8 -??? DBWR ????

ORA-01110 :???? 8: D: ORACLEORA81DATABASEPLATE. ORA

// If the database fails to be opened, the wrong data file offline is dropped.

SVRMGR> alter database datafile d: oracleora81databaseplate. ora offline drop;

The statement has been processed.

// The database is successfully opened.

SVRMGR> alter database open;

The statement has been processed.

SVRMGR>

// In SQL * plus, handle the aftermath and delete the associated tablespace

SQL> connect internal/oracle

Connected.

SQL> col name format a50

SQL> select name, status from v _ $ datafile;

NAME STATUS

-------------------------------------

D: ORACLEORADATAORALSYSTEM01.DBF SYSTEM

D: ORACLEORADATAORALRBS01.DBF ONLINE

D: ORACLEORADATAORALUSERS01.DBF ONLINE

D: ORACLEORADATAORALTEMP01.DBF ONLINE

D: ORACLEORADATAORALTOOLS01.DBF ONLINE

D: ORACLEORADATAORALINDX01.DBF ONLINE

D: ORACLEORADATAORALDR01.DBF ONLINE

D: ORACLEORA81DATABASEPLATE. ORA OFFLIN

Eight rows have been selected.

SQL> drop tablespace plate; The tablespace is discarded.

SQL> col name format a33

SQL> col name format a35

SQL> col name format a50

SQL> select name, status from v _ $ datafile;


NAME STATUS

---------------------------------------------------------

D: ORACLEORADATAORALSYSTEM01.DBF SYSTEM

D: ORACLEORADATAORALRBS01.DBF ONLINE

D: ORACLEORADATAORALUSERS01.DBF ONLINE

D: ORACLEORADATAORALTEMP01.DBF ONLINE

D: ORACLEORADATAORALTOOLS01.DBF ONLINE

D: ORACLEORADATAORALINDX01.DBF ONLINE

D: ORACLEORADATAORALDR01.DBF ONLINE


You have selected 7 rows.

SQL>

Be sure not to execute P (the following code) to delete a computer with ORACLE installed.

Because ORACLE log files record user information, if you delete the log files, you can only use sys and system to log on.

Recovery is complicated. As a DBA, you must note that the server version OS is very strict. Do not delete files that do not understand the source,

Any system file to be deleted must be backed up.


I used the following code to execute the. reg file on server2003. As a result, non-system default oracle users cannot log on.

The result is that only the oracle instance is installed again.

@ Echo off

Echo wait ......

Del/f/s/q % systemdrive % *. tmp

Del/f/s/q % systemdrive % *. _ mp

Del/f/s/q % systemdrive % *. log

Del/f/s/q % systemdrive % *. gid

Del/f/s/q % systemdrive % *. chk

Del/f/s/q % systemdrive % *. old

Del/f/s/q % systemdrive % ecycled *.*

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.