Sunday, August 8, 2010

PermGen Space eclipse


One of the reason is due to changes in "Java 6u21 distribution"

The change was done in "java.dll" to replace "Sun MicroSystems" to "Oracle Corporation"

Solutions :

1, Degrade to java 6u20 version

2, modify PermGen Space by starting eclipse with "-vmargs -XX:PermSize=64M -XX:MaxPermSize=128M" as options

Ex: eclipse -vmargs -XX:PermSize=64M -XX:MaxPermSize=128M


Postgresql ReStore Command

1, In Windows XP, Go to “All Programs” --> “Postgresql” --> “psql”

2, Accept default settings and you will get prompt like “postgres-#

3, Postgresql has its own utility for Restore called “psql”.

The most common options used are :

1, -d --> database name

2, -U --> user of the database(default is postgres)

3, -f --> backup (*.dmp) file

Syntax : psql [options]

Ex: To restore “archive1.dmp” into a database “mydatabase”,

Run the commands below .

A, create database mydatabase

B,psql –d mydatabase –U postgres –f “E:\archive1.dmp

Postgresql BackUp Command

1, In Windows XP, Go to Run , type cmd to open Command Prompt

2, Go to the Bin directory inside the Postgresql Installation directory

For EX : E:\workdir\Postgresql\bin

3, Postgresql has its own utility for BackUp called “pg_dump”.

The most common options used are :

1, -h à localhost (hostname)

2, -p à port (default is 5432)

3, -U à user of the database(default is postgres)

4, -f à output backup file name with location

Syntax : pg_dump [options] [databasename]

Ex: To backup “mydatabase” into a file “archive1.dmp” in location “E:\” ,

Use pg_dump -h localhost -p 5432 -U postgres –f “E:\archive1.dmpmydatabase