To know tablespaces of oracle user
To know the tablespace assigned to a user run following query on sqlplusSphere: Related Content
select USERNAME,
CREATED,
PROFILE,
DEFAULT_TABLESPACE,
TEMPORARY_TABLESPACE
from dba_users
order by USERNAME
Hello World. This is my First of First Blog. Here I will try to write things related to what I learn, Since I am kinda obsessed with Technology’s lineage. I, being a Java professional, love Java profoundly and so tried to make a blog that will help you and me of course to be in touch with new happenings in the field of technology. I may soon start a discussion forum based on Java, for that we need to wait a while, after all , not always, good things are FREE….
To know the tablespace assigned to a user run following query on sqlplusSphere: Related Content
select USERNAME,
CREATED,
PROFILE,
DEFAULT_TABLESPACE,
TEMPORARY_TABLESPACE
from dba_users
order by USERNAME
Posted by Unknown at 5:27 AM 0 comments
Labels: oracle, tablespace, user
Using cut command you can print out the nth field of a csv input file in.csv.
cut -d"," -f3 in.csv | sort |uniq > ~/out.csv
Above command cuts the 3rd field and then sorts and then take a unique of sorted output and then finally output in out.csv
Posted by Unknown at 11:52 PM 0 comments
A defunct (or "zombie") process is a process that isn't running, isn't eligible to run, and takes up no system resources. It's actually a process that has exited, but its parent has not called wait() in order to find out its exit status.
defunct processes can't be killed since they are already dead. To make them disappear you have to kill their parent process.
Find the parent process id of the defunct process and then kill that parent process:
ps -fe | grep defunctprocess | awk '{print $3}'
kill -9 parentprocessid
Posted by Unknown at 10:32 AM 0 comments
primordial class loader. Let us look at the class loaders created by the JVM.
Classes loaded by Bootstrap class loader have no visibility into classes loaded by its descendants (ie Extensions and Systems class loaders). The classes loaded by system class loader have visibility into classes loaded by its parents (ie Extensions and Bootstrap class loaders).
If there were any sibling class loaders they cannot see classes loaded by each other. They can only see the classes loaded by their parent class loader.
Class loaders are hierarchical and use a delegation model when loading a class. Class loaders request their parent to load the class first before attempting to load it themselves. When a class loader loads a class, the child class loaders in the hierarchy will never reload the class again. Hence uniqueness is maintained. Classes loaded by a child class loader have visibility into classes loaded by its parents up the hierarchy but the reverse is not true.
Two objects loaded by different class loaders are never equal even if they carry the same values, which mean a class is uniquely identified in the context of the associated class loader. This applies to singletons too, where each class loader will have its own singleton.
Static class loading:
Classes are statically loaded with Java’s “new” operator.
class MyClass {
public static void main(String args[])
{
Car c = new Car();
}
}
A NoClassDefFoundException is thrown if a class is referenced with Java’s “new” operator (i.e. static loading) but the runtime system cannot find the referenced class.
Dynamic class loading:
Dynamic loading is a technique for programmatically invoking the functions of a class loader at run time.
Class.forName (String className); //static method which returns a Class
The above static method returns the class object associated with the class name. The string className can be supplied dynamically at run time. Unlike the static loading, the dynamic loading will decide whether to load the class Car or the class Jeep at runtime based on a properties file and/or other runtime conditions. Once the class is dynamically loaded the following method returns an instance of the loaded class. It’s just like creating a class object with no arguments.
class.newInstance (); //A non-static method, which creates an instance of a class (ie creates an object).
Jeep myJeep = null ;
//myClassName should be read from a properties file or Constants interface.
//stay away from hard coding values in your program.
String myClassName = “au.com.Jeep” ;
Class vehicleClass = Class.forName(myClassName) ;
myJeep = (Jeep) vehicleClass.newInstance();
myJeep.setFuelCapacity(50);
A ClassNotFoundException is thrown when an application tries to load in a class through its string name using the following methods but no definition for the class with the specified name could be found:
Posted by Unknown at 8:14 AM 0 comments
How to know from which jar file a class has been loaded?
public static String whichJAR(Class clazz){
String name = clazz.getName();
name = name.substring(name.lastIndexOf(’.') + 1);
String jar = clazz.getResource(name + “.class”).toString(); //NOI18N
return jar.substring(0, jar.indexOf(’!'));
}
Posted by Unknown at 8:12 AM 0 comments