Best Database Errors Interview Questions
Q – 1 How to Select 38th row details in table without using rownum?
Ans- Select * from Table_name
where rownum < 39
MINUS
Select * From Table_name
Where rownum < 38;
Q – 2 Display details of employees who are senior to there own manager?
Ans- select e.ename,e.hiredate,m.ename,m.hiredate from emp e,emp m
where e.mgr=m.empno
and e.hiredate<m.hiredate
Q – 3 How to resolve the sqlcode -501 error in db2?
Ans- This is due to the cursor declaration in which the application program has attempted to fetch some data’s into a cursor that was neither declared nor opened. So, Always follow DECLARE,OPEN,FETCH,CLOSE while working with cursors.
Q – 4 When e open the data base the data base gives error as initializing or terminating how we log into data base?
Ans- just wait for a few seconds and then try its Database initializing or shutdown in process
Q – 5 This is the exception raised when i am working with oracle 11g java.lang.ClassNotFoundException: oracle.jdbc.Driver.OracleDriver.. but i set the class path for both oracle and java?
Ans- ClassNotFoundException is the checked exception so we must handle that one or we can declare as throws keyword.
ex:
class EmployeeDao{
public static void main(String args[0]throws SQLException, ClassNotFoundException{
————
————-
}
}
Q – 6 TNS-00204: Started tracing in intlsnr
Ans- Cause:
Internal message- Successfully started tracing information.
Action:
None.
Please add more information about this Error
Q – 7 TNS-00205: Turning off tracing in intlsnr
Ans- Cause:
Internal message – Turned off tracing in the Interchange listener.
Action:
None
Please add more information about this Error
Q – 8 TNS-00206: Status Information for Interchange string:
Ans- Cause:
Message sent back by Interchange as header for status request.
Action:
None
Please add more information about this Error
Q – 9 TNS-00207: Uptime : number days number hr. number min. number sec
Ans- Cause:
Part of status request.
Action:
None
Please add more information about this Error
Q – 10 TNS-00208: Logging : string
Ans- Cause:
Part of status request.
Action:
None
Please add more information about this Error
Q – 11 TNS-00209: Tracing : string
Ans- Cause:
Part of status request Interchange.
Action:
None
Please add more information about this Error
Q – 12 TNS-00210: Total Pumps Available : number
Ans- Cause:
Part of status request for Connection Manager.
Action:
None
Please add more information about this Error
Q – 13 TNS-00215: Total Successful Connections : number
Ans- Cause:
Part of status request for Connection Manager.
Action:
None
Please add more information about this Error
Q – 14 TNS-00211: Total Active Pumps : number
Ans- Cause:
Part of status request for Connection Manager.
Action:
None
Please add more information about this Error
Q – 15 TNS-00212: Total Pumps Started : number
Ans- Cause:
Part of status request for Connection Manager.
Action:
None
Please add more information about this Error
Q – 16 TNS-00213: Available Connections : number
Ans- Cause:
Part of status request for Connection Manager.
Action:
None
Please add more information about this Error
Q – 17 TNS-00214: Total Connections in Use : number
Ans- Cause:
Part of status request for Connection Manager.
Action:
None
Please add more information about this Error
Q – 18 TNS-00216: Total Failed Connections : number
Ans- Cause:
Part of status request for Connection Manager.
Action:
None
Please add more information about this Error
Q – 19 TNS-00217: Total Bytes of Data : number
Ans- Cause:
Part of status request for Connection Manager.
Action:
None
Please add more information about this Error
Q – 20 TNS-00218: Current Bytes/Sec. : number
Ans- Cause:
Part of status request for Connection Manager.
Action:
None
Please add more information about this Error