Restore DB2 10.5 FixPackge 10 to DB2 11.5 failed - db2

I have a database file backup from DB2 10.5 fix package 10, Now I do want to restore it into DB2 11.5 developer edition to do a test.
But got below issue:
SQL2519N The database was restored but the restored database was not
upgraded to the current release. Error "-440" with tokens "SQLERRM
FUNCTION " is returned.
I use below commands, both no success.
db2 restore database DBNAME01 from /tmp/backups without prompting
db2 restore database DBNAME01 from /tmp/backups replace existing
When I try to use:
db2 restore database DBNAME01 from /tmp/backups
I got:
> SQL0440N No authorized routine named "SQLERRM" of type "FUNCTION" having
> compatible arguments was found. LINE NUMBER=1. SQLSTATE=42884
Can someone help?

You can only restore from offline backup; try this.

Related

DB2: FAILED: CDIPR2123I: Ensure that the database xmeta is empty

I am installing InfoSphere V1171 on Linux RHEL 7.
When I am trying to install InfoSphere but in the validation step I get the error:
FAILED: CDIPR2123I: Ensure that the database xmeta is empty
I have tried to drop the table using the below command and recreate the DB but the error reappears:
db2 drop database xmeta
How can I clear the DB?

DB2 backup error

We've a DB2 10.5 instance running on Windows 2008 R2 server. This instance has 10 databases. We have been encountering the following error while performing an offline backup of one of the databases. The error occurs every 5 mins for more than an hour and at some point it is able to get an exclusive connection and backup this database
SQL1035N The operation failed because the specified database cannot
be connected to in the mode requested.
We tried the following:
db2 quiesce instance with restricted access and force connections
db2 deactivate database
db2 backup
db2 activate
db2 unquiesce instance
Before this, we also tried a force application all and db2terminate but was in vain. Has anyone encountered such and error before? Appreciate your thoughts and thanks for your time.
Regards,

Why is pg_restore returning successfully but not actually restoring my database? PostgreSQL 9.5

I'm trying to use PostgreSQL 9.5 with pgAdmin 4 (I would prefer to use pgAdmin 3 but I get the following message when trying to connect to my database:
"Warning:
The server you are connecting to is not a version that is supported by this release of pgAdmin III.
pgAdmin III may not function as expected.
Supported server versions are 8.4 to 9.3")
So I'm forced to use pgAdmin 4. However, when I restore (like I usually do on pgAdmin III) I get a 'successful' restore but no data is actually restored into the tables.
If I click on the details of the 'successful' restore I am presented with this:
"1. pg_restore: connecting to database for restore"
How do I fix this issue?
Would you provide pgAdmin4 logs after running restore?
pgAdmin4 Log location:
Linux:
~/.pgadmin/pgAdmin4.log
~/.pgadmin/job_logs/
Windows:
%appdata%\pgAdmin\pgAdmin4.log
%appdata%\pgAdmin\job_logs\
Note: Do not close Success dialog in pgAdmin4 after restore otherwise once you acknowledge the success dialog, pgAdmin4 will delete respective job log files from "job_logs" directory & also delete "pgAdmin4.log" before running restore to trim unwanted logs.

Opening Firebird database (8.15)

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.

Error: Specified cast is not valid. (SqlManagerUI)

I have a backup from database in SQL Server 2008 R2.
When I want to restore this backup to SQL Server, I get this error:
"Error: Specified cast is not valid. (SqlManagerUI)"
How to I resolve this error?
Thanks.
This would also happen when you are trying to restore a newer version backup in a older SQL database. For example when you try to restore a DB backup that is created in 2012 with 110 compatibility and you are trying to restore it in 2008 R2.
There are some funnies restoring old databases into SQL 2008 via the guy; have you tried doing it via TSQL ?
Use Master
Go
RESTORE DATABASE YourDB
FROM DISK = 'C:\YourBackUpFile.bak'
WITH MOVE 'YourMDFLogicalName' TO 'D:\Data\YourMDFFile.mdf',--check and adjust path
MOVE 'YourLDFLogicalName' TO 'D:\Data\YourLDFFile.ldf'
Sometimes it happens because of the version change like store 2012 db on 2008, so how to check it?
RESTORE VERIFYONLY FROM DISK = N'd:\yourbackup.bak'
if it gives error like:
Msg 3241, Level 16, State 13, Line 2
The media family on device 'd:\alibaba.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 2
VERIFY DATABASE is terminating abnormally.
Check it further:
RESTORE HEADERONLY FROM DISK = N'd:\yourbackup.bak'
BackupName is "* INCOMPLETE *",
Position is "1",
other fields are "NULL".
Means either your backup is corrupt or taken from newer version.
I had a similar error "Specified cast is not valid" restoring from SQL Server 2012 to SQL Server 2008 R2
First I got the MDF and LDF Names:
RESTORE FILELISTONLY
FROM DISK = N'C:\Users\dell laptop\DotNetSandBox\DBBackups\Davincis3.bak'
GO
Second I restored with a MOVE using those names returned:
RESTORE DATABASE Davincis3
FROM DISK = 'C:\Users\dell laptop\DotNetSandBox\DBBackups\Davincis3.bak'
WITH
MOVE 'JQueryExampleDb' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Davincis3.mdf',
MOVE 'JQueryExampleDB_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Davincis3.ldf',
REPLACE
GO
I have no clue as to the name "JQueryExampleDb", but this worked for me.
Nevertheless, backups (and databases) are not backwards compatible with older versions.