I'm close to the end of my tether with this so any help would be gratefully received!
Trying to connect with Interbase "IBConsole" and I get the following message:
"Unsupported on-disk structure for file C:\TEMP\SYSTEM.GDB; found 8, support 15"
Searching for this problem suggests I need to run a GBAK on the old version and restore on new version. All "Restore" options in IBConsole are greyed out - so can't seem to do this. Running GBAK to restore on the newer server gives a surreal response:
"gbak: ERROR: Expected backup version 1, 2, or 3. Found 8"
I've installed "RazorSQL" - tried the JDBC driver with following error:
"GDS
Exception. 335544379. unsupported on-disk
structure for file c:\temp\system.gdb; found 8.15, support"
(same problem with both 2.1.1 JDBC driver and 2.2.4)
How can I open this database file or even convert it?
In this link you can see the correspondence between ODS numbers and Interbase/Firebird versions (it is in Russian but you can read the table). According to it ODS 8 corresponds to an Interbase version 4.0/4.1, a quite old one. ODS 15, on the other hand, would be an Interbase XE/XE3 database.
You should be able to retrieve more information on the database and its ODS by using gstat.
gstat -h c:\temp\system.fdb
Check this FAQ for more information on its use.
To upgrade the ODS version you will need to following steps (make sure you do a backup copy before attempting them):
From the Interbase 4 environment perform a backup of the database.
gbak -backup system c:/temp/backups/system.fbk
From your more modern environment restore the database.
gfix -shut -tran 60 system
gbak -replace c:/temp/backups/system.fbk system
The gfix shuts down the database and transactions startup for the database, and would only be necessary if the database already exists in the newer environment.
More information on backup and restore to upgrade ODS can be found here.
Now, take in account you will need the gbak utility provided with Interbase 4 in order to be able to do the necessary backup of the database to upgrade it. It is not possible to do the backup with the newer gbak utility. I hope you have access to it.
Related
I am an Oracle DBA and I got a bkp.tar.tgz PostgreSQL backup file to restore on server. Vendor provided backup file before closing contract. I don't have any information for backup file.
I have below questions.
PostgreSQL backup can be restored on cross platform OS? If no, then how can I know what is source OS.
PostgreSQL db version needs to be same? Or doesn't matter? How to find db version from bkp file? They said it's PostgreSQL 9.4.5
Is there any other way I can access data from backup file?
I have created a Firebird multi-file database
Main Database file D:\Database\MainDB.fdb
Secondary files (240 Files) located under D:\Database\DBFiles\Data001.fdb to D:\Database\DBFiles\Data240.fdb
When copy database to another location and trying to open it Firebird doesn't locate the files if they are not in D:\ partition
I want Firebird to locate the secondary files under Database\DBFiels folder at the new path.
So if I copy the database to C:\Database\MainDB.fdb
Firebird would open Data001.fdb in new path like C:\Database\DBFiles instead of old path in D:\Database\DBFiles where they were initially created
Can that be done with Firebird? if not, then how it should be done?
Update:
Finally I found out it's not possiable to change Firebird database secondary files usign Firebird.
but I found this Firebird FAQ mention GLINK tool but It doesn't support Firebird 3.x so I didn't test it, and It's not recommended to use it even with supported versions of Firebird.
Done what exactly?
UPD. I edited the very vague original question to make clear WHAT the topic starter wants.
You can not reliably "copy files with Firebird" - Firebird is not files copying tool. You can to a degree use EXTERNAL TABLE for raw files access, but very limited and not upon the database itself.
It is dangerous practice to "copy databases" while Firebird is working, because you would only copy part of the data. The recently updated data that is in memory cache but did not yet made it on disk would be lost. The database file would be inconsistent with some data updated and some not yet. When you "copy database files" you have first to shutdown either those databases or even the whole Firebird server.
Firebird has it's own tools for moving databases around - and those are called backup/restore tools. Maybe what you need is nbackup tool, if gbak is too slow for you.
Finally, you can list files that comprise the database. You can do it via gstat utility or via "Services API" it uses. You also can select from RDB$FILES system table. However what would you do after you did it? The very access to the database makes it badly suited for consequent copying (#2). You would perhaps need to shutdown database, turn it to read-only AND single-user state, and only then attach to it and read RDB$FILES. And after copying done - you would have to de-shutdown the database. Kinda much more complex than nbackup.
https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/gstat-example-header.html
https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/gfix-dbstartstop.html
https://www.firebirdsql.org/file/documentation/reference_manuals/fblangref25-en/html/fblangref-appx04-files.html
https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/gbak.html
https://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/nbackup.html
I have a couple of DB2 Backup files as shared with us.
I am unable to recover the data using the DB2 recover command which I used as -
db2 restore db <db-name> from . taken at 20151229234633
Got the following error for the above command.
SQL2071N An error occurred while accessing the shared library
"/resgrp463/db2inst3/db2inst3/NODE0000/SQL00001/4371/libdb2compr.a".
Reason code: "2".
I then modified the Recover command and added another parameter by providing compress library option as mentioned in the following command -
db2 restore db <db-name> from <location> taken at 20151229234633 comprlib /resgrp463/db2inst1/sqllib/lib64/libdb2compr.a
It gave the error as mentioned below.
SQL2079N An error was reported by the shared library "libdb2compr.a".
Return code: "104".
Any help on how to resolve it or any concrete proof specifying that the Backup File is corrupt would be appreciated.
OS Version - AIX 7.1 TL4
DB2 Version - DB2 9.7
Fix Packs Tried - GA, 1, 11 (Target side)
At the source side, we don't know the exact Fix Pack used but the version is confirmed as DB2 9.7 using the db2ckbkp header information which provides release code as D00.
Please view the db2diag log at https://pastebin.com/X8sYELNT
Upon using the command to check the backup's, I get an error as mentioned below.
Command used -
db2ckbkp *
It gave the error as
Buffers processed: #ERROR: Decompression library not initialized
ERROR: Failed to verify media header. Cannot continue.
All three error messages are related to a db2 library which db2 restore command needs as shown at each error messages. There is a problem at db2 restore command executing machine/box, client side and not server side. And this type of situation can be occurred when:
1) db2 restore related file(s) is corrupted, such as the library file in message
2) db2 restore unexpectedly reads the library file by miss configuration
For 1), it may be fixed by:
install product again or create a new instance. this will place normal file(s).
For 2), it may be fixed by:
find out what was changed at the environment then fix. this will pick up correct library file.
For your information. End of support for V9.7 is September 30, 2017 as show below:
Recommended Fix Packs for DB2 for Linux, UNIX and Windows
https://www.ibm.com/support/pages/recommended-fix-packs-db2-linux-unix-and-windows
Hope this helps.
I'm trying to upload a database, which I developed locally, into our development server.
I installed PostgreSQL 9.1 on my machine and the development server uses 8.4.
When trying to restore the database to 8.4 using the dump file created by 9.1 I get the error:
pg_restore: [archiver (db)] could not execute query: ERROR: syntax error at or near "EXTENSION"
LINE 1: CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalo...
and a quick research tells me that "EXTENSION" doesn't exist prior to 9.1.
I'm not really sure I should look for an option in pg_dump that ignores "extensions" as the database I'm trying to upload relies on the PostGIS extension for most of data.
While upgrading the development server and installing PostGIS in the dev server is an option, I'd like to know of a different route, one wherein I do not need to edit anything on the server while maintaining the functions of the database I developed.
Of course other workarounds are welcomed, my sole aim in uploading my database to the server is to reduce the amount of reconfiguration I have to do on my project whenever I need to deploy something for our team.
This is an old post but I had the same problem today and there is a better more reliable way of loading a PG 9.1 db into a PG 8.4 server. The method proposed by Craig will fail on the target machine because the PLPGSQL language will not be created.
pg_dump -Upostgres -hlocalhost > 9.1.db
replace this line
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
with this line
CREATE LANGUAGE plpgsql;
delete this line or comment it out
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
you can use sed to make the changes
Often it is not possible to upgrade an 8.4 server because of application dependencies.
Backporting databases can be painful and difficult.
You could try using 8.4's pg_dump to dump it, but it'll probably fail.
You'll probably want to extract the table and function definitions from a --schema-only dump text file, load them into the old DB by hand, then do a pg_dump --data-only and restore that to import the data.
After that, if you're going to continue working on your machine too, install PostgreSQL 8.4 and use that for further development so you don't introduce more incompatibilities and so it's easy to move dumps around.
In your position I'd just upgrade the outdated target server to 9.1.
I have a database file (*.db) that need to be recovered.
The bad is, the end-user have null idea of the version of the database. Not know the password. The original developer is lost. The computer where was installed was formatted. We have not experience in this database software. Yeah, nightmare.
My guess is a old database. I'm trying to open it in Sybase 11, dev edition.
I follow this steps: http://dcx.sybase.com/1101en/sachanges_en11/unloading-reloading-upgrading-newjasper.html
I try to use the UNLOAD utility from command line & from the Sybase central utility. From command line I do:
./dbinfo -c "DBF=/Users/mamcx/Downloads/CEMDE_ENDOCRINO_S.A.DB;UID=DBA;PWD=sql"
SQL Anywhere Information Utility Version 11.0.1.2045
Unable to start specified database: '/Users/mamcx/Downloads/CEMDE_ENDOCRINO_S.A.DB' was created by a different version of the software
Ok, I try to unload:
./dbunload -c "DBF=/Users/mamcx/Downloads/CEMDE_ENDOCRINO_S.A.DB;UID=DBA;PWD=sql" -n /Users/mamcx/Desktop/
SQL Anywhere Unload Utility Version 11.0.1.2045
Connecting and initializing
***** SQL error: Unable to start database server
Ok, from the server admin tool:
dbunload -v -c "UID=dba;PWD=***;DBF=/Users/mamcx/Downloads/CEMDE_ENDOCRINO_S.A.DB" -an "/Users/mamcx/Desktop/baba.db" -ap 4096 -ea None -ii -sa -so _sc866192545
Connecting and initializing
***** SQL error: Unable to start database server
An error occurred while attempting to unload the database '/Users/mamcx/Downloads/CEMDE_ENDOCRINO_S.A.DB'.
Exist a way to know the version of the database server used to create this? Is possible to recover this file?
I don't know how to get the version out of the Database File if you are not able to start it.
You could get a hint from the hopefully existing Client PC's. Check the ODBC Driver Version they have installed.
I had good success with the support of Sybase. If you or your client has a support contract you can get them involved.
HTH
Try to simply start a server with that database and capture the output with -z -o server.out. The server.out file should contain a more specific error telling you why it can't start the database. This error can occur if you are trying to start something that is not a SQL Anywhere database.
You may also want to post this question over at http://sqlanywhere-forum.sap.com/.