I just had to move some locations from one machine to another machine.
I was able to open the locations on the new computer (GRASS 6.4.3 and Ubuntu) and then I realized that I somehow set the database connection to a hardcoded directory on the old computer. Thus I just used db.connect to set a new link (sqlite) to: '$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db'. But somehow that doesn't work.
I tried to use db.test (with test1) but it says that its not possible to open the database, although it is existing. I tried to see the attribute table in WXGUI but then all windows get closed (GRASS crash)...It seems that somehow the database can be connected properly after the move to the new machine...
any suggestions?
What Is the best way to reset the database without destroying it...?
any suggestions?
What Is the best way to reset the database without destroying it...?
Johannes,
I would work directly with sqlite3. From the command line, 'sqlite3
<databasename>' will open the database editor. You can use the .h (help)
command to see the tools available to you. For example, .tab will show you a
list of tables and .schema shows the schema of a specified table.
The location of the database should not be embedded within it. Copying the
database to the new location may work. Or, you can dump it to an ASCII file
at the old location and re-create it in the new location.
If you go to the mapset directory itself, check the file 'VAR' (it is just a plain text file). Are the database path and name defined correctly in that file?
Rgds,
Paulo
On 07/13/2012 04:12 PM, Johannes Radinger wrote:
Hi,
I just had to move some locations from one machine to another machine.
I was able to open the locations on the new computer (GRASS 6.4.3 and Ubuntu) and then I realized that I somehow set the database connection to a hardcoded directory on the old computer. Thus I just used db.connect to set a new link (sqlite) to: '$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db'. But somehow that doesn't work.
I tried to use db.test (with test1) but it says that its not possible to open the database, although it is existing. I tried to see the attribute table in WXGUI but then all windows get closed (GRASS crash)...It seems that somehow the database can be connected properly after the move to the new machine...
any suggestions?
What Is the best way to reset the database without destroying it...?