Database Link to ATP/ADW - database

I am having challenges in creating a database link from an ORACLE DBCS to an ORACLE ATP.
I am creating a database link from an ORACLE DBCS (PAAS) to an ORACLE ATP (Autonomous Transaction Processing) database. I can't seem to get the proper connection set-up for this. Anyone who has successfully been able to?
My connection to the ORACLE ATP with SQLDeveloper is a zipped Wallet.
CREATE DATABASE LINK TARGET_DB
CONNECT TO admin IDENTIFIED BY "Myp#ssword123!"
USING
'(DESCRIPTION=
(ADDRESS=
(PROTOCOL=tcps)
(HOST=99.99.99.99)
(PORT=1522))
(CONNECT_DATA=
(service_name=eoakbwd540pwkbi_myuseratp_high.atp.oraclecloud.com)))';
-- ip address and service names are fake
When I test the DB link using SQLDeveloper I get the ORA-28788 error code.

0. Setup
You start out with two instances:
DBCS - in my case Enterprise Edition/12.2 with port 1521 opened in the security lists
ATP Instance
Download the wallet zip-file from the ATP instance containing a tnsnames.ora, sqlnet.ora and some wallet files.
Then upload the unzipped files to your DBCS instance.
1. Wallet Configuration
On DBCS: Replace the sqlnet.ora and tnsnames.ora in the $ORACLE_HOME/network/admin folder with the ones from the zip file (might need to merge them if you have existing entries that are still needed).
Replace the WALLET_LOCATION in the sqlnet.ora file with the actual location of your wallet files (specifically the cwallet.sso and ewallet.p12). Make certain the permission are open for the oracle user.
2. Database Link
You have two options for the database link (that I know of). First get the service names (e.g. randomatp_high) from your tnsnames.ora file.
Using the username/password of your ATP admin user in the database link connection command
create database link <DBLinkName> connect to ADMIN identified by "<ATPpassword>" using '<ATPServiceName>';
Create two users with the same username and the same password in DBCS and ATP, connect to DBCS as that user and then:
create database link <DBLinkName> using '<ATPServiceName>';
You might need to use alter session set global_names=false; to help with ORA-02085 saying the database link is connected to a different DB.
3. Test
Test the database link with e.g.:
select banner from v$version#<DBLinkName>;

Related

Knime with database

How to add new driver into database through KNIME preferences? Generally,
File-> Preferences -> Add File/ Add Directory
The files accepted are only of *.jar or *.zip.
MY QUESTION
I have installed ODBC64 into my PC. Now I need to add that file into knime preferences and use the Driver into Database Connector node.
How to add and use the file into my Knime?
And What is meant by Database URL jdbc:mysql://host:port/database_name
Host and port?
Can anyone please briefly explain and help me out?
I'm assuming based on your database URL of jdbc:mysql:// that you are wanting to connect to a MySQL database? Based on that, then there is a thread on the KNIME forum which explains pretty much all of your question, but the process is the same for any other sort of database. The steps are as follows:
Download the jdbc driver (e.g. from https://dev.mysql.com/downloads/connector/j/ for MySQL) - NB KNIME now comes bundled with several drivers already installed - MySQL is one of those - in the Database Connector node the drivers installed are listed.
In the database URL, you need to change those parts in <> - i.e. the hostname, port number and database name. Hostname may be localhost if it is a local database. The port number you will need to find from your database administrator, or will be what you set it up to be if you are running a local database (3306 is the default for MySQL), so for a database called 'myDB' on the default port on your local machine, the url should be jdbc:mysql://localhost:3306/myDB
For some of the shipped drivers, there are also connector nodes, e.g. MySQL Connector, SQLite Connector, PostgreSQL Connector etc, which still require the server name/port and database name, but take them as individual inputs rather than requiring editing of the URL
Recent versions of KNIME are based on Java 8, which dropped support for ODBC, so you should first find an alternative driver for your database and only after you can connect to that with KNIME as described on the KNIME documentation page for DB connectors.
You have several nodes which allow you to connect to a DB (especially MySQL).
I remember there was a dedicated MySQL node for connecting with the DB.
Just remember this: you have to input the IP adress : port, then insert credentials and point to the DB you want to open by default.

How to distribute FDSN to other users or machines?

I am using a File DSN to connect to a SQL Server database in a linked tables project with MS Access as front end.
When I open the created .dsn file, it looks like this:
[ODBC]
DRIVER=SQL Server
UID=XXX
DATABASE=XXXX
WSID=XXXXXX
APP=Microsoft Office 2010
Trusted_Connection=Yes
SERVER=XXXX,XXX
Description=XXX
Here, it is showing my workstation's host name and my user id as I have created the DSN
If I want to share the app along with DSN , do I have to change any details in the DSN file ?
What is procedure to be followed to distribute this FDSN to multiple machines? Or simply sharing the file would suffice
We prefer to avoid System DSN as it causes difficulty in deploying the app to multiple users in production
Any thoughts on this ?
Eliminate the DSN and use DSN-less connections. Here are some links
http://www.accessmvp.com/djsteele/DSNLessLinks.html
http://www.databasejournal.com/features/mssql/article.php/1491011/ODBC-DSN-Less-Connection-Tutorial.htm
https://support.microsoft.com/en-us/kb/147875/en-us?wa=wsignin1.0

Moving Magento to new server checklist

So I'm trying to manually move Magento to new server with old school ftp/phpmyadmin method. I only have the sql dump and folders from the root of old server, not access to it anymore and I don't know the earlier magento version number.
Should I
do fresh install of Magento to new server and then substitute folders and somehow import sql?
or
dump the files and sql to the new server first and then run the installer (something else?)
Many thanks
Usually below methods are followed,
Empty your cache admin sessions
Empty your logs (mysql)
create backup your database and your files
check your new server that supports magento using this
upload your files and import your db. If your database size is very large then directly import your database to your mysql server using sql command. Command would be like this,
mysql -u username -p database_name < file.sql
for this you need to logged in your server(mysql)
Update your mysql credentials to your etc file and update path in core_config_data table .
Place some dummy orders to check emails are correctly delivered and payment, shipping etc.
Buy SSL Certificates and avoid shared hosting.

Oracle data pump impdp to remote server

We have a dump file that we want to import to an Amazon rds server.
This is what I did:
Create a public db link and verify it works:
create public database link rdsdblink
connect to dbuser identified by dbpsw
using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST='xxx')(PORT=1521)))(CONNECT_DATA=(SID=dbsid)))';
SQL> select * from dual # rdsdblink;
D
-
X
Create a directory for the dump file:
CREATE OR REPLACE DIRECTORY DATA_PUMP_DIR AS 'G:\DB';
Import the dump file:
impdp dbuser/dbpsw#rdsdblink tablespaces=EMP directory=DATA_PUMP_DIR dumpfile=EMP_dump.DMP logfile=EMP_dump.log network_link=rdsdblink
I have also added rdsdblink connection string to tnsnames.ora file and restarted oracle service ("shutdown immediate", then "startup").
The following error occured:
Connected to: Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
ORA-39001: invalid argument value
ORA-39200: Link name "rdsdblink" is invalid.
ORA-02019: connection description for remote database not found
My local oracle version:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
Remote oracle version:
Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
You've connected to the remote database (via dbuser/dbpsw#rdsdblink), but your DB link is created in your local database. At the moment you're trying to run the import on the remote DB, with a network link also to the remote DB, and that network link is trying to use a DB link that doesn't exist on that remote DB.
The tnsnames.ora entry and the DB link are completely separate things.
You need to connect normally locally - using whichever credentials you used to create the DB link, probably. The network_link parameter will then make your local database session, that is started by impdp, act against the remote server; so your local directory can be used.
Except... it doesn't work like that. The remote database identified by the network_link can be used as the source of the import, without a dump file at all; but it can't be the target for an import from a file.
From the impdpdocumentation:
The NETWORK_LINK parameter initiates an import via a database link.
This means that the system to which the impdp client is connected
contacts the source database referenced by the
source_database_link, retrieves data from it, and writes the data directly to the database on the connected instance. There are no dump
files involved.
If you really wanted to go down this route, I think you would need a link from remote to local, and to run the import against the remote (as you are now), but to be pulling directly from your schema - not from a previous export. You'd still need access to a DIRECTORY object on the remote server, as logs etc. would be written there, even if you weren't copying your dump file over. Even with nologfile I believe it will error if you don't specify a directory or don't have permissions on it.
The article you linked to in your previous question said the same thing:
For imports, the NETWORK_LINK parameter also identifies the database
link pointing to the source server. The difference here is the objects
are imported directly from the source into the local server without
being written to a dump file. Although there is no need for a
DUMPFILE parameter, a directory object is still required for the
logs associated with the operation.

Error on attempting to import data from Access to SQL Server

I am trying to import data from an Access 2003 mdb database using OpenDataSource with the ACE OLEDB driver. I'm getting this error:
Description: OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Cannot start your application. The workgroup information file is missing or opened exclusively by another user.".
I have no idea what it's talking about, and my internet searches have not helped. They all refer to linked servers, and anything I've tried has done nothing to fix the problem. What does this error mean, and what do I need to do to fix it?
The sproc which does the importing is called from an SSIS package, which goes through a table of file locations and calls the sproc for each of them. I just discovered that the package ran for about half an hour, getting about 80 files imported, before it began throwing this error. I have as yet been unable to find any difference between the files that worked and the ones that didn't.
From Understanding the role of workgroup information files in Access security:
The workgroup information file is a required component when you use a
Microsoft Access database (MDB). This file is required for both a
run-time installation and a full installation of Microsoft Access.
This file is an important component of Microsoft Access security.
If you develop database applications, it is important that you have a
good understanding of the workgroup information file. It is a good
idea to reserve the last phase of the development process for applying
security in Access. Until then, you can develop the database
application in an unsecured database.
A workgroup is a group of users who share data in a multiuser
environment. When security is implemented on a database, the user and
group accounts are recorded in the workgroup information file. User
passwords are also stored in the workgroup information file.
IMPORTANT: If you establish Access security in a database, Microsoft
recommends that you store a backup copy of the workgroup information
file in a safe location. If the file is lost or damaged, the only way
to recover the workgroup information file quickly is to restore the
file from a backup copy. If you do not have a backup copy, you must
re-create the User and Group Accounts with the same Personal IDs that
were originally assigned. If the new workgroup information file is not
created exactly as the original file, you will not be able to open the
database with the workgroup file.
Access uses the workgroup information file even when the database has
not been secured. The default Admin user account, which is stored in
the workgroup information file, is used to open all unsecured
databases. If you assign a password to the Admin user, you will
receive a logon prompt when you reopen the database.
The Access database that SQL Server is trying to access is being used by another user. Go to the folder where the database is stored. With Access 2003, the database file itself will end in 'mdb'. If there is a file with the same name but ending in 'idb', it signals that there is a user currently using the 'mdb' file. Have the user exit the database and then run your package. If you can't find the user using the file, make a copy of the file in another folder and edit your SSIS package to reflect the change.

Resources