How to get DBLink name in ODI KM - oracle

I'm using Oracle Data Integration and i need to integrate in an IKM a source DBLink.
I have a simple mapping between one source table and one target table. The source table is on another database so I need to use a DBLink.
I have created the DBLink in the topology and associated to the source Data Server.
I tried to "catch" the DBLink name using <%=odiRef.getInfo("SRC_DSERV_NAME")%> but i get the target instance instead of source DBLink(instance).
Any suggestions?

In the meantime I've found the solution: <#=odiRef.getObjectName("R","<%=odiRef.getSrcTablesList("", "[TABLE_NAME]", "", "")%>","D")#>.

Related

How to create new oracle database with same structure as another database but without data?

I wanted to create a database with the same structure as another database but without restoring data.
Is good idea use Database Configuration Assistant.
Use dbca (Templates )
Create a template for existing database.
Create a database from template

Oracle in SSIS package

I Create Package in SSIS with sql source Oracle Destination. So I create a table in Oracle that is my Target .
In the Insert Destination How Can I find my table in oracle?
Once you create and test your DNS, go to SSIS Data Flow Task and in the Other Destinations double click ADO Net Destination.From the Connection Manager create a new Connection pointing to the DNS you created above. You can see your Oracle tables from the Use a table or View.

Cloning a Oracle Database Schema

I have an Oracle 12c Instance with a scheme 'wadmin' user, this instance has tables, view, data, triggers, sequences etc.
For quick spinning of docker images, I need to clone the db schema as fast as possible , so that I can create another user 'wadmin1' link it to new docker and start my testing.
Any CLI/tools for the same, does oracle provide any options?
I do not know if this is exacly what you are looking for but you can export your Oracle schema using ORACLE DataPump tool. This involves storing exported schema in the Oracle directory. While exporting schema to file you can transform the schema name, omit unnecessary tables or data etc. Exported files with database schema can be later used for imported to new database instance. More information regarding Oracle DataPump you can find here. https://oracle-base.com/articles/10g/oracle-data-pump-10g#SchemaExpImp.
Alternatively you can have scripts that create the database stored in the Git repository and integrate your builds with too called Flyway https://flywaydb.org/ which can be used to automatize of database schema creation. This is also really convenient from source control point of view. All changes on the schema are pull requested.
In my team we use OracleDataPump when we want to recreate the database together with the data, Flyway is used as a part of our continues integration.

connect PostgreSql to Oracle live

I have a PostgreSql database and I need to connect it to read data from oracle view and store that data in custom table
The PostgreSql database will connect to oracle everyday automatically to read the latest updates from oracle view
How to create it?
It sounds like you probably want a SQL/MED foreign data wrapper. Check out oracle_fdw. You could also use the generic odbc_fdw or jdbc_fdw wrappers via Oracle's ODBC or JDBC drivers.
Another option is DBI-Link.
Combine these with a cron job if you want to copy to a local view.

Spring-iBatis create database dynamically

I am new to spring-iBatis. I have a requirement to create a database dynamically from my application. The database is MySql. I have seen that there are methods for insert,update and delete like SQLMap.insert(). but I am not finding any method to execute Create statement. Can anyone help me ?
Try using Abator to assist in your code generation.
Hibernate can create a schema for you, because it takes information from objects and mappings and creates tables for you.
iBatis doesn't have the information about tables from mappings; you give it SQL to work with tables that are presumed to exist.
I'd recommend that you add SQL CREATE TABLE statements to a script and execute it with MySQL to create your schema. It should be complete by the time you start with Java and iBatis.

Resources