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

What are the common operations of oracle

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article introduces the knowledge of "what are the common operations of oracle". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Oracle imports the sql file:

1. Go to the sql file directory and log in to the user who needs to import the file.

Open cmd and enter oracle by entering the following command

Sqlplus username/password

Username: user name to be operated; password: user password to be operated

2. Import the sql file, enter the command, @ followed by the path of the sql file, enter, and import data

@ D:/test.sql

3. After the import is completed, enter

Commit; super user logs in to sqlplus system/manager as sysdba to delete tablespace (non-empty tablespace) drop tablespace TABLE; (non-empty: drop tablespace tablespace_name including contents and datafiles;) to create tablespace CREATE TABLESPACE ZWPT_HSS DATAFILE'D:\ app\ Administrator\ oradata\ orcl\ ZWPT_HSS.DMP' SIZE 1024m EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; create user create user username identified by password [password]; delete user drop user username; authorized user grant dba to username Change password alter user username identified by new password import dmp file (the execution environment of this statement is the environment when you first entered the command desk) imp usename/password@orcl full=y file= d:\ data\ xxxx.dmp ignore=y execute before exporting the database, execute the query results again after executing this statement, and then execute the import library statement select 'alter table' | | table_name | | 'allocate extent;' from user_tables where num_rows=0' Command line export database-execute EXP usename/password@orcl file=D:\ datasource\ temp\ zwpt_huangshi_new.dmp log=D:\ datasource\ temp\ exp_smsrun.log in the cmd command window to view the tablespace usage SELECT a.tablespace_name "tablespace name", total/1024/1024 "tablespace size unit M", free/1024/1024 "tablespace remaining size unit M", (total-free) / 1024max 1024 "tablespace size unit M" Round ((total-free) / total, 4) * 100 "usage [[%]]" FROM (SELECT tablespace_name,Sum (bytes) free FROM DBA_FREE_SPACE GROUP BY tablespace_name) a, (SELECT tablespace_name,Sum (bytes) total FROM DBA_DATA_FILES GROUP BY tablespace_name) b WHERE a.tablespace_name = b.tablespace_name Check the current user tablespace select default_tablespace from dba_users where username='TMS21'; to view the current tablespace, physical files, whether to automatically expand select tablespace_name,file_name,autoextensible from dba_data_files; enable automatic extension syntax: turn off automatic extension syntax: alter database datafile 'corresponding data file path information' autoextend on; alter database datafile 'corresponding data file path information' autoextend off' Check the resource_limit parameter: if show parameter resource_limit is FALSE, set the RESOURCE_LIMIT parameter to TRUE, that is, enable resource restrictions: alter system set resource_limit = TRUE;. The change is not valid for password resources. Password resources are always available. Create PROFILE: create profile sess limit sessions_per_user 20 hands-maximum number of connections is 20. Assign PROFILE to users: alter user ydgwb profile sess The synonym synonym CREATE [OR REPLACE] [PUBLIC] SYSNONYM [current user.] synonym_nameFOR [other users.] object_name; grants select (read-only) permission to the table or view of the specified user, where test is the table name or view name grant select on test to A

The order in which an oracle table is created: Super user login-"create tablespace -" create user-"authorized user"

This is the end of the content of "what are the common operations of oracle"? thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Internet Technology

Wechat

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

12
Report