I'm trying restore db2 database from backup by this command:
RESTORE DATABASE DEKAT02B FROM "/home/db2inst1/.ibm/db2/desktop/" TAKEN AT 20180104111638 WITHOUT PROMPTING
And I had this error:
`Caused by: com.ibm.tivoli.remoteaccess.RemoteAccessAuthException: CTGRI0000E Could not establish a connection to the target machine with the authorization credentials that were provided.`
Im sure that I enter right credentials.
Thanks.
Related
I'm trying to connect to employee.fdb in Firebird3.0 (localhost) using FlameRobin 0.9.3 on a Ubuntu OS.
The connection to Firebird using isql has no issues. I can create users, roles, etc all from the terminal. However, when I attempt to make a connection using FlameRobin I receive a 335544344 "Error while trying to open file Permission denied" response.
This occurs with the SYSDBA profile and any other new user profiles that I create in isql. I can even create new users in FlameRobin but I cannot connect to any database. I've verified in /etc/firebird/3.0/firebird.conf that DatabaseAccess = Full and have attempted to access the db from a couple different folders in case this is a read/write issue. No success.
I feel like I'm missing something obvious. Any thoughts?
Added info in response to Mark (4/26):
The db is stored in /var/lib/firebird/3.0/data/. I have assumed this to be the default location for Firebird DBs and that the server automatically has access to it, but I suppose that might not be the case. Is there a way to confirm server permissions to this directory and/or is this the customary spot to store work?
Terminal Connection with ISQL:
daniel#daniel-desktop:~$ isql-fb
Use CONNECT or CREATE DATABASE to specify a database
SQL> connect '/var/lib/firebird/3.0/data/employee.fdb' user sysdba password 'xxxxxxx';
Database: '/var/lib/firebird/3.0/data/employee.fdb', User: SYSDBA
SQL>
FlameRobin Database Registration Info:
FlameRobin Error:
This is a permissions issue as #MarkRotteveel suggested. Problem was that I installed the server as a user and not as root. Problem solved by removing and reinstalling both Firebird and FlameRobin as root.
I have an OpenShift App that uses the PostgreSQL database.
I want to restore this database with data from a 'live' database.
When running locally, I just drop the database. Then I create the database and then run the restore.
But, when I try and drop the database on OpenShift, it says:
dropdb: database removal failed: ERROR: database "test" is being accessed by other users
So I stopped the OpenShift App and then retried
Now it says:
pg_restore: [archiver (db)] connection to database "test" failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/lib/openshift/123456ef0c1e123456789b/postgresql/socket//.s.PGSQL.5432"?
So I have a catch 22 situation.
What is the correct way to restore a PostgreSQL database on OpenShift?
Leave Postgresql running but stop the application that was accessing the database. It's that simple...
Installed DB2 Express C v10.5 and also v11.1 on Windows 10 PC.
Database backup is successful but Restore ends with error with both versions.
I also tried the same using Data Studio 4.1.2, but here also backup is successful but restore command is stuck.
Backup and restore script from Data Studio-
CONNECT TO SAMPLEDB;
QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;
CONNECT RESET;
DEACTIVATE DATABASE SAMPLEDB;
BACKUP DATABASE SAMPLEDB TO "E:\Database" COMPRESS EXCLUDE LOGS WITHOUT PROMPTING;
CONNECT TO SAMPLEDB ;
UNQUIESCE DATABASE;
CONNECT RESET;
RESTORE DATABASE SAMPLEDB FROM "E:\Database" TAKEN AT 20161020191200 INTO NEWDB WITHOUT PROMPTING;
This works fine on Windows 7 and 8.
Is this problem specific to Db2 Express C on Windows 10?
Can anyone suggest solution and/or where to read about the compatibilty status.
Added-
Restore from Data studio does not give any error, but is just stuck.
Result of backup and restore script-
db2 => CONNECT TO CBL2010 USER db2admin USING *******
Database Connection Information
Database server = DB2/NT 10.5.5
SQL authorization ID = DB2ADMIN
Local database alias = CBL2010
db2 => QUIESCE DATABASE IMMEDIATE
DB20000I The QUIESCE DATABASE command completed successfully.
db2 => CONNECT RESET
DB20000I The SQL command completed successfully.
db2 => BACKUP DB CBL2010 USER db2admin USING ******* to E:\Backup COMPRESS WITHOUT PROMPTING
Backup successful. The timestamp for this backup image is : 20161024162942
db2 => CONNECT TO CBL2010 USER db2admin USING *******
Database Connection Information
Database server = DB2/NT 10.5.5
SQL authorization ID = DB2ADMIN
Local database alias = CBL2010
db2 => UNQUIESCE DATABASE
DB20000I The UNQUIESCE DATABASE command completed successfully.
db2 => CONNECT RESET
DB20000I The SQL command completed successfully.
db2 => RESTORE DB CBL2010 USER db2admin USING ******* FROM E:\Backup TAKEN AT 20161024162942 INTO CBLBKUP WITHOUT PROMPTING
SQL1092N The requested command or operation failed because the user ID does
not have the authority to perform the requested command or operation. User
ID: "XAXTRANET". SQLSTATE=00000
Here, I am supplying 'db2admin' as the user, but surprisingly the error is for the logged in user 'XAXTRANET'.
Both logged in and supplied user have PC admin rights.
and as per 'get Dbm Cfg' command, the sysadm group is not set -
SYSADM group name (SYSADM_GROUP) =
SYSCTRL group name (SYSCTRL_GROUP) =
SYSMAINT group name (SYSMAINT_GROUP) =
SYSMON group name (SYSMON_GROUP) =
The authorization ID you are specifying as part of the command (RESTORE ... USER db2admin ...) is used to connect to an existing database. Since you seem to be restoring to a new database (...INTO CBLBKUP...), that database has to be created first, which requires an instance attachment, this is where the ID XAXTRANET is coming from.
Try attaching to the instance explicitly before issuing the RESTORE command:
db2 => ATTACH TO DB2 USER db2admin USING whatever
The above assumes you are using the default instance name DB2 -- change it to your actual instance name if needed.
I am using windows 8.
My Postgres was Correct.
I just took the data directory from C:/postgresql/8.3/
Now database was connected through command prompt.
When I was trying to connect using pgadmin, it's saying
FATEL: error
An error has occured:
Error connecting to sthe server: FATAL: role "postgres" is not permitted to log in
I changed the required things in pg_hba.conf (trust) and postgresql.conf (connection *) (port 5433)
But, still I was unable to connect the database.
How to give the permissions to postgres role.
when am trying to give the permissions through cmd also it's giving same error.
I was tried in so many ways
but, still I didn't get the database.
It looks like you might have accidentally revoked the LOGIN and SUPERUSER rights from the postgres user. Perhaps you created a superuser with a different name instead? Log in as that user if you did.
If not, and you can't get access as user postgres, you will need to start the database engine up in single-user mode and manually GRANT the SUPERUSER right to postgres again. This is much the same process as is required when recovering from a dropped (deleted) superuser account.
See related:
https://dba.stackexchange.com/q/44586/7788
Postgres reset password in PostgreSQL server 8.4
BTW, 8.3 is a very old and unsupported version. Plan your upgrade promptly.
If there's no data in PostgreSQL that you care about, the easiest thing to do will be:
Uninstall PostgreSQL 8.3;
Delete C:\Program Files\PostgreSQL\8.3 (permanently and unrecoverably destroying all data in your PostgreSQL databases); and
Install a current PostgreSQL version
I am using win Vista, and I am trying to backup some Database under DB2.
I am logged in using the Administrator user, and whenever I try to issue the backup command in the "command line processor", I get the following message:
SQL1092N "ADMINISTRATOR" does not have the authority to perform the requested command. SQLSTATE=00000
BTW, I have created a username/password pair (db2admin) while installing the DB2 server.
So, Will this problem will be get solved if I use the db2admin user? And how to connect to the server (local server BTW) using the db2admin user ?
I had this problem recently and this seemed to do the job:
Attach to your [local] node. (the value of your DB2INSTANCE environ variable, mine was 'DB2'):
attach to DB2 user db2admin using mypassword;
If this isn't enough (it didn't seem to be with me), you can also specify the user and password with backup and restore commands:
restore database mydbname user db2admin using mypassword from C:\BACKUPS taken at 20100823132457;
Or manually create the db2admin user with a password on Windows. But I'm not sure if that's the correct option here.