Oracle Common Fool question 1000 question (one)

Source: Internet
Author: User
Tags define file system integer modify sessions table name sqlplus linux
Oracle
Oracle Common Fool question 1000 question (one)



Author: ccbzzp



There are a lot of things that can come up to you when you're using Oracle, especially for beginners, today I simply end it, and I want to give it to everyone and hope it helps! And we explore together, together to move!

It is not necessary for Oracle masters to be seen.



1. Initial password after Oracle installation completed?

Internal/oracle

Sys/change_on_install

System/manager

Scott/tiger

Sysman/oem_temp



2. Oracle9iAS WEB Cache's initial Default user and password?

Administrator/administrator



3. How does Oracle 8.0.5 create a database?

With Orainst. If you have a motif interface, you can use the orainst/m



4. How does Oracle 8.1.7 create a database?

Dbassist



5. How does Oracle 9i create a database?

Dbca



6. What does the naked device in Oracle refer to?

Bare devices are the storage space that bypasses file system direct access



7. How does Oracle differentiate 64-bit/32bit versions???

$ Sqlplus '/as SYSDBA '
Sql*plus:release 9.0.1.0.0-production on Mon June 14 17:01:09 2003
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.0.1.0.0-production
With the partitioning option
Jserver Release 9.0.1.0.0-production
Sql> select * from V$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.0.1.0.0-production
Pl/sql Release 9.0.1.0.0-production
CORE 9.0.1.0.0 Production
TNS for Solaris:version 9.0.1.0.0-production
Nlsrtl Version 9.0.1.0.0-production
Sql>



8. What does svrmgr mean?

Svrmgrl,server Manager.
9i No, it's been replaced with Sqlplus.
Sqlplus/nolog
To an archive log type



9. How can I tell which machine the user is landing Oracle from?

SELECT machine, terminal from v$session;



10. What Statement query field?

DESC table_name can query the structure of a table
Select Field_name,... from ... You can query the value of a field

SELECT * FROM all_tables where table_name like '% '
SELECT * from All_tab_columns where table_name= '?? '



11. How to get trigger, procedure, function creation script?

Desc User_source
User_triggers



12. How to calculate the size of the space occupied by a table?

Select Owner,table_name,
Num_rows,
blocks*aaa/1024/1024 "Size M",
Empty_blocks,
Last_analyzed
From Dba_tables
where table_name= ' XXX ';

HERE:AAA is the value of db_block_size;
XXX is the table name you want to check



13. How do I see the maximum number of sessions?

SELECT * from V$parameter WHERE NAME like ' proc% ';

Sql>
Sql> Show parameter processes

NAME TYPE VALUE
------------------------------------ ------- ------------------------------
Aq_tm_processes Integer 1
Db_writer_processes Integer 1
Job_queue_processes Integer 4
Log_archive_max_processes Integer 1
Processes integer 200

Here are 200 users.

SELECT * from V$license;
The maximum number of sessions that Sessions_highwater records ever reached



14. How can I view the transaction time when the system is locked?

SELECT * from V$locked_object;



15. How to run Oracle in a archivelog manner.

Init.ora
Log_archive_start = True

Restart DATABASE



16. How to obtain the users who are using the database

Select username from v$session;



17. What is the maximum number of fields in the datasheet?

The maximum number of columns in a table or view is 1000



18. How to find the SID of the database?

Select name from V$database;
You can also view the Init.ora file directly



19. How do I view the native IP address through sqlplus on an Oracle server?

Select Sys_context (' Userenv ', ' ip_address ') from dual;

If you are landing the local database, you can only return 127.0.0.1, hehe



How do I adjust the time of the database under UNIX?

Su-root
Date-u 08010000



21. How do I grab a memo type of blank data record in Oracle table?

Select remark from Oms_flowrec where trim ("from remark" is not null;




22. How to use BBB data to update the AAA table data (related fields)

UPDATE AAA SET bns_snm= (SELECT bns_snm from BBB WHERE AAA. DPT_NO=BBB. DPT_NO) WHERE BBB. Dpt_no is not NULL;



P4 Computer Installation Method

Convert SYMCJIT.DLL to Sysmcjit.old



24. How to inquire about the server is not ops?

SELECT * from V$option;

If parallel server=true has OPS,



25. What is the right limit for each user?

SELECT * from Dba_sys_privs;



26. How do I move the table space?

ALTER TABLE table_name Move tablespace_name;



27. How do I move the index to the table space?

ALTER INDEX index_name REBUILD tablespace tablespace_name;



28. How do I activate DBA STUDIO under Linux,unix?

Oemapp Dbastudio



29. What's the image of the lock?

V$lock, V$locked_object, V$session, V$sqlarea, v$process;

Check the way to lock the table:

SELECT S.sid session_id, S.username, DECODE (lmode, 0, ' None ', 1, ' Null ', 2, ' Row-s (SS) ', 3, ' Row-x (SX) ', 4, ' Share ', 5, ' S/row-x (SSX) ', 6, ' Exclusive ', To_char (Lmode)) Mode_held, DECODE (REQUEST, 0, ' None ', 1, ' Null ', 2, ' Row-s (SS) ', 3, ' Row -X (SX) ', 4, ' Share ', 5, ' S/row-x (SSX) ', 6, ' Exclusive ', To_char (REQUEST)) mode_requested, o.owner| | o.object_name| | ' ('|| o.object_type| | ') ', S.type Lock_type, L.id1 lock_id1, L.id2 lock_id2 from V$lock L, SYS. Dba_objects O, v$session S WHERE l.sid = s.sid and l.id1 = o.object_id;



30. How do I unlock it?

ALTER SYSTEM KILL session ' sid,serir# ';



How do I modify the editor under Sqlplus?

DEFINE _editor= "< Editor's full path >"--double quotes must be added
To define a new editor, or you can write this in $oracle_home/sqlplus/admin/glogin.sql to make it permanent.



What are the Oracle product functions?

Dbms_random. RANDOM



Linux to check the magnetic competition status command?

Sar-d



Under Linux, check CPU competitive status commands?

Sar-r



34. What is the previous user's image?

SELECT * from User_objects;

SELECT * from Dba_segments;



35. How do I get the wrong information?

SELECT * from User_errors;



36. How can I obtain a link?

SELECT * from Dba_db_links;



37. View data in library characters?

SELECT * from Nls_database_parameters;

SELECT * from V$nls_parameters;



38. Check the table space information?

SELECT * from Dba_data_files;



Oracle's interal user to password?

Modify Sqlnet. ORA

Sqlnet. Authentication_services= (NTS)



40. What is the solution to the JAVA.EXE?

It's usually a oracleorahomexihttpserver change to manual activation.

X is 8 or 9



41. How do I annotate tables and columns?

Sql>comment on table is ' table annotation ';

Note was created.

Sql>comment on column table. Column is ' column comment ';

Note was created.

Sql> SELECT * from user_tab_comments where comments isn't null;



42. How do I see the disk footprint of each table space?

sql> Col tablespace format A20

Sql> Select

b.file_id file ID number,

B.tablespace_name table space Name,

B.bytes byte Count,

(B.bytes-sum (NVL (a.bytes,0))) has been used,

Sum (NVL (a.bytes,0)) remaining space,

Sum (NVL (a.bytes,0))/(b.bytes) *100 percent remaining

From Dba_free_space A,dba_data_files b

where a.file_id=b.file_id

GROUP BY B.tablespace_name,b.file_id,b.bytes

ORDER BY b.file_id



43. What if Oracle is set to MTS or proprietary mode?

#dispatchers = "(protocol=tcp) (SERVICE=SIDXDB)"
Plus is MTS, the annotation is a private mode, and Sid refers to your instance name.



44. How do I know the current SCN number of the system?

Select Max (KTUXESCNW * Power (2) + KTUXESCNB) from X$ktuxe;



45. How do I take milliseconds in Oracle?

9i not supported before, 9i began to have timestamp.

9i can be used with select Systimestamp from dual;



If you have any questions, welcome to the discussion!



To continue ...






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.