saada logo

 
  SAADA OVERVIEW
Home  
News  
Tutos and Links  
Download  
  Tutorial
Getting started  
Doing More  
SaadaQL  
The Web Interface  
VO Publishing  
Tips & Troubelshooting  
  COMMUNITY
Mailing List  
Saada Sites  
How to Contact us ?  
  DEVELOPER CORNER
Contributors  
Next Step  
Old Releases  
Inside Saada  
Using UWS  

 

SourceForge.net Logo


HOME ART > DEVELOPER CORNER > Old Releases > Saada 1.4.2 > TUTORIAL > Managing Your SaadaDB > Moving your SaadaDB
Using a remote PostgresQL Server

A SaadaDB application (dataloader, web interface or any other API based application) can run on a machine different from the one hosting the database.




 We strongly advice newcomers to run SaadaDB applications (dataloader, web interface or any other API based application) on the same machine. It avoids a lot of OS related problems. This secured configuration can not always be carried on.
- The web interface can be moved to another application server.
- API based application can be run on various machines (API based application must be run on the machine where the SaadaDB has been built up)
- The relational database can be moved to on another site (e.g. an central database system)

 Check if the database server can be accessed from the remote host.Let us suppose that the SaadaDB is installed on a machine named myhost, that the SaadaDB is named MyDatabse and that the new database sever runs on a machine named dbhost. Before playing with Saada, you must verify if the database server accepts connections from myhost
- Log on myhost as the Saada operator
- Try to connect the remote database server « psql -h dbhost »
- If the connection works, you can go to the next step.
- If a password is prompted, ask your system manager to give it to you or to disable it (see xx).
- If the connection fails, check if the postmaster on dbhost runs with the « -h dbhost » and check if it is configured to accept connections from myhost (see yy)

 Modify the Saada JDBC URL
- When you are sure that your database server accepts the connection from your SaadaDB machine, you can update the SaadaDB setup.
- Edit the file $SAADA_DB_HOME/config/saadadb.xml
- Modify the following lines

       <password/>
       <jdbc_url>jdbc:postgresql</jdbc_url>

— If a password is required, put it in the password element. The password is not encoded here, so do not make the file saadadb.xml readable for other users.
— Declare both server and your database in the jdbc element.

           <jdbc_url>jdbc:postgresql://dbhost/MyDatabse</jdbc_url>

If the database server uses another port that 5432, let’s say XYZW, use the following JDBC URL :

           <jdbc_url>jdbc:postgresql://dbhost:WXYZ/MyDatabse</jdbc_url>

The JDBC URL format can vary from a database system to another. The previous example is based on PosgresQL. For other systems refer to the documentation .
— Restart all applications

last update 2007-04-24