Vous êtes sur la page 1sur 13

1) how can you tune your data base?

There are so many areas where a DBA need to concentrate to tune the database. Fe w of these areas are dependent of each other. So we need to very careful regardi ng side effect of one side tuning to other. As a thumb rule, we generally apply the DAMICO method to tune our database. That is design of the database, tuning the application(sql tuning), memory tuning, I/O tuning, contention tuning and OS tuning. 2) what will you do if you get a complain your database is slow? If we get a complaint regarding database slowness, first of all we need to ensur e whether the issue is user specific, module specific or on entire application l evel. In order to understand better problem, you should ask questions to yoursel f or person encountering performance issue like 1. Is whole application slow or only component of the application is slow? ( like only concurrent manager running slow) 2. Is this a particular component like report server slow then is a particu lar report or all reports are slow? 3. Is performance issue during all time or at specific time lets say from 11 AM to 4PM? 4. Was performance issue popped up recently or performance degradation is s ince long? 5. What changed recently? Depending on answer you can start looking into application like if issue is user specific, module specific or on entire application level. If it is user specific problem, trace the user session and find the root cause o f the problems and area where database is performing poorly, and either tune (if possible) or kill the session. At broad level, we need to focus on these areas and to find the root cause of the problems. 1. Is gather stats schedule (atleast weekly?)? 2. Is Purge Obsolete Workflow request & concurrent request purging schedule d? 3. Is there any runaway process on database tier or application tier? (Runa way process is process taking unexceptionally long time with high CPU or memory usage) 4. Any discoverer process taking long time or high CPU? (usually on Middle tier like dis4ws..) 5. Any custom report taking long time? 3) what is the diff between lock and deadlock? A lock enables multiple users to access the database concurrently. When a user m odify the database record, a lock is applied on that record and it prevents othe r users to write to database. Depending on the various modification tasks, a loc k can be classified into three categories: exclusive lock, shared lock and updat e lock. Whereas a deadlock is a situation where two or more transactions are put into wait state simultaneously, each transaction acquires a lock that prevents other transaction to write until it get released.and in this situation, each wai ts for the other transaction to get released. Whenever we get a deadlock situati on, in the alert log file, we can see ORA-00060 error. We need to trace the sess ion experiencing the deadlock and take the appropriate action to kill one sessio n. 4) Explain what and how is your database architecture designed ( nodes) 5) what is the diff workflow and concrent request. Business processes revolve around routing information through various users thro ugh set of constantly changing rules. The flow of information is governed by var ious conditions and checking for outcome of previous steps. An established proce ss of routing will be subject to continuous monitoring and rounting. Each organi

zation follows a different set of business practices.Workflow gets the right inf ormation to the right people. Workflow lets you provide each person with all the information they need to take an action. Workflow can route supporting informat ion to each decision maker in a business process. When a user runs a report, a request to run the report is generated. The command to run the report is a concurrent request. The program that generates the repor t is a concurrent program. Concurrent programs are started by a concurrent manag er. Every time your users request a concurrent program to be run, their request is inserted into a database table, and is uniquely identified by a request ID. C oncurrent managers read requests from this table. 6) what is the diff be env file and xml file. Oracle Applications Environment Files are the files which are used to source the system directly. There are different types of environment files in oracle appli cations which are used to source database tier, http server, technology stack an d applications. Its naming convention is either <CONTEXT_NAME>.env or APPS<CONTEX T_NAME>.env. APPS<CONTEXT_NAME>.env is called consolidated environment file beca use it sources both technology stack and applications. Oracle application context file is an xml file which is a central repository to store configuration parameters of oracle applications. When we run autoconfig, e ach products template file use the context file to populated and create new confi guration file. 7) how can you check your serves details, including how many nodes are there, ho w many servers , how many threads, how many instance. 8) steps of backup (RMAN) and recovery. 9) Error in RMAN backup and recovery. RMAN fails with ORA-01031 (insufficient privileges) or ORA-01017 (invalid userna me/password) errors when trying to connect to the target database RMAN-10003: unable to connect to target database using connect string system/man ager@proddb" RMAN-04004: error from recovery catalog database: ORA-28009: connection as SYS s hould be as SYSDBA or SYSOPER RMAN-20202: Tablespace not found in the recovery catalog RMAN-03009: failure of backup command on ch2 channel at 11/07/2011 17:37:00 ORA-19504: failed to create file "/PDF/AMDD_BACKUP/AMDD_Lvl0_Hot_Back" ORA-27038: created file already exists RMAN-03009: failure of allocate command on t1 channel at 07/21/2005 13:49:06 ORA-19554: error allocating device, device type: SBT_TAPE, device name: ORA-27211: Failed to load Media Management Library RMAN-03009: failure of backup command on ch00 channel at 02/04/2010 23:34:43 ORA-19566: exceeded limit of 0 corrupt blocks for file /db/FINPRODDATA/oradata/p sindex.dbf RMAN-06012: channel: C2 not allocated RMAN-06023: no backup or copy of datafile 4 found to restore RMAN-06059: expected archived log not found, lost of archived log compromises recoverability RMAN-05001: auxiliary file name conflicts with a file used by the target databas e . RMAN-05501 Getting this when creating standby database RMAN-06002: command not allowed when not connected to a recovery catalog 10) Error in patching and how to rectify patch failure issue in database Unable to copy the files: adpatch fails when it does not find space to copy all

the files in the product_top. Resolution: add space to product_top and restart the patch Adpatch is failing during pre-req checks Resolution: this will happen because adsnapshot has been not properly upgraded. In this case, we have two options a) stop the adpatch, once the utility completes, restart the adpatch b) go to adadmin and maintain snapshot information or apply the patch with noprereq option. c) Relinking of executable files is failed Resolution: go to $ORACLE_HOME/lib/stubs. In this location, you will find a file called libc.so. this file should always point to current instance. Issue with adjava Resolution: you need to ensure that the classpath environment variable is proper ly set and adsign.txt located at $APPL_TOP/admin should have correct digital sig nature. Compilation of jsp files is failing Resolution: manually complile the jsp files using ojspcompile.pl. in this situat ion, noautoconfig, nocompilejsp, hidepasswd only these are used to run adpatch. Adpatch is erroring out stating missing product. Resolution: applprod.txt will have all the information of product tops. Although apps password is correctly given adpatch fails. This happens because applsys ac count get locked. So you need to unlock the applsys account. Odf file fails Resolution: existing object may be present or unable to run sql statements. Go t o log file, copy the location of the sql file and run the sql file manually. If the sql file successfully executes, go to adctrl and skip the worker. Failure of .pls files Resolution: execute it manually otherwise troubleshoot it based on error. Possib le reasons are lack of permissions or additional procedures. Failure of .ldt files Resolution: run the .ldt file manually using FNDLOAD. Failure of .wft files Resolution: run .wft file manually using WFLOAD. .fmx is failed to regenerate Resolution: see the .fmb code to see which procedure is being coded in the form. Go and compile the procedure manually. .rdf is failed to regenerate Resolution: see the .rdf code to see which procedure is being called in the form , go and compile the procedure manually. 11) Difference between R11 and R12 ? Plugin for forms 11i uses JInitiator as the default plugin R12 replaces JInitiator with Sun Java Plugin Forms Mode Default mode in 11i is socket mode In R12, its servlet mode Report Server

No report server in R12 Apache Version 11i- 1.3.19 R12- 1.3.31 Forms Version 11i- 6i R12- 10g JDK Version R12 uses JDK 1.5 for web and concurrent processing Servlet container 11i- Jserv R12- OC4J ORACLE_HOME 11i- 8.0.6 ORACLE_HOME R12- ORACLE AS10g 10.1.2 11i- IAS_ORACLE_HOME (8.1.7) R12- ORACLE AS10g 10.1.3 R12 introduces INST_TOP which contains the startup-shutdown scripts, configurati on and log files. 12) AWR report 13) health check up? 14) Define and Issues related with with concurrent manager and workflow? 15) What is the diff between different type of concurrent request? 16) if a worker fails repetitively , what will you do? 17) Issue related regenerating jar files Sometimes, some jar files are not loaded by adadmin, in this situation, we need to load the jar files manually using loadjava command. e.g., loadjava user apps/apps v force resolve <JAR FILE PATH> 18) steps of patching and cloning in oracle apps, including multinode. 19) Error occurred after patching and cloning? 20) relink? 21) what do you mean by begin backup mode and end backup mode ? 22) difference between putting database in begin backup mode and stopping the se rvices ? 23) issues with forms server Form server is not coming up or hanging Stop the forms and check whether the forms port is avaliable or occupied by any process by using netstat command. Stop the forms and check for forms processes if you find any kill them, before starting the forms makesure that there are no forms processes running specific t o that instance. Verify the size of the log files, it should not be greater than 2gb 23) where are the configuration file located and how to amend ( conc, appache , form, dicoverer) 24) location of log files 25) issues with users regarding the forms FRM-92010 Cause: This error can occur when JInitiator uses the browser s proxy setting. Solution: Go to Control Panel | JInitiator 1.3.x.x | Proxies and deselect Use Browser Sett ings and enter the details for the proxy settings. FRM-92050 Heavy load on the server.

Cause: If there are many simultaneous requests that the server cannot handle. This main ly depends on the server computer performance and configuration. Solution: The Forms Runtime Prestart feature of Oracle Application Server Forms Services 1 0g comes in handy in this situation. This feature pre-spawns a configurable numb er of runtime engines to handle incoming client requests, and avoiding applicati on or server hangs because of a rush. Upgrade the hardware of the server computer to handle the high number of simulta neous requests. Missing serverURL Parameter Cause: The serverURL parameter is either missing or incorrect, in the configuration fil e (formsweb.cfg) Solution: Edit the forms configuration file to enter a valid serverURL parameter value. Wrong FORMS_TIMEOUT Cause: The value of FORMS_TIMEOUT parameter is entered wrongly. Solution: Verify the environment file (default.env) and the registry for the FORMS_TIMEOUT parameter value. The value should be a proper integer. The value should not be in quotes, for example: FORMS_TIMEOUT="10" This is an incorrect entry. FORMS_TIMEOUT=10 This is the correct entry. Incorrect Use of RUN_PRODUCT Cause: RUN_PRODUCT should only be used, in Oracle Forms, for integration with Oracle Gr aphics 6i. Solution: RUN_PRODUCT Built-in calls that are used to integrate Oracle Forms with Oracle R eports should be replaced using the newer RUN_REPORT_OBJECT Built-in. Missing ServerArgs parameter Cause: The ServerArgs parameter is missing from the HTML, which loads the applet. Solution: Make sure that the HTML file, used to load the forms applet, has the ServerArgs parameter in it. Make sure that the value of the ServerArgs is not null. Remember, the Form name is required in ServerArgs. These parameters can be defined in the Oracle Forms c onfiguration file (formsweb.cfg) or can be directly passed in the URL that is us ed to run the Form. Missing jvm.dll Cause: The Forms Web executable frmweb.exe is not able to find the jvm.dll Solution: Ensure that jvm.dll is located in a directory specified in the PATH environment variable. Set the PATH environment variable in formsweb.cfg, which is typically ORACLE_HOME/forms/server/default.env, to point to the location of the jvm.dll. FRM-92100 Cause: This error occurs if the Web server is shutdown when the user is accessing the a pplication Solution: Check if the Web server is up and running. Try the URL http://servercomputer:por tno. If the OC4J home page does not come up, then it indicates that the Web server is down. Contact your Forms or server administr ator to start the Web server. FRM-92101

Wrong working directory Cause: This error can occur if the working directory specified does not exist. Solution: This can be confirmed by looking for a log message like Unable to switch to Worki ng Directory:<workingDirectory> in the application.log file. The application.log file can be found in the application-deployments/formsapp directory of the OC4J instance on which Oracle Forms is deployed. Edit the forms configuration file with the corre ct working directory. FORMS_TIMEOUT and heartbeat Cause: This error can occur if the forms applet parameter heartbeat is set to a value mor e than FORMS_TIMEOUT. Solution: Generally, heartbeat is set to a value higher than that of FORMS_TIMEOUT, only w hen the application is desired to time-out after a certain time of inactivity. I t is then, you would get a FRM -92120. If that is not desired for a particular a pplication, then, make sure that the value of heartbeat is less than that of FORMS_TIMEOUT. FRM-92102 Cause: This error can occur because of the network problems between the Web server and the client. The client is not able to communicate with the server on the specifi ed port. Solution: Add the parameter networkRetries to the forms configuration file. Set the value to a suitable number according to the network characteristics and needs, for exa mple, networkRetries=30 This parameter specifies the number of times the Forms c lient should try reconnecting to the middle tier before finally timing out. Ports Blocked Cause: If the error occurs even after setting up an appropriate value for networkRetrie s, it could be due to the ports on the web server restricted at TCP/IP level. Solution: A socket connection requires a port at each end. If the port is closed it causes the communication stoppage. Firewall and proxies are used to protect the ports. Removing the blocks on the ports on the Web server solves the error. FRM-92120 Cause: This is a server configuration error, which occurs when the client is unable to find the file Registry.dat on the middle tier. Solution: When this error occurs, check if the file Registry.dat is present on the middle tier in the directory ORACLE_HOME/forms/java/oracle/forms/registry. If it is not present, then it needs to be placed. In a running Forms application, if you suddenly come across this error, there is a possibility that the HTTP server has gone down. You may verify this by typing the URL http://myserver.com:NNNN in your browser. Here you need to replace myse rver.com with your host name and NNNN with your HTTP servers port number. If your browser says that it could not connect to the server, then your HTTP server is down and you need to contact your system administrator to bring it up. When the HTTP server is up and running, on giving the URL http://myserver.com:NNNN your browser will show the OracleAS welcome. FRM-92150/FRM-92160 Cause: Wrong path and/or codebase setting. Solution: Set the proper ORACLE_HOME/bin in the beginning of the system path. The CODEBASE entry in your HTML file or forms configuration file may point to older versions

of the Jar file. Either modify the codebase entry in your configuration file or replace the jar file in the codebase path with the appropriate jar file. Cleari ng the Oracle Jar cache in the user profile directory of the client computer mak es sure that the fresh Forms Jar files are downloaded. 26) web address of database. jdbc:oracle:thin:@hostname:1521:ORA11 27) issues with listener and tns ORA-03113: TNS:end-of-file on communication channel Cause: An error has occurred on the database server. Action: Check the alert_sid.log file on the server. An unexpected end of file wa s processed on the communication channel. This may be an indication that the com munications link may have gone down at least temporarily, or it may indicate tha t the server has gone down.You may need to modify your retransmission count. ORA-12154: TNS:could not resolve the connect identifier specified Cause: A connection to a database or other service was requested using a connect identifier, and the connect identifier specified could not be resolved into a c onnect descriptor using one of the naming methods configured. For example, if th e type of connect identifier used was a net service name then the net service na me could not be found in a naming method repository, or the repository could not be located or reached. Action: Perform the following steps: 1. Check the type of naming adapters listed in the names.directory_path paramete r in the sqlnet.ora file. If none are configured, then use the adapters command to determine which adapters are in use. The following example s hows the adapters: $ adapters ... Installed Oracle Net naming methods are: Local Naming (tnsnames.ora) Oracle Directory Naming Oracle Host Naming NIS Naming The net service name given in the connect string should be defined for at least one of the naming methods. 2. Check the resolution path for each adapter for possible problems. For example , ensure that the name given in the connect string is correct and complete, usin g the full name of the net service if necessary. When using the local naming method, do the following: 1. Verify that the tnsnames.ora file exists and is in the correct location. The location is either the ORACLE_HOME/network/admin directory or the directory spec ified by the TNS_ADMIN environment variable. 2. Verify there is an entry in the tnsnames.ora file for the name given in the c onnect string. This net service name should match the name in the tnsnames.ora f ile exactly if the name is simple and there is not NAMES_DEFAULT_DOMAIN in the s qlnet.ora file, or the net service name is a fully-qualified name. If the net se rvice name in the connect string is simple, then check the NAMES_DEFAULT_DIRECTO RY parameter in the sqlnet.ora file. Its value is appended to the net service na me given in the connect string. This fully-qualified name should be the entry in the tnsnames.ora file. 3. If you are connecting from a login dialog box, then verify that you are not p lacing an at sign (@) before your connect net service name. 4. Activate client tracing and repeat the operation. When using the directory naming method, do the following: 1. Verify the ldap.ora file exists and is in the correct location. The following directories are searched for ldap.ora file in the order given. The ldap.ora fil e found will be used.

The directory specified by the TNS_ADMIN environment variable. The ORACLE_HOME/network/admin directory. The directory specified by the LDAP_ADMIN environment variable. The ORACLE_HOME/ldap/admin directory. 2. Verify that the parameters defined in the ldap.ora file are correct, as follo ws: The DIRECTORY_SERVERS parameter defines the correct host and port for one or mor e valid LDAP servers. The DEFAULT_ADMIN_CONTEXT parameter defines the location of the Oracle Context i n this directory which should include the net service entry. If the ldap.ora file does not exist, then these parameters will be resolved usin g automatic discovery. 3. Verify that the LDAP server host and port are defined in DNS. 4. Verify that the directory has the default Oracle Context defined. 5. Use the ldapsearch utility or a directory administration tool to verify that the net service object exists in the Oracle Context at the location given by the value of the DEFAULT_ADMIN_CONTEXT parameter. When using the Easy Connect naming method, do the following: 1. Verify that the host name give is correct, and is defined in the local host n ame resolution service, such as local hosts file, DNS, and so on. When using the external naming method, do the following: 1. Verify that the NIS file for tnsnames is properly set up. 2. Check that the net service name matches the tnsnames entry as described in th e preceding local naming section. ORA-12170: TNS:Connect timeout occurred Cause: The client failed to establish a connection and complete authentication i n the time specified by the SQLNET.INBOUND_CONNECT_TIMEOUT parameter in the sqln et.ora file. This error may be a result of network or system delays, or it may i ndicate that a malicious client is trying to cause a denial-of-service attack on the database server. Action: If the error occurred due to system or network delays that are normal fo r the particular environment, then perform the following steps: 1. Turn on tracing to determine which clients are timing out. 2. Reconfigure the SQLNET.INBOUND_CONNECT_TIMEOUT, SQLNET.SEND_TIMEOUT, or SQLNE T.RECV_TIMEOUT parameters in sqlnet.ora to a largervalue. If you suspect a malicious client, then perform the following steps: 1. Restrict access to the client. For example, you can configure parameters for access rights in the sqlnet.ora file. 2. Locate the IP address of the client in the sqlnet.log file on the database se rver to identify the source. Remember that an IP address can be forged. For example, the following sqlnet.log excerpt shows a client IP address of 192.168.2.35. Fatal NI connect error 12170. VERSION INFORMATION: TNS for Linux: Version 11.2.0.0.0 Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.0.0 TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.0.0 Time: 03-MAY-2009 13:51:12 Tracing to file: /ora/trace/svr_13279.trc Tns error struct: nr err code: 0 ns main err code: 12637 TNS-12637: Packet receive failed ns secondary err code: 12604 nt main err code: 0 nt secondary err code: 0 nt OS err code: 0 Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.35)(PORT=52996)) If the time out occurs before the IP address can be retrieved by the database se rver, then enable listener tracing to determine the client that made the request

. TNS-12500/ORA-12500: TNS: listener failed to start a dedicated server process Cause: The listener failed to start the Oracle program. Possible reasons include : The maximum number of processes allowed for a single user was exceeded The listener does not have execute permission on the Oracle program The associated Microsoft Windows service is not started In some cases, these errors can be caused by the same conditions which cause the following errors: TNS-12549/ORA-12549 TNS-00519 TNS-12540/ORA-12540 TNS-00510 TNS-12560/ORA-12560 Action: Perform the appropriate action: Increase the number of processes by setting the PROCESSES parameter in the datab ase initialization file to a larger value. Check the listener.log file for detailed error stack information. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor Cause: The listener received a request to establish a connection to a database o r other service. The connect descriptor received by the listener specified a ser vice name for a service (usually a database service) that has either not yet dyn amically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has s tarted, but before the database instance has registered with the listener. Action: Perform the following steps: 1. Wait a moment, and then try to connect a second time. 2. Check which services are currently known by the listener by running the Liste ner Control utility STATUS or SERVICES command. 3. Check that the SERVICE_NAME parameter in the connect descriptor specifies a s ervice name known by the listener. 4. Check for an event in the listener.log file. ORA-12520: TNS:listener could not find available handler for requested type of server Cause: The type of service handler requested by the client is incorrect or not r egistered for the requested SERVICE_NAME/INSTANCE_NAME, or the database instance is not registered with the listener. Action: If you suspect the problem is the wrong type of service handler, then pe rform the following steps: 1. If (server=value) is set in the connect descriptor, then ensure that the valu e is set to the appropriate service handler type for the database, that is, dedi cated for dedicated server or shared for dispatchers. You can use the Listener C ontrol utility SERVICES command to see what service handlers are currently regis tered with the listener. 2. If USE_DEDICATED_SERVER is set to ON in the sqlnet.ora file, then ensure the database is configured to use dedicated servers. If it is not, then set this par ameter to OFF. 3. Ensure that the database instance is running. If the instance not running, th en start it so that it can register with the listener. ORA-12521: TNS:listener does not currently know of instance requested in connect descriptor Cause: The instance name in the connect descriptor is incorrect, or the database instance is not registered with the listener. Action: Perform the following steps: 1. Ensure that the service name specified in the connect descriptor is correct. 2. Ensure that the database instance is running. If the instance not running, th en start it so that it can register with the listener. You can use the Listener Control utility SERVICES command to see what instances are currently registered

with the listener. ORA-12525: TNS:listener has not received client s request in time allowed Cause: The client failed to complete its connect request in the time specified b y the INBOUND_CONNECT_TIMEOUT_listener_name parameter in the listener.ora file. This error may be a result of network or system delays, or it may indicate that a malicious client is trying to cause a denial-of-service attack on the listener . Action: If the error occurred due to system or network delays that are normal fo r the particular environment, then reconfigure the INBOUND_CONNECT_TIMEOUT_liste ner_name parameter in listener.ora to a larger value. If you suspect a malicious client, then perform the following steps: 1. Locate the IP address of the client in the listener.log file to identify the source. Remember that an IP address can be forged. For example, the following listener.log excerpt shows a client IP address of 192.168.2.35. 03-MAY-2009 16:42:35 * <unknown connect data> * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.35)(PORT=53208)) * establish * <unknown sid> * 12525 TNS-12525: TNS:listener has not received client s request in time allowed TNS-12604: TNS: Application timeout occurred 2. Restrict access to the client. For example, you can configure parameters for access rights in the sqlnet.ora file. ORA-12533: TNS:illegal ADDRESS parameters Cause: The protocol specific parameters in the ADDRESS section of the designated connect descriptor are incorrect. Action: Correct the protocol address. TNS-12540/ORA-12540: TNS:internal limit restriction exceeded and TNS-00510: Internal limit restriction exceeded Cause: An internal limit has been exceeded. Possible limits include: Number of open connections that Oracle Net can process simultaneously Number of memory buffers which can be used simultaneously Number of processes a particular database instance is allowed The first two are examples of hard limits. The third is an example of a limit wh ich can be increased by setting PROCESSES parameter in the database initializati on file to a larger value. In this case, a TNS-12500/ORA-12500 error is also ret urned. In some cases, these errors can be caused by the same conditions which ca use TNS-12549/ORA-12549 and TNS-00519 errors. Action: Wait for the open connections to close and retry. If the error persists, then check the sqlnet.log or listener.log file for detailed error stack informa tion. TNS-12541/ORA-12541: TNS:no listener Cause: The connection request could not be completed because the listener is not running. Action: Perform the following actions: Ensure that the supplied destination address matches one of the addresses used b y the listener. Verify that the listener is running at the address specified by the request. Ensure the listener is listening on the host and port specified by the request. Verify the client is pointing to the listener. TNS-12549/ORA-12549: TNS:operating system resource quota exceeded and TNS-00519: Operating system resource quota exceeded Cause: A quota or hard limit imposed by the operating system has been exceeded. Possible limits include: The maximum number of processes allowed for a single user The operating system is running low on paging space Action: Perform the appropriate action: Increase the number of processes by setting the PROCESSES parameter in the datab ase initialization file to a larger value. Check the sqlnet.log or listener.log file for detailed error stack information, such as an operating system error code to help identify which

quota has been exceeded. TNS-12560/ORA-12560: TNS:protocol adapter error occurred Cause: There was an error when using a particular protocol. This error may be du e to incorrect configuration of an ADDRESS parameter or may occur due to errors returned from the underlying protocol or operating system interface. In some cases, these errors are caused by the same conditions which cause TNS-00510, TNS-00519, TNS-12540/ORA-12540, TNS-12549/ORA-12549 errors. Action: This error occurs on Microsoft Windows systems only. Perform the following actions: 1. Select Run from the Microsoft Windows Start menu. 2. Enter MSCONFIG in the Open field. 3. Go to the Services tab. 4. Enable OracleServicesid if it is disabled. 5. Restart the computer. 6. Check that Oracle Services has started. 28) corrupt blocks in the table space 1. If you run in archivelog mode, the best resolution is to restore the fil e from backup and recover. You can find the name of the datafile with the corrup ted block by querying dba_data_files or v$datafile and using the file number fro m the ora-1578. You will want to correct your hardware problem before you restor e. If the corruption is the result of a bad disk, you can restore the datafile from backup to a good disk, startup mount, and rename the datafile to the new locati on before you recover. If you do not run in archivelog mode, the first thing to do is to find out what object is corrupted. The following query will tell you: SELECT SEGMENT_NAME, SEGMENT_TYPE FROM DBA_EXTENTS WHERE FILE_ID = f AND b BETWEEN BLOCK_ID AND BLOCK_ID + BLOCKS - 1; If the segment is an index, simply drop and recreate it. If the segment is a table, it must be understood that the data within the corrupt block is lost. Suppose you have corrupted table emp with columns empno, ename and deptno. Also suppose you have an index on the empno column. Every row in a non-clustered table has a unique rowid pseudocolumn containing its address. Indexes hold rowids for each row in a table, so you can select from the table via the index and avoid the corrupt block by using the rowid in a where clause. ROWID: The rowid is in hexidecimal and is 18 characters long: 8 characters of block address, a period, 4 characters of row address, a period, and 4 characters of file address. If we issued SELECT EMPNO, ROWID FROM EMP WHERE EMPNO &gt; 0; we would get something like: empno ----100 101 rowid ----00000003.0000.0006 00000003.0001.0006

102 103 . . . 500 501 . . . 755 756

00000003.0002.0006 00000003.0003.0006

00000004.0000.000A 00000004.0001.000A

0000001A.0005.000A 0000001A.000C.000A

Note that if the index were on a character column we would change the above query to WHERE EMPNO &gt; ; Assume that you had: 01578, 00000, "ORACLE data block corrupted (file # 10, block # 4) You can find all of the empnos for employees in the corrupted blocks with: SELECT EMPNO, ROWID FROM EMP WHERE EMPNO &gt; 0

EMPNO ----500 501

ROWID ----00000004.0000.000A 00000004.0001.000A

You could create a new table with the same definition as the emp table: CREATE TABLE TEMP AS SELECT * FROM EMP WHERE 1 = 2; and then insert into that table around the corruption: INSERT INTO TEMP SELECT * FROM EMP WHERE EMPNO &lt; 500; INSERT INTO TEMP SELECT * FROM EMP WHERE EMPNO &gt; 501; Then drop the original table and rename temp. You then need to find out from

AND ROWID LIKE

00000004.%.000A ;

backups or paper records what information you have lost for empnos 500 and 501. 8. If you had many different rows in the corrupt block it might be easier to issue the following: CREATE TABLE EMPNOS AS SELECT EMPNO FROM EMP WHERE EMPNO &gt; 0

This gives you all empnos which were not in the corrupt block. You would then issue: CREATE TABLE TEMP AS SELECT * FROM EMP WHERE 1 = 2; INSERT INTO TEMP SELECT EMP.EMPNO, EMP.ENAME, EMP.DEPTNO FROM EMP, EMPNOS WHERE EMP.EMPNO &gt; 0 AND EMP.EMPNO = EMPNOS.EMPNO; 29) 30) 31) 32) recovery of diff types of tablespace. how do you check performance issues in your database. ticketing flow. database trigger ?

AND ROWID NOT LIKE

00000004.%.000A ;

Vous aimerez peut-être aussi