Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution that there is no scott user in oracle database under Linux operating system

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

① logs in to the database as' sys' user, and type select * from dba_users; to see if there is a scott user, as shown in the following figure:

As shown in the figure above, the scott user does not exist.

② since the operating system is Linux, log in to the Linux interface with xshell, switch to the oracle user, as shown in the following figure, and find the following directory to see if the scott.sql file exists:

/ home/oracle/product/ora11g/rdbms/admin-this path is subject to its own actual path

If so, log in to the database as sys and execute the following statement:

If it does not exist, create the scott.sql file under / home/oracle/product/ora11g/rdbms/admin and save the following code:

Rem Copyright (c) 1990 by Oracle Corporation

Rem NAME

REM UTLSAMPL.SQL

Rem FUNCTION

Rem NOTES

Rem MODIFIED

Rem gdudey 06pm 28max 95-Modified for desktop seed database

Rem glumpkin 10-21-92-Renamed from SQLBLD.SQL

Rem blinden 07Accord 27Universe 92-Added primary and foreign keys to EMP and DEPT

Rem rlim 04swap 29Universe 91-change char to varchar2

Rem mmoore 04Accord 08Compact 91-use unlimited tablespace priv

Rem pritto 04Accord 04Compact 91-change SYSDATE to 13-JUL-87

Rem Mendels 12-07-90-bug 30123 witch add to_date calls so language independent

Rem

Rem

Rem $Header: utlsampl.sql 7020100.1 94-09-23 22:14:24 cli Generic $sqlbld.sql

Rem

SET TERMOUT OFF

SET ECHO OFF

Rem CONGDON Invoked in RDBMS at build time. 29-DEC-1988

Rem OATES: Created: 16-Feb-83

GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO SCOTT IDENTIFIED BY TIGER

ALTER USER SCOTT DEFAULT TABLESPACE USERS

ALTER USER SCOTT TEMPORARY TABLESPACE TEMP

CONNECT SCOTT/TIGER

DROP TABLE DEPT

CREATE TABLE DEPT

(DEPTNO NUMBER (2) CONSTRAINT PK_DEPT PRIMARY KEY

DNAME VARCHAR2 (14)

LOC VARCHAR2 (13))

DROP TABLE EMP

CREATE TABLE EMP

(EMPNO NUMBER (4) CONSTRAINT PK_EMP PRIMARY KEY

ENAME VARCHAR2 (10)

JOB VARCHAR2 (9)

MGR NUMBER (4)

HIREDATE DATE

SAL NUMBER (7 dint 2)

COMM NUMBER (7 dint 2)

DEPTNO NUMBER (2) CONSTRAINT FK_DEPTNO REFERENCES DEPT)

INSERT INTO DEPT VALUES

(10 recordings of ACCOUNTINGINGY new YORK')

INSERT INTO DEPT VALUES (20 people who are responsible for reparations and dalas)

INSERT INTO DEPT VALUES

(30 minutes, saleses, records, and CHICAGO')

INSERT INTO DEPT VALUES

(40 minutes of operation and presentation of books)

INSERT INTO EMP VALUES

(7369 pensionary SMITHMIZOMYYYYYY) ('17-12-1980memoodlyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

INSERT INTO EMP VALUES

(7499) (7499) (7499) (7499)

INSERT INTO EMP VALUES

(7521 Japanese WARDLESMANTHER 7698 memoir tokendate ('22-2-1981) ('22-2-1981))

INSERT INTO EMP VALUES

(756 MANAGERMANAGERMANAGERTHERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERTHY, 756 ('2-4-1981)

INSERT INTO EMP VALUES

(7654 MARTINGRIMMYYYYY) 7654 MARTINGRIMMMYYYYY) ('28-9-1981)

INSERT INTO EMP VALUES

(7698) (7698) (7698) (7839) ('1-5-1981)) ('1-5-1981) ('1-5-1981); ('2850)

INSERT INTO EMP VALUES

(7782 MANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERMANAGERTH, 7782 ('9-6-1981), ('9-6-1981)

INSERT INTO EMP VALUES

(7788) (7788). (7566) 7566.

INSERT INTO EMP VALUES

(7839 KINGLINGHANGYYYYYYYY) ('17-11-1981)

INSERT INTO EMP VALUES

(784) 784, "turnera", "Salesmans,"7698", "768," ('8-9-1981), "

INSERT INTO EMP VALUES

(7876) (7876) (7876) (7876)

INSERT INTO EMP VALUES

(7900JAMESZHANGJAMESMYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY)

INSERT INTO EMP VALUES

(7902 FORDIMULYYY) 766 FORDIZHERMYYYYYYY ('3-12-1981)

INSERT INTO EMP VALUES

(7934 MILLERMYYYYY) 7782 MILLERMYYYY ('23-1-1982)), 1300 NULLPerry 10)

DROP TABLE BONUS

CREATE TABLE BONUS

(

ENAME VARCHAR2 (10)

JOB VARCHAR2 (9)

SAL NUMBER

COMM NUMBER

)

DROP TABLE SALGRADE

CREATE TABLE SALGRADE

(GRADE NUMBER

LOSAL NUMBER

HISAL NUMBER)

INSERT INTO SALGRADE VALUES (1pm 700,1200)

INSERT INTO SALGRADE VALUES (2Jing 120151400)

INSERT INTO SALGRADE VALUES (3meme 1401jue 2000)

INSERT INTO SALGRADE VALUES (4Jing 2001 03000)

INSERT INTO SALGRADE VALUES (5pm 30019999)

COMMIT

SET TERMOUT ON

SET ECHO ON

Then execute:

That's it.

At this point, scott was added successfully.

If you need to change the scott password, execute the following statement:

Alter user scott identified by 123456

How's it going? Isn't it easy?

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report