Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle one sentence: create new available users, instant possession of permissions and so on (common instructions)

Shulou Source: shulou.com Published: 2022-06-01 15:04:02 10月04日 Update

Create user mchis profile "DEFAULT" IDENTIFIED by "mchis#150" account unlock;grant dba to mchis

Modify it

Mchis (user name)

Mchis#150 (login password)

Mchis (same as user name, acting as authorization)

Delete Orecle user directive

Drop user GHCQX cascade

/ / the cascade parameter is cascaded to delete all the objects of the user. It is often encountered that if the user has an object and does not add this parameter, the user cannot delete it, so it is customary to add this parameter.

-- there is a connected user and cannot be deleted. Execute the following two sentences-- execute to get the sid and serial of the deleted user, and delete select username,sid,serial# from v$sessionalter system kill session '69Magi 1086'

Oracle command to modify user password

You can change the passwords of other users when logging in as SYSDBA, such as:

SQL > alter user user01 identified by user10

The user has changed.

This is to change the USER01 user password to USER10.

Imp imports dmp files remotely

Imp SXZZ/SXZZ@10.16.175.50/xaptdb file=E:\ bjsxzz.dmp full=y

Increase in 201909

Oracle 100% database migration

@ two must be guaranteed

-- 1. Character set ZHS16GBK

Select userenv ('language') from dual

-- can be solved by creating a new database

-- 2. Tablespace wqs803

Create tablespace wqs803

Datafile 'wqs803.dbf'

Size 50m-initial siz

Autoextend on-automatic extension

Next 50m maxsize 20480m-50m each time, maximum expandable to 20480m

Extent management local

Create users and develop tablespaces

Create USER wqs803 IDENTIFIED BY wqs803 DEFAULT TABLESPACE wqs803 PROFILE DEFAULT ACCOUNT

UNLOCK

Grant dba to wqs803

Restore command

Imp wqs803/wqs803@127.0.0.1/wqs803 file=E:\ wqs803_20190916.DMP full=y ignore=y

@ successful effect

. . Importing tables

. . Importing tables

Constraints are about to be enabled.

The import was terminated successfully without warning.

Tags: User password parameter success command object data database being user name space login instruction maximum consistent two habitual function can be passed size Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Docker Huawei Shulou Tech Info Xiaomi