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

How to create tablespaces in oracle

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

Share

Shulou(Shulou.com)05/31 Report--

It is believed that many inexperienced people have no idea about how to create tablespaces in oracle. Therefore, this paper summarizes the causes and solutions of the problems. Through this article, I hope you can solve this problem.

When ORACLE EBS operates on a FORM interface, or when a background database manipulates a table, it is found that it has been in a "fake dead" state. It may be that the table is locked by a user, so that other users can not continue to operate.

The code is as follows:

-- Lock table query SQLSELECT object_name, machine, s.sid, s.serial#

FROM gv$locked_object l, dba_objects o, gv$session s

WHERE l.object_id = o.object_id

AND l.session_id = s.sid

Find the locked table and unlock it

The code is as follows:

-- release SESSION SQL:

-- alter system kill session 'sid, serial#'

ALTER system kill session '23,1647'

Oracle points to pay attention to creating tablespaces:

1. If you open it in tools such as PL/SQL, directly modify the italic bold part of the following code to execute

two。 Make sure the path exists, for example, [D:\ oracle\ oradata\ Oracle9i\], that is, the path where you want to save the file exists.

/ * divided into four steps * /

/ * step 1: create temporary tablespaces * /

The code is as follows:

Create temporary tablespace user_temp

Tempfile'D:\ oracle\ oradata\ Oracle9i\ user_temp.dbf'

Size 50m

Autoextend on

Next 50m maxsize 20480m

Extent management local

/ * step 2: create a data tablespace * /

The code is as follows:

Create tablespace user_data

Logging

Datafile'D:\ oracle\ oradata\ Oracle9i\ user_data.dbf'

Size 50m

Autoextend on

Next 50m maxsize 20480m

Extent management local

/ * step 3: create a user and specify a tablespace * /

The code is as follows:

Create user username identified by password

Default tablespace user_data

Temporary tablespace user_temp

/ * step 4: grant permissions to users * /

After reading the above, have you mastered how to create tablespaces in oracle? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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