Oracle Frequently Asked Questions 1000 questions (one)

Source: Internet
Author: User
Tags define file system integer query sessions table name sqlplus linux
Oracle may encounter a lot of problems when it comes to Oracle, especially for beginners, today I simply put it all together, and send it to everyone, I hope to help you!     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 the initial Default user and password for WEB cache? Administrator/administrator 3.   How does Oracle 8.0.5 create a database? With Orainst. If there is a motif interface, you can use 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 a bare device in Oracle refer to? A bare device is the storage space 7 that bypasses direct access to the file system. How does Oracle differentiate 64-bit/32bit versions??? $ Sqlplus '/as SYSDBA ' Sql*plus:release 9.0.1.0.0-production on Mon June 17:01:09 2003 (c) Copyright 2001 Oracle Cor Poration. All rights reserved. Connected to:oracle9i Enterprise Edition release 9.0.1.0.0-production and 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 do you mean, svrmgr? Svrmgrl,server Manager. 9i not, has changed to use Sqlplus Sqlplus/nolog into the archive log type 9. How can you 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 the 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 do I 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 for 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 is 200 users. SELECT * from V$license; The maximum number of sessions Sessions_highwater records ever reached is 14. How do I see the transaction time that 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 which users 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 do I find the SID of the database? Select name from V$database; You can also view Init.ora file 19 directly. How do I view a native IP address on an Oracle server by Sqlplus? Select Sys_context (' Userenv ', ' ip_address ') from dual; If you are landing the local database, you can only return 127.0.0.1, hehe 20. How do I adjust the time of the database under UNIX? Su-root date-u 08010000 21. How do you crawl a memo type of blank data record in an Oracle table? Select remark from Oms_flowrec where trim ("from remark" is not null; 22. How to update triple-A-rated data using BBB 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 's computer installation method will SYMCJIT.DLL to Sysmcjit.old 24.   Ho Cha server is not ops?   SELECT * from V$option; If parallel server=true has ops 25.   Ho Cha The rights of 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.   To check the status of the lock?   V$lock, V$locked_object, V$session, V$sqlarea, v$process; Methods for searching the locked table: SELECT s.sid session_id, S.username, DECODE (lmode, 0, ' None ', 1, ' Null ', 2, ' Row-s (SS) ', 3, ' Row-x (SX) ', 4, ' S Hare ', 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 full path >"-you must add double quotes to define a new editor, or you can write this in $oracle_home/sqlplus/admin/glogiN.sql inside makes it permanent.   What are the Oracle product functions? Dbms_random. RANDOM 33.   Linux Check the magnetic competition status command? Sar-d 33.   Linux Check CPU competitive status command? Sar-r 34.   To find out what the former user is like?   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.   The JAVA.EXE solution? The general is to change oracleorahomexihttpserver to manual activation can be 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 number of bytes, (B.bytes-sum (NVL (a.bytes,0))Used, SUM (NVL (a.bytes,0)) remaining space, sum (NVL (a.bytes,0))/(b.bytes) *100 remaining percent from D Ba_free_space A,dba_data_files b where a.file_id=b.file_id GROUP by b.tablespace_name,b.file_id,b.bytes 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!

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.