Database

loadjava: Loading Java Sources/Classes/Jars into oracle Database

Loading the Java Sources/Classes into Database is important thing in Java based application software. Java sources (jar/Classes) can be loaded into database by using few methods, and using loadjava command is one of them. loadjava:This is OS based utility tool by Database. This command will be available in the OS. This can be run by …

loadjava: Loading Java Sources/Classes/Jars into oracle Database Read More »

ORA-12154: TNS: could not resolve the connect identifier specified

WhatDatabase link is an option to connect to a remote database from another database. By using this database link option one can connect to remote database as authorized database user and can perform the operations as in the direct connection. Database link is of two types Public Private HowAdd a entry in tnsnames.ora file to …

ORA-12154: TNS: could not resolve the connect identifier specified Read More »

get tables and their number of rows in Oracle Database Schema

Simplest way is to use the data dictionaries provided by Oracle. And you can depend on the results if the schema is up to date with the statistics. Use the following query to get the table list and their number of rows (records). SELECT table_name, num_rows FROM user_tables; OR SELECT table_name, num_rows FROM all_tables WHERE …

get tables and their number of rows in Oracle Database Schema Read More »

expdp : Exporting datadump in Oracle 11g

The export can be done in two ways from local machine from Server From Local MachineFor Windows operating system Follow the steps# create directorycreate directory dmpdir as ‘c:/temp’;select directory_name,directory_path from dba_directories; # expdp ownercreate user scott identified by tiger;grant connect, resource to scott; grant read, write on directory dmpdir to scott;expdp scott/tiger@xe directory=dmpdir dumpfile=scott.dmp logfile=expdp.log …

expdp : Exporting datadump in Oracle 11g Read More »

Function to display reverse string of the given string in PL/SQL

CREATE OR REPLACE FUNCTION rev_str_f(str VARCHAR2) RETURN VARCHAR2ISv_str VARCHAR2(10);   –you can specify your own sizev_str_rev VARCHAR2(10); –specify same size as v_strBEGINv_str := ‘&string’;DBMS_OUTPUT.PUT_LINE(‘Given String: ‘||v_str);FOR i IN 1..LENGTH(v_str) LOOPv_str_rev := v_str_rev||SUBSTR(v_str,-i,1);DBMS_OUTPUT.PUT_LINE(v_str_rev);END LOOP;DBMS_OUTPUT.PUT_LINE(‘The reverse String for given ‘||v_str||’ is: ‘||v_str_rev);RETURN v_str_rev;END rev_str_f;

Scroll to Top