Oracle 18c XE expdp specific schemas in xepdb1 - oracle18c

I'm running Oracle 18c XE database in CentOS 7 and like to export a specific schema in xepdb1 database.
This doesn't work as system is unable to recognise the schema in xepdb1 database. Any help much appreciated
expdp system/password123 schemas=accts_db directory=accts_bkup_dir dumpfile=accts_db.dmp logfile=accts_db.log

This works for me finally
expdp system/********#at-app-prd-02:1539/xepdb1 schemas=accts_db directory=accts_bkup_dir dumpfile=accts_db.dmp logfile=accts_db.log
The listener was running on 1539
[oracle#at-app-prd-02 ~]$ lsnrctl status
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=at-app-prd-02)(PORT=1539)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=at-app-prd-02)(PORT=5500))(Security=(my_wallet_directory=/opt/oracle/product/18c/dbhomeXE/admin/XE/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...

Related

Goldengate 19 Postgres to AWS

Ok, so I have one I can't crack. I am testing on-prem GG to AWS. I have it set up in a hub config on-prem. I have my Postgres DB on AWS set with rds.force_ssl=1. I have copied down the certificate bundles from AWS.
I basically followed these steps from Oracle.
GG documentation
And AWS steps here.
AWS PostGres SSL Steps
My ODBCINI has as follows:
sbpgdb=PostgreSQL on sbpgdb [ODBC]
IANAAppCodePage=4
InstallDir=/u01/app/oracle/product/ggpgsdb
[sbpgdb]Driver=/u01/app/oracle/product/ggpgsdb/lib/GGpsql25.so
Description=DataDirect 7.1 PostgreSQL Wire Protocol
BatchMechanism=2
Database=bob_test
HostName=my_rds_instance.us-east-1.rds.amazonaws.com
PortNumber=5432
TransactionErrorBehavior=2
EncryptionMethod=1
ValidateServerCertificate=1
TrustStore=/home/oracle/certs/us-east-1-bundle.pem
My replicat is this.
REPLICAT intrepg
ASSUMETARGETDEFS
HANDLECOLLISIONS
SETENV (NLSLANG=AL32UTF8)
SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
SETENV ( PGCLIENTENCODING = "UTF8" )
SETENV (ODBCINI="/u01/app/oracle/product/ggpgsdb/odbc.ini" )
targetdb sbpgdb, USERIDALIAS pg_postgresdb
discardfile ./dirrpt/bob.dsc, APPEND, megabytes 20
reportcount every 60 seconds, rate
map mypdb.bob.*, target bob_test.*;
I can run this command and it connects to the DB.
dblogin sourcedb sbpgdb useridalias pg_postgresdb
but if I start my replicat I get this and it abends after a few seconds.
2021-06-23T09:46:53.835-0500 ERROR OGG-00551 Oracle GoldenGate Delivery for PostgreSQL, intrepg.prm: Database operation failed: Couldn't connect to sbpgdb. ODBC error: SQLSTATE 08001 native database error 7570. [Oracle][ODBC PostgreSQL Wire Protocol driver]SSL Handshake Failure reason [EOF observed which violates protocol].
Now I can disable the whole SSL thing and it connects and the replicat starts right up. What have I done wrong?

MySQL-Workbench Connection Fail

Try to ask a question because the DB connection in MySQL Workbench continues to fail.
Enter connection information and Test Connection was successful.
However if i select the appropriate DB Connection in workbench home, the connection success window does not appear.
local DB : mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Win64 (AMD64), source revision ab7b9cf9122f6eb02744082db8672a920ae6009f
Server DB : mysql Ver 15.1 Distrib 10.3.14-MariaDB, for Win64 (AMD64), source revision ab7b9cf9122f6eb02744082db8672a920ae6009f
MySQL Workbench Version : mysql-workbench-community-8.0.16-winx64
The same error occurs even if the version of Workbench is changed to 19 or 20.
How to solve it?
Manage Server Connections - screenshot
MySQL Workbench - screenshot
------More details---------
If you check the log file in the top Help tab of Workbench, you can see the log as below.
11:23:15 [INF][SQL Editor Form]: Opened connection 'DB Name' to mariadb.org binary distribution version 10.3.14-MariaDB
11:23:15 [ERR][ WBContext]: Unsupported server version: mariadb.org binary distribution 10.3.14-MariaDB
However, the connection is normally established on the other coworker's PC.

Define a database entry in DB2 db2dsdriver.cfg file that can access multiple databases

I currently use the CLI method of registering a node and then a database for that node (with CATALOG NODE / CATALOG DATABASE) to configure my DB2 CLI client to access our database server.
With a single registration of a database I can effectively register the default database but then when I connect in my application using SQLDriverConnect and use the "DATABASE=" option I can connect to other databases available on my server.
I would like to switch to the much easier to manage db2dsdriver.cfg configuration file, however I have been unable to configure it to allow a single to access multiple databases.
Some code to help clarify. My DB2 server instance has two databases defined like:
CREATE DATABASE DB_1 ON /opt/data/DB_1 USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM
CREATE DATABASE DB_2 ON /opt/data/DB_2 USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM
I register this server with my client CLI using these commands:
CATALOG TCPIP NODE DB_NODE remote example.server.com server 50000
CATALOG DB DB_1 as DB_1 at node DB_NODE
With that setup I can perform the following from my CLI application:
rc = SQLDriverConnect(hdbc, NULL, "DSN=DB_1;UID=dbtest1;PWD=zebco5;DATABASE=DB_1",
SQL_NTS, outStr, 128, &outSize, SQL_DRIVER_NOPROMPT);
or if I want to use the DB_2 database:
rc = SQLDriverConnect(hdbc, NULL, "DSN=DB_1;UID=dbtest1;PWD=zebco5;DATABASE=DB_2",
SQL_NTS, outStr, 128, &outSize, SQL_DRIVER_NOPROMPT);
Note I did not need to change the DSN, merely the "DATABASE" connection option.
Recently I found the db2dsdriver.cfg configuration file which I would rather use. To that end I created this and uncataloged my node and db from the cli:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<configuration>
<dsncollection>
<dsn alias="DB_1" name="DB_1" host="server.example.com" port="50000"/>
</dsncollection>
<databases>
<database name="DB_1" host="server.example.com" port="50000"/>
<database name="DB_2" host="server.example.com" port="50000"/>
</databases>
</configuration>
I can connect with this:
rc = SQLDriverConnect(hdbc, NULL, "DSN=DB_1;UID=dbtest1;PWD=zebco5;DATABASE=DB_1",
SQL_NTS, outStr, 128, &outSize, SQL_DRIVER_NOPROMPT);
just fine, but now using this to connect to DB_2:
rc = SQLDriverConnect(hdbc, NULL, "DSN=DB_1;UID=dbtest1;PWD=zebco5;DATABASE=DB_2",
SQL_NTS, outStr, 128, &outSize, SQL_DRIVER_NOPROMPT);
results in this error:
SQL0843N The server name does not specify an existing connection. SQLSTATE=08003
Which I understand, but seems like a regression in functionality from the old node/db registration mechanism.
I'm attempting to determine if the functionality I was using is supported with the configuration file and I am doing something wrong or if it just doesn't work that way?
Thank you for your help.

Windows client error for DB2 10.5 fp3 DATA BASE Connection refused:Error:SQL30081N and SQLSTATE IS 08001

When we connect to database we got error in windows client machine.
Error:SQL30081N and SQLSTATE IS 08001.
SERVER:HP-UX DB2 10.5 FP3
Please suggest on this.
A quick Google suggests this may be the result of a firewall blocking the connection: http://www-01.ibm.com/support/docview.wss?uid=swg21503305

SQL Server 2008 R2 - Unable to rebuild master database, Cannot shutdown service

Yesterday I noticed I could not execute any query within the master database. I tried a DBCC CHECKDB but this just hung (let it run for 24 hours). I was unable to stop the SQL Server service: "The service cannot accept control messages at this time"
I decided to try to rebuild the master database: setup /ACTION=REBUILDDATABASE /QUIET /INSTANCENAME=MYINSTANCE /SQLSYSADMINACCOUNTS=MYACCOUNT /SAPWD=MYPASSWORD
Summary.txt seems to indicate the same problem:
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0x0A2FBD17#1211#1
Configuration error description: The service cannot accept control messages at this time.
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140517_091501\Detail.txt
It looks like the SQL Server cannot be shutdown. What can I do about this?
"SHUTDOWN WITH NOWAIT" looks to have fixed the problem.