[Monetdb-developers] SQL upgrade instructions
I wrote the following text to help with upgrading the SQL database. I think something like this should be prominently displayed (or a prominently displayed pointer to the text) so that people read it *before* attempting to upgrade. Comments? Dumping the SQL database. ------------------------- Start the SQL Server and SQL Client as usual. In the SQL Client, type the following three commands. Type them without any extra white space: >.../dump.sql \D > That is, first a line consisting of a greater than symbol followed by the full (!) name of the file in which you want to store the dump. This will redirect future output to the file mentioned. Then a line consisting of just backslash-capital D. This command does the actual dump which is, because of the previous line, stored in the dump file. And finally a line with just a greater than symbol. This closes the file and redirects the output again to the screen. It is also possible to dump from the command line. Start a SQL Server, and then issue the command MapiClient -lsql -umonetdb -Pmonetdb --dump > dump.sql This command will connect to the SQL Server and dump the database into the file dump.sql in the current directory. Restoring the SQL database. --------------------------- After having dumped the database per the preceding instructions, it is possible to restore the database using the following commands. Start the SQL Server and SQL Client as usual. In the SQL Client, type the following command. <.../dump.sql That is, a less than symbol followed by the full (!) path name of the dump file that was produced using the dump instructions. It is also possible to restore from the command line. Start a SQL Server, and then issue the command MapiClient -lsql -umonetdb -Pmonetdb < dump.sql
Sjoerd Mullender wrote:
I wrote the following text to help with upgrading the SQL database. I think something like this should be prominently displayed (or a prominently displayed pointer to the text) so that people read it *before* attempting to upgrade.
Comments?
That is, first a line consisting of a greater than symbol followed by the full (!) name of the file in which you want to store the dump. Perhaps consider "absolute path name" instead of "full name" This will redirect future output to the file mentioned. Then a line
It is also possible to dump from the command line. Start a SQL Server, and then issue the command
MapiClient -lsql -umonetdb -Pmonetdb --dump > dump.sql
Perhaps it is better not to give the reader too many options (confusing). I'd prefer only giving the MapiClient --dump option, as it is much more clear to the user what is happening.
That is, a less than symbol followed by the full (!) path name of the same as above on absolute path name. dump file that was produced using the dump instructions.
It is also possible to restore from the command line. Start a SQL Server, and then issue the command
MapiClient -lsql -umonetdb -Pmonetdb < dump.sql
I'd again prefer to only mention this option. I will change the ebuild such that it refuses to update if the var/MonetDB/ directory isn't empty and suggests to do the update as written above. It would be nice if this would be available somewhere on the web for that purpose. Is there a way to dump/restore MIL stuff?
Fabian wrote:
Sjoerd Mullender wrote:
I wrote the following text to help with upgrading the SQL database. I think something like this should be prominently displayed (or a prominently displayed pointer to the text) so that people read it *before* attempting to upgrade.
Comments?
That is, first a line consisting of a greater than symbol followed by the full (!) name of the file in which you want to store the dump.
Perhaps consider "absolute path name" instead of "full name"
Ok.
This will redirect future output to the file mentioned. Then a line
It is also possible to dump from the command line. Start a SQL Server, and then issue the command
MapiClient -lsql -umonetdb -Pmonetdb --dump > dump.sql
Perhaps it is better not to give the reader too many options (confusing). I'd prefer only giving the MapiClient --dump option, as it is much more clear to the user what is happening.
Perhaps it is. On the other hand, it would be good to document *somewhere* the different techniques. Also, the \D way of doing things is handier for Windows users since the commandline interface is not readily available.
That is, a less than symbol followed by the full (!) path name of the
same as above on absolute path name.
dump file that was produced using the dump instructions.
It is also possible to restore from the command line. Start a SQL Server, and then issue the command
MapiClient -lsql -umonetdb -Pmonetdb < dump.sql
I'd again prefer to only mention this option.
I will change the ebuild such that it refuses to update if the var/MonetDB/ directory isn't empty and suggests to do the update as written above. It would be nice if this would be available somewhere on the web for that purpose.
Not good, see below.
Is there a way to dump/restore MIL stuff?
You do that from the *new* installation: Mserver (with *new* database--the default dbfarm should be changed) module(upgrade); convert("/.../bat"); commit(); quit(); repeat for each database within the farm. -- Sjoerd Mullender
Sjoerd Mullender wrote:
Perhaps it is better not to give the reader too many options (confusing). I'd prefer only giving the MapiClient --dump option, as it is much more clear to the user what is happening.
Perhaps it is. On the other hand, it would be good to document *somewhere* the different techniques. Also, the \D way of doing things is handier for Windows users since the commandline interface is not readily available.
Ok, I see your point. What about making a clear distinction between Windows and normal users?
I will change the ebuild such that it refuses to update if the var/MonetDB/ directory isn't empty and suggests to do the update as written above. It would be nice if this would be available somewhere on the web for that purpose.
Not good, see below.
/me looks below
Is there a way to dump/restore MIL stuff?
You do that from the *new* installation:
Mserver (with *new* database--the default dbfarm should be changed) module(upgrade); convert("/.../bat"); commit(); quit();
yeah, but I just want to 'backup' my data and archive it. I don't want to convert anything, I just want to store it in a save place. I was just wondering whether there was some other option than copying the BATs.
repeat for each database within the farm.
Ok. I don't see the problem in an ebuild that refuses to update unless you clean your /var/MonetDB/(dbfarm|log). This way I can message the user upfront that it should do something to preserve it's data. Pointing to a nice migration website with some FAQ should do the trick... Q: I updated MonetDB and now if I start it, it repeatedly complains about 'invalid BAT' or something. What's up? A: The BAT format has changed to a new structure which is incompatible with old structures. Either remove your old databases or migrate them, see [todo:migration page] Q: I updated MonetDB/SQL and now I cannot start it. The log file says something about 'incompatible database format'. What should I do? A: The SQL catalog database has changed, and is incompatible with its previous version. If you don't care about your data you should clean out your dbfarm, if you do, you have a problem. Reinstall the previous version of MonetDB/SQL and dump your database as described here [todo:migration SQL page]. Reinstall the newest version and restore your database.
Fabian wrote:
Sjoerd Mullender wrote:
Perhaps it is better not to give the reader too many options (confusing). I'd prefer only giving the MapiClient --dump option, as it is much more clear to the user what is happening.
Perhaps it is. On the other hand, it would be good to document *somewhere* the different techniques. Also, the \D way of doing things is handier for Windows users since the commandline interface is not readily available.
Ok, I see your point. What about making a clear distinction between Windows and normal users?
That's a possbility.
I will change the ebuild such that it refuses to update if the var/MonetDB/ directory isn't empty and suggests to do the update as written above. It would be nice if this would be available somewhere on the web for that purpose.
Not good, see below.
/me looks below
Is there a way to dump/restore MIL stuff?
You do that from the *new* installation:
Mserver (with *new* database--the default dbfarm should be changed) module(upgrade); convert("/.../bat"); commit(); quit();
yeah, but I just want to 'backup' my data and archive it. I don't want to convert anything, I just want to store it in a save place. I was just wondering whether there was some other option than copying the BATs.
The document I wrote is secifically intended (althouth it doesn't explicitly say so) for upgrading to the new release. For MIL users, the perhaps the easiest way is using the module(upgrade) stuff above. For SQL users that is not possible since there are additional changes to the way SQL stores information in the database. For those users a dump/restore is the only option, and that option is described in the document. Backing up your data and possibly restoring it later is also a worthwhile goal, however that was not the primary focus of this document.
repeat for each database within the farm.
Ok. I don't see the problem in an ebuild that refuses to update unless you clean your /var/MonetDB/(dbfarm|log). This way I can message the user upfront that it should do something to preserve it's data. Pointing to a nice migration website with some FAQ should do the trick...
Q: I updated MonetDB and now if I start it, it repeatedly complains about 'invalid BAT' or something. What's up? A: The BAT format has changed to a new structure which is incompatible with old structures. Either remove your old databases or migrate them, see [todo:migration page]
Q: I updated MonetDB/SQL and now I cannot start it. The log file says something about 'incompatible database format'. What should I do? A: The SQL catalog database has changed, and is incompatible with its previous version. If you don't care about your data you should clean out your dbfarm, if you do, you have a problem. Reinstall the previous version of MonetDB/SQL and dump your database as described here [todo:migration SQL page]. Reinstall the newest version and restore your database.
------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
-- Sjoerd Mullender
participants (3)
-
Fabian
-
jvr@dory.blub.net
-
Sjoerd Mullender