SQL Server : Remote Linked Oracle DB Query to include ROWID? - sql-server

I am not too familiar with how the linked remote databases work in SQL Server. But I am trying to query to a linked remote oracle database table using SQL syntax on SQL Server. I am having a issue trying to query a ROWID, which is proprietary to Oracle PL/SQL.
This is query I am trying to use:
select t.*, t.rowid
from owner.DMIS_TBL t
Is there a way to input a Oracle based query in SQL Server for a remote database? Querying all other columns in the Oracle tables works fine but if I specify the ROWID it does not recognize it.. I know the ROWID this is a pseudo column but I need to have this for migration purposes to use as the record id in SQL Server. Maybe it won't work in SQL syntax because the datatype is ROWID and SQL Server doesn't support this.

Related

Table migration from SQL Server 2019 to Oracle 19c using dblinks

I need to migrate multiple tables from SQL Server 2019 into Oracle 19c. currently I am using dblink connection from SQL Server and it can migrate about 125k row per minute which is too long for me. Right now, I am using SELECT from SQL Server then INSERT into Oracle inside a procedure. I need a faster query or a query that can commit every 1 million rows so that the query can be inserted even the query is stuck. Thanks

Create view in Oracle SQL Developer from Microsoft SQL Server Management Studio

I have two databases; SQL Server uses SSMS to connect and Oracle DB uses Oracle SQL Developer to connect.
I want to create a view in Oracle database from SSMS.
I tried this code in SSMS:
CREATE VIEW LINKDB_ORACLE..user_oracle.ViewCreate_OnOracle
AS
SELECT UserId, UserName
FROM [dbo].[Users]
When I run this query, I get this error:
The object name 'LINKDB_ORACLE..user_oracle.ViewCreate_OnOracle' contains more than the maximum number of prefixes. The maximum is 2.
How to I can query data from SQL Server use Oracle SQL Developer, if not use view method above.
I use SQL Server 2012 and Oracle 12c
You can't use this syntax, it will be easier to create all views using Oracle Tools.
From Microsoft documentation:
A view can be created only in the current database. The CREATE VIEW must be the first statement in a query batch.
Create-view-transact-sql
If you have to use SSMS, you can try syntax:
EXEC ('CREATE VIEV...') AT linked_server
If you want to see SQL Server data from Oracle database, then check this post:
Oracle equivalent for linked server

Replicate Changes from oracle to Sql Server

I have Oracle database 11 g in which I have many tables. I want to replicate few of these tables in SQL server so whenever a new record is inserted in oracle table I also want to update in SQL server table. I have created linked server but don't know what to do next. Kindly guide me how can I replicate changes on SQL server side.
Use Goldengate (An Oracle tool) that can do bi-directional replication from Oracle to Sql Server. See this:
http://www.oracle.com/us/products/middleware/data-integration/goldengate/using-gg11g-for-sql-server-1489372.pdf

linked server compares between Oracle and SQL Server

We are doing a migration from Oracle 10g to SQL Server 2014. Once I set up the linked Server connection in SQL Server to the Oracle DB will I be able to run a statement like the following:
select * from linkedservername...schema.table
except
select * from Servername.database.schema.table
Not all queries will be this easy as I'll have to do some data manipulation on the oracle side. Will I need to use Oracle syntax for that or once I have the linked server set up will everything be in T-SQL for querying purposes?
Thanks

postgresql with SQL Server

I have two databases servers one on SQL Server 2000, second on PostgreSQL on different server. I want to link them. I create duplicate table on the PostgreSQL. Now I want, when new value appeared in SQL Server duplicate them to PostgreSQL. How to do that? How can I see the SQL Server on PostgreSQL? Or must I create an application which will send message from SQL Server to PostgreSQL?
Here's a description on how to set up master/slave replication between SQL Server and Postgres (i.e. SQL Server=master updates to Postgres):
http://blog.hagander.net/archives/103-Replicating-from-MS-SQL-Server-to-PostgreSQL.html
Looks like your scenario.

Resources