After the Oracle database is installed, users such as Scott are locked by default and cannot log on to the database with Scott users.Log in with the user with ALTER USER database permission, and select Sysdba to execute the following command:Unlock
http://study.163.com/course/courseLearn.htm?courseId=932016#/learn/video?lessonId=1115367&courseId=932016Super Admin Sys/change_on_installGeneral Administrator System/managerNormal User: Scott/tiger (need to unlock)Big Data User (instance scenario
DROP TABLE * * * * purge;/to delete tables free space:If you do not add purge then it is equivalent to just put it in the Recycle Bin.Purge RecycleBin; /Empty Recycle BinGet current date (without time) select To_char (sysdate, ' yyyy-mm-dd ') as
After installing Linux, each time you have to start the corresponding service through the following command:Start Service DbstartStart Monitor Lsnrctl startStart the console emctl start DbconsoleThis article sets up Oracle power on auto-start with
1. Create a table in SYS mode that records the details of the client's login to the database serverCreate Tablelogon_logs (logon_time date,usernamevarchar2( -), machinevarchar2( -), Ipadrvarchar2( -), programvarchar2( -), modulevarchar2( -),
1. Create a table spaceCreate'/u01/oracle/oradata/orcl/yyy01.dbf' on Next 50m maxsize unlimitedextent Management local2. Create a userCreate User by yyy default tablespace yyy Temporary Temp DEFAULT3. User authorization--Grant/revoke Object
First check the Oracle parameters: Sql> Show Parameters SGA; NAME TYPE VALUE------------------------------------ ----------- -------LOCK_SGA Boolean TRUEPRE_PAGE_SGA Boolean TRUE If the value of the above two options is false, it needs to be
CREATE TABLEt_smaint_2016012703Parallel 4 nologging asSELECT /*+parallel (4) leading (s a) Use_hash (a) index (s idx_cs_service_record_md2_04)*/s.smaint_id, S.smaint_desc fromT_cs_service_record SJOINT_cd_maint A ona.smaint_id=s.smaint_id ands.sorg_
Querying the index of a specified tableSELECTT1. Table_name,t1. Index_name,t1. Index_type,t1. Uniqueness,t1. Table_owner,t1. Status,t1. Funcidx_status fromall_indexes T1WHERET1. Table_owner= UPPER('&owner') andT1. table_name=
1. Installing ORACLE-JDKTo open the terminal, use the following command:Java -version If you see output like the following, this means that you have not installed Java:The program 'java' can is found in the following packages: /c9> * default-JRE *
Migrate the entire database and database1) migrate the entire database, and then upgrade the database.
Step 1:Stop the database normally, and restart the database in read-only mode.
Startup mountAlter database open read only;
Step 2:
Basic methods for creating indexes in Oracle databases, oracle Indexes
How to create the best index?
1. Create an index explicitly
create index index_name on table_name(field_name)tablespace tablespace_namepctfree 5initrans 2maxtrans
Oracle11g installation error Summary
Summary of oracle11g installation errors:1. Run./runInstaller and report the following error:
You are atempting to install 64-bit Oracle on a 32-bit operating system, this is not support and will not work
Check
Oracle learning database data is saved as a file, oracle Database
It is often necessary to generate documents from the data in the database. Because you prefer the script method, you need to set the format when using spool, the following is a simple
Export a view
Today, my colleague asked me how to export a view. I rarely saw such a fine-grained requirement and tested it decisively:
[oracle@rac1 log]$ expdp xxx/xxx directory=DATA_PUMP_DIR dumpfile=view.dmp logfile=view_exp.log views=V_TESTLRM-00
Determine whether the table exists before Oracle deletes the table
If you delete a non-existing TABLE in Oracle, such as "drop table tableName", the following message is displayed:
ORA-00942: Table or view does not exist
If you execute this
Oracle determines whether a field exists before deleting a field
If you delete a non-existent field in the table in Oracle, such as "alter table test drop column xxx", the following message is displayed:
ORA-00904: "xxx": Invalid identifier
If
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