Common Database Operations at work

Source: Internet
Author: User

Common Database Operation 1 in work. create a tablespace in PLsql: Method 1: create tablespace biaokongjian [tablespace name] datafile 'd: \ oracle \ product \ 10.2.0 \ oradata \ ORCL \ temp. dbf' [tablespace data storage address and file name] size 100 m [start with the size of 2048 m] autoextend on next 32 m maxsize m [start with the size of m] create user fangpeng identified by fangpeng default tablespace biaokongjian; [create a user fangpeng with the password fangpeng in the tablespace] grant connect to fangpeng; [grant the user (connet) Permission] grant resource to fangpeng; [Assign the user (resour 3 ce) permission: Delete table NULL: Drop tablespace name including contents datafiles [Delete table space name including content and data files] Method 2: Create tablespace biaokongjian Datafile 'd: \ XXX. ORA 'size 200 reuse autoextend on next 1 m maxsize unlimited extent management local; 2. CMD export the LOCAL database (cmd-sqlplus-conn/as sysdba) 2.1 and export the LOCAL database: haibeitrunk/haibeitrunk @ orcl file = D: \ XXX. dmp 2.2, Export Database Table: haibeitrunk/haibeitrunk @ orcl file = D: \ xxx. dmp Tables = (table1, table2) 3.1. Import the local database: haibeitrunk/haibeitrunk @ orcl file = D: \ xxx. dmp 3.2, import the Cmd table in the local dmp and then haibeitrunk/haibeitrunk @ orcl file = D: \ xxx. dmp Tables = (table1, table2) 4.1, export others' database Step 1: ping, configure OK after next Cmd exp haibeitrunk/haibeitrunk@192.168.1.200 file = D: \ dd. dmp 4.2, Import another person's dmp Cmd to the database and then imp haibeigrid/haibeigrid @ orcl fromuser = lainame touser = localname file = D: \ aa. the dmp 1 and Window7 systems must run as administrators. the user name and password are sys and sys, And the identity is sysdatabase 2. Select a user and click Create on the right, create name password do not need to select 3, when creating a user role needs to check the connect and resource permission object select CTXSYS and then the package CTX-CLS and CTX-DDL and then the permission to check the check, click 'create '.

Related Article

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.