June 1, 2016 at 12:15 pm
I am having a hard time and hoping someone could point out what I can't seem to figure out.
We are migrating from an old environment to a new environment and our new environment is not allowed to use Linked Servers and as such, I need to convert an existing SQL Job that uses linked servers to an SSIS package.
We have the following code as it exists:
SELECT *
INTO STG_M
FROM OPENQUERY(OracleServer, 'SELECT NUMBER, ACCT_STATUS, CONTRACT_DATE FROM STG_M')
In our SSIS Package, we have setup a connection to Oracle (simply called Oracle), and a connection to our SQL Server (simply called SQLServer). We want to pull in the data from Oracle and stored in our SQL Server. I am having a hard time converting the OPENQUERY into T-SQL Code that SSIS can run.
June 1, 2016 at 1:09 pm
kocheese (6/1/2016)
I am having a hard time and hoping someone could point out what I can't seem to figure out.We are migrating from an old environment to a new environment and our new environment is not allowed to use Linked Servers and as such, I need to convert an existing SQL Job that uses linked servers to an SSIS package.
We have the following code as it exists:
SELECT *
INTO STG_M
FROM OPENQUERY(OracleServer, 'SELECT NUMBER, ACCT_STATUS, CONTRACT_DATE FROM STG_M')
In our SSIS Package, we have setup a connection to Oracle (simply called Oracle), and a connection to our SQL Server (simply called SQLServer). We want to pull in the data from Oracle and stored in our SQL Server. I am having a hard time converting the OPENQUERY into T-SQL Code that SSIS can run.
Unsurprisingly, as Oracle does not use T-SQL. You need to use Oracle's version of SQL as your source query.
Your query, however, looks like it should still run, given its simplicity.
So ... can you provide more details about the hard time you are having? What errors are you getting?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
June 1, 2016 at 1:50 pm
kocheese (6/1/2016)
I am having a hard time and hoping someone could point out what I can't seem to figure out.We are migrating from an old environment to a new environment and our new environment is not allowed to use Linked Servers and as such, I need to convert an existing SQL Job that uses linked servers to an SSIS package.
We have the following code as it exists:
SELECT *
INTO STG_M
FROM OPENQUERY(OracleServer, 'SELECT NUMBER, ACCT_STATUS, CONTRACT_DATE FROM STG_M')
In our SSIS Package, we have setup a connection to Oracle (simply called Oracle), and a connection to our SQL Server (simply called SQLServer). We want to pull in the data from Oracle and stored in our SQL Server. I am having a hard time converting the OPENQUERY into T-SQL Code that SSIS can run.
Heh... to what end are they making this requirement? Simplicity? I don't believe you'll find that to be true. 😉
Save the old code. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply