One. Frequently Asked Questions
1. Initial password after Oracle installation
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. Oracle 8.0.5 How to create a database
Use ORAINST. If there is a Motif interface, ORAINST / M can be used
4. Oracle 8.1.7 How to create a database
DBASSIST
5. How to create a database oracle 9i
DBCA
6. What is the naked device in Oracle?
Naked equipment is the storage space that bypass direct access to the file system
7. How can Oracle distinguish between 64-bit / 32bit versions? ? ?
$ SQLPLUS '/ As Sysdba'
SQL * Plus: Release 9.0.1.0.0 - Production ON MON JUL 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 PartInog 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.
No, there is no, it has been changed to use SQLPLUS.
SQLPlus / NOLOG
Type of archived
9. How do I tell which machine is logged into Oracle?
Select Machine, Terminal from v $ session;
10. What statement query the field?
DESC TABLE_NAME can look up the structure of the table
SELECT FIELD_NAME, ... from ... you can query the value of the field
Select * from all_tables where Table_name Like '%'
SELECT * ALL_TAB_COLUMNS Where TABLE_NAME = ''
11. How to get a trigger, process, and function creation script?
DESC User_Source
User_triggers
12. How to calculate the size of a space occupied?
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 to view the maximum number of sessions?
Select * from V $ Parameter where name like 'proc%;
SQL>
SQL> Show Parameter Processes
Name Type Value
-----------------------------------------
------------------------------
AQ_TM_PROCESS INTEGER 1
DB_Writer_Processes INTEGER 1
Job_Queue_Processes INTEGER 4
LOG_ARCHIVE_MAX_PROCESSSS INTEGER 1
Processes Integer 200
Here is 200 users.
SELECT * from V $ license;
Where the sessions_highwater record has reached the maximum number of sessions
14. How do I check the system locked transaction time?
Select * from v $ locked_Object;
15. How to run Oracle in ArchiveLog.
Init.ora
LOG_ARCHIVE_START = TRUE
Restart Database
16. How to get which users are using the database
Select Username from V $ session;
17. What is the maximum number of fields in the data sheet?
The maximum number of columns in the 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 to view this machine IP address through SQLPlus on the Oracle Server
Select Sys_Context ('Userenv', 'IP_Address') from Dual;
If it is logged to the native database, you can only return 127.0.0.1, huh, huh
20. How do I adjust the time when UNIX?
Su -root
Date -u 08010000
21. How to grab the MEMO type field in Oracle Table empty information record
Select Remark from OMS_FlowRec Where Trim ('' from remark) is not
NULL;
22. How to use the BBB table to update the AAA table information (related to the column)
Update aaa set bns_snm = (SELECT BNS_SNM from BBB WHERE
AAA.DPT_NO = bbb.dpt_no) where bbb.dpt_no is not null;
23. P4 computer installation method
Change Symcjit.dll to Sysmcjit.OLD
24. Which query server is OPS?
Select * from V $ Option;
If Parallel Server = True has OPS
25. What to check each user's permissions
Select * from DBA_SYS_PRIVS;
26. How to move the table space table
Alter Table Table_name Move TableSpace_name;
27. How to use the index moving table space
Alter Index Index_name Rebuild TableSpace TableSpace_name;
28. How to start DBA Studio under Linux, UNIX
Oemapp DBASTUDIO
29. The object of the query lock
V $ LOCK, V $ locked_Object, V $ Session, V $ SQLAREA, V $ Process;
The method of querying the lock 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 || '
('|| 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 to unlock
Alter System Kill Session 'SID, Serir #';
31. How to modify the editor under SQLPLUS
Define _Editor = " To define a new editor, you can also write this in $ oracle_home / sqlplus / admin / glogin.sql make it permanently valid. 32. Oracle generates a random function is DBMS_Random.random 33. Query Disk Competition Commands under Linux SAR -D 33. Query the CPU competitive situation command under Linux SAR -R 34. Query the current user object Select * from user_Objects; Select * from DBA_SEGMENTS; 35. How to get an error message SELECT *. 36. How to get link conditions SELECT * FROM DBA_DB_LINKS; 37. View the status status status Select * from NLS_DATABASE_PARAMETERS; Select * from V $ NLS_PARAMETERS; 38. Query Table Space Information Select * from DBA_DATA_FILES; 39. Oracle's Interedible user wants password Modify SQLNET.ORA SQLNET.AUTHENTICATION_SERVICES = (NTS) 40. Solutions for Java.exe Generally, OracleoraHomExiHttpserver is changed to handle. X is 8 or 9 41. How to give a list, column incorporation? SQL> Comment on Table Table IS 'Table Note'; Comments have been created. SQL> Comment on column table. Column is 'column annotation'; Comments have been created. SQL> SELECT * from user_tab_comments where comments is not null; 42. How do I see the condition of each table space? SQL> COL TABLESPACAT A20 SQL> SELECT B.File_ID file ID number, B. TableSpace_name table space name, B.bytes bit group number, (B.Bytes-sum (NVL (A.BYTES, 0)))) is used, SUM (NVL (A.BYTES, 0))) remaining space, SUM (NVL (A.BYTES, 0)) / (B.BYTES) * 100 remaining percentage 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. If the Oracle is set to MTS or dedicated mode? #dispatches = "(Protocol = TCP) (Service = SIDXDB)" Plus is the MTS, the comment is a dedicated mode, and the SID refers to your instance name. 44. How can I know the current SCN number of the system? SELECT MAX (KTuxescnw * Power (2, 32) KTuxescnb) from x $ ktuxe; 45. How to get milliseconds in Oracle 9i is not supported before, 9i starts with TimeStamp. 9i can use Select SystimeStamp from Dual; Everyone may encounter a lot of problems that seem difficult, especially for novices, today I will summarize it, release it to everyone, I hope to help everyone! Discuss with everyone, make progress together! It is not used by Oracle masters. 46. How do I get a return in the string? Select 'Welcome to Visit' || CHR (10) || 'www.9cbs.net' from DUAL 47. How is the Chinese sorted? Before Oracle9i, Chinese is sorted according to the binary coding. In Oracle9i, in accordance with Pinyin, Ministry, Sprinkler. Set NLS_SORT value SCHINESE_RADICAL_M Sort by the first (first order), the stroke (second order) Schinese_stroke_m Sort by the stroke (first order), the first (second order) SCHINESE_PINYIN_M Sort by Pinyin 48. Can the object name in oracle8i can use Chinese? can 49. How to change the SQL * PLUS boot option in WIN? SQL * Plus own option settings We can set in $ oracle_home / sqlplus / admin / glogin.sql. 50. How to modify the default date of the ORACEL repository Alter session set nls_date_format = 'YYYYMMDDH24MISS' Oral Can plus a line in Init.ora NLS_DATE_FORMAT = 'YYYYMMDDHH24MISS' 51. How to put a small table in a KeeP pool? ALTER TABLE XXX Storage (Buffer_Pool Keep); 52. How to check if a Patch is installed Check That ORAINVENTORY 53. How to make the SELECT statement to automatically generate a serial number Select Rownum, Col from Table; 54. How to know the tableSpace in a table in the information pants SELECT TABLESPACE_NAME from User_Tables Where Table_Name = 'Test'; Select * from user_tables There is a field tablespace_name, (Oracle); Select * from dba_segments where ... 55. How can I quickly make a backup table Create Table new_table as (SELECT * from Old_Table); 55. How to modify Procedure under SQLPlus Select Line, Trim (Text) t from user_source where name = 'a' Order by Line; 56. How to unlock procedure to be accidentally locked ALTER SYSTEM KILL Session, kill the session, but you have to check her session ID first oral Retreat the process again. 57. What is SQL Reference? It is a SQL manual, including grammar, functions, etc., the document center of Oracle official website has downloads. 58. How to view the status of the database Under UNIX PS-EF | GREP ORA Under Windows Whether the service is getting up Can you connect a database 59. How to modify the primary key of a table Alter Table AAA DROP CONSTRAINT AAA_KEY; Alter Table AAA Add Constraint AAA_KEY PRIMARY Key (A1, B1); 60. Change the size of the information file Use alter database .... datafile ....; The size of the manual changed the information file is not damaged for the original information file. 61. How do I check in Oracle in the run? View v $ sessions table 62. How can I see how many Tablespaces in the database? Select * from DBA_TABLESPACES; 63. How do I modify the number of user connections to the Oracle Database? Modify INITSID.ORA, increase the process, restart the database. 64. How to find the last updated time of a record Can be viewed with Logminer 65. How to read and write files in PL / SQL? UTL_FILE Pack allows users to read and write job system files via PL / SQL. 66. How to put "&" in a record? INSERT INTO A VALUES (Translate ('at {&} T', 'AT {}', 'at'); 67. How does EXP add Query parameter? Exp USer / pass file = a.dmp tables (bsempms) Query = '"where emp_no = /' s09394 / '/"; 68. About Oracle8i Support Simplified and Traditional Bad Sets? ZHS16GBK can be supported 69. What software is Data Guard? Is the replacement of Standby 70. How to create a spfile SQL> Connect / as sysdba SQL> SELECT * FROM V $ VERSION; SQL> CREATE PFILE from SPFILE; SQL> CREATE SPFILE FROM Pfile = 'e: /ora9i/admin/eygle/pfile/init.ora'; The file has been created. SQL> CREATE SPFILE = 'E: /ora9i/database/spfileeygle.ora' from Pfile = 'e: /ora9i/admin/eygle/pfile/init.ora'; The file has been created. Author: CCBZZP