DbView         Database visualization



Profile



Description

In order to open a connexion to a database you need to provide parameters. DbView allows two ways to provide such parameters:

Passing all the required parameters through the command line may be painful (due to the number of parameters). That's when profiles are introduced.


All the examples in this section assume that the reader is using a UNIX flavour (MAC OS or Linux). If you are using Windows, just change "dbview.sh" by "dbview.bat".

For information, the profiles are stored in a XML file, called the profiles' repository. This repository is located in the sub directory "data" (). (relatively to the top directory that contains your DbView's installation).

Go in the directory that contains all the DbView's intallation. For example (under MAC OS or linux):

cd /Users/denisbeurive/Desktop/dbview

Then, you can print the profile's repository:

cat data/profiles.xml

Creating a profile

Let's say that you want to open a connection to a MySql database. To do that, you need to provide the following information:

One way to provide these parameters is to do so through the command line.

dbview.sh export -exporter dot-light -db-daptor mysql -host myserver.local.priv -user root -password AZERTY -dbname joomla -port 8888

Another way is to create a profile for this set of parameters.

dbview.sh help-db-adaptor mysql


You create a new profile called "myNewProfile" by typing:

dbview.sh profile-add myNewProfile -db-adaptor mysql -host myserver.local.priv -user root -password AZERTY -dbname joomla -port 8888

The next time you need to open a connection to the database, you just need to provide the name of the profile:

dbview.sh export -exporter dot-light -profile myNewProfile

Printing a profile

To show the profile which mane is "myNewProfile", type:

dbview.sh profile-show myNewProfile

You get:


Printing the list of profiles

If you need to print the list of available profiles:

dbview.sh profile-list


Updating a profile

Let's say that you want to update some parameters of the profile "myNewProfile". For example, you need to change the value of the TCP port (because you modified the configuration of your database server). You also want to change the password used to identify the user.

To change the port and the password, type the following command:

dbview.sh profile-update myNewPofile -port 3306 -password TOTO

Removing a profile

Let's say that you want to destroy the profile which name is "myNewProfile".

dbview.bat profile-delete myNewProfile