<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Return to LifeAsBob - SQL Server | Linked Server</title>
    <link>http://www.lifeasbob.com/</link>
    <description>Horkay Blog</description>
    <language>en-us</language>
    <copyright>Robert J. Horkay</copyright>
    <lastBuildDate>Fri, 03 Apr 2009 20:03:22 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>bobh@lifeasbob.com</managingEditor>
    <webMaster>bobh@lifeasbob.com</webMaster>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We're still not ready to support sql 2008 (Company Infrastructure, vendors and DBA
Group are a little slow), maybe this June or July we'll do the first sql 2008 implementation).
</p>
        <p>
For me, most SQL Server migrations have been easy.  No mess, no fuss, hit the
"easy button".  We even do the migrations the "hard" way...new servers, named
instance, usually to a new clustered or consolidated environment using Polyserve or
VM, and we separate all DTS (ssis) and User jobs out to an application (ETL) server. 
As a DBA with 100's of servers it's a lot easier to let each application group manage
their own jobs, off the sql server, than for us to handle the requests. 
Usually the most difficult issue is connectivity, firewall and connection strings. 
Of 170 instances we support very rarely is there a difficult issue, we've dealt with
some odd performance issues here and there, but for the most part it's been smooth
sailing (hah, I remember being up for several days straight monitoring a system with
5K tps and watching it crash every day, but that's the extreme end of the bell curve).
</p>
        <p>
Finally we couldn't put it off any more, and it was time to tackle the elephant in
the room.  
</p>
        <p>
It's not a big Instance (5 databases, 60gb), but the challenges are big.  We're
dealing with 88 DTS Packages and 45 sql agent jobs, Connectivity to multiple Oracle
databases, AS400 and other SQL Servers, 60+ downstream consumers of data.  Excel
Flat Files, Text Files, Web services, 3rd party vendor imports and exports. 
Let the games begin.
</p>
        <p>
I knew I was screwed when I de-attached the databases from SQL 2000 and attached them
to sql 2005 and got the following errors:  "Attach database failed for Server
x.  An exception occurred while executing a T-SQL Statement or batch.  Converting
database x from version 539 to 611.  Microsoft SQL Server, Error 195. fn_convertdatetoint_notime
is not a recognized function name.  Incorrect syntax near the keyword 'left'". 
Ultimately we determined that this issues was caused by user functions in SQL 2000
setup in the master database, NOT Supported in sql 2005.  We also ran into isolated
issues where there were tsql syntax errors in sql 2000 that did not throw any errors,
but would not compile in 2005!
</p>
        <p>
          <strong>Linked Server Issues were also encountered.<br /></strong>   <font color="#0000ff">Setting up a linked server to the
AS400 on 64 Bit windows<br />
      Required a new version of the IBM iSeries driver<br />
      Required a patch to the IBM iseries driver<br />
      Required patching windows to install 64 bit odbc
drivers<br />
   Setting up a Linked server to SQL 2000 SP4<br />
      Required patching sql 2000, </font><a href="http://support.microsoft.com/kb/906954"><font color="#0000ff">http://support.microsoft.com/kb/906954</font></a><br /><font color="#0000ff">   Setting up a linked server to Oracle</font></p>
        <p>
Over-all the process took about a month (with 4 DBA's and other work), bulk of the
work was the DTS to SSIS packages.  We did look at some 3rd party utilities,
but they still left several hours work for each package, so we just did the brute
force method and did them one at a time.  Currently the process will spend 2-3
months running in parallel and being QA'd, than onto production.
</p>
        <p>
Hit the "next" button.<br /></p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3" />
      </body>
      <title>Toughest SQL Server 2005 migration ever !</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3.aspx</guid>
      <link>http://www.lifeasbob.com/2009/04/03/ToughestSQLServer2005MigrationEver.aspx</link>
      <pubDate>Fri, 03 Apr 2009 20:03:22 GMT</pubDate>
      <description>&lt;p&gt;
We're still not ready to support sql 2008 (Company Infrastructure, vendors and DBA
Group are a little slow), maybe this June or July we'll do the first sql 2008 implementation).
&lt;/p&gt;
&lt;p&gt;
For me, most SQL Server migrations have been easy.&amp;nbsp; No mess, no fuss, hit the
"easy button".&amp;nbsp; We even do the migrations the "hard" way...new servers, named
instance, usually to a new clustered or consolidated environment using Polyserve or
VM, and we separate all DTS (ssis) and User jobs out to an application (ETL) server.&amp;nbsp;
As a DBA with 100's of servers it's a lot easier to let each application group manage
their own jobs, off the sql server, than for&amp;nbsp;us to handle&amp;nbsp;the requests.&amp;nbsp;
Usually the most difficult issue is connectivity, firewall and connection strings.&amp;nbsp;
Of 170 instances we support very rarely is there a difficult issue, we've dealt with
some odd performance issues here and there, but for the most part it's been smooth
sailing (hah, I remember being up for several days straight monitoring a system with
5K tps and watching it crash every day, but that's the extreme end of the bell curve).
&lt;/p&gt;
&lt;p&gt;
Finally we couldn't put it off any more, and it was time to tackle the elephant in
the room.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
It's not a big Instance (5 databases, 60gb), but the challenges are big.&amp;nbsp; We're
dealing with 88 DTS Packages and 45 sql agent jobs, Connectivity to multiple Oracle
databases, AS400 and other SQL Servers, 60+ downstream consumers of data.&amp;nbsp; Excel
Flat Files, Text Files, Web services, 3rd party vendor imports and exports.&amp;nbsp;
Let the games begin.
&lt;/p&gt;
&lt;p&gt;
I knew I was screwed when I de-attached the databases from SQL 2000 and attached them
to sql 2005 and got the following errors:&amp;nbsp; "Attach database failed for Server
x.&amp;nbsp; An exception occurred while executing a T-SQL Statement or batch.&amp;nbsp; Converting
database x from version 539 to 611.&amp;nbsp; Microsoft SQL Server, Error 195. fn_convertdatetoint_notime
is not a recognized function name.&amp;nbsp; Incorrect syntax near the keyword 'left'".&amp;nbsp;
Ultimately we determined that this issues was caused by user functions in SQL 2000
setup in the master database, NOT Supported in sql 2005.&amp;nbsp; We also ran into isolated
issues where there were tsql syntax errors in sql 2000 that did not throw any errors,
but would not compile in 2005!
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Linked Server Issues were also encountered.&lt;br&gt;
&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#0000ff&gt;Setting up a linked server to the AS400
on 64 Bit windows&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Required a new version of the IBM iSeries driver&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Required a patch to the IBM iseries driver&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Required patching windows to install 64 bit odbc
drivers&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Setting up a Linked server to SQL 2000 SP4&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Required patching sql 2000, &lt;/font&gt;&lt;a href="http://support.microsoft.com/kb/906954"&gt;&lt;font color=#0000ff&gt;http://support.microsoft.com/kb/906954&lt;/font&gt;&lt;/a&gt;
&lt;br&gt;
&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Setting up a linked server to Oracle&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
Over-all the process took about a month (with 4 DBA's and other work), bulk of the
work was the DTS to SSIS packages.&amp;nbsp; We did look at some 3rd party utilities,
but they still left several hours work for each package, so we just did the brute
force method and did them one at a time.&amp;nbsp; Currently the process will spend 2-3
months running in parallel and being QA'd, than onto production.
&lt;/p&gt;
&lt;p&gt;
Hit the "next" button.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,09c6f3ae-9ef8-4854-b9b8-68c7a8c745e3.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / Linked Server</category>
      <category>SQL Server / SSIS</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=b90e2105-0f61-4980-85e5-f9a1130d0927</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,b90e2105-0f61-4980-85e5-f9a1130d0927.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,b90e2105-0f61-4980-85e5-f9a1130d0927.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b90e2105-0f61-4980-85e5-f9a1130d0927</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently ran into an issue with a linked server between sql server and an as400, using
the iSeries access driver via ODBC.  
</p>
        <p>
The linked server was not returning all the rows and it was not throwing any errors
either.
</p>
        <p>
          <hr />
        </p>
        <p>
        </p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/as400_countwrong.jpg" border="0" />
          <hr />
        </p>
        <p>
        </p>
        <p>
There is an advanced settings option on the iSeries as400 setup that needs to be "unchecked",
by default the option is checked and can lead to missing records.
</p>
        <p>
          <hr />
        </p>
        <p>
        </p>
        <p>
          <img src="http://www.lifeasbob.com/content/binary/as400_odbc1.jpg" border="0" />
          <hr />
        </p>
        <p>
        </p>
        <p>
Once it is unchecked, the query returns the correct counts or rows.
</p>
        <p>
          <hr />
        </p>
        <p>
        </p>
        <img src="http://www.lifeasbob.com/content/binary/as400_countgood.jpg" border="0" />
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b90e2105-0f61-4980-85e5-f9a1130d0927" />
      </body>
      <title>AS400 Linked Server not returning all rows</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,b90e2105-0f61-4980-85e5-f9a1130d0927.aspx</guid>
      <link>http://www.lifeasbob.com/2009/01/06/AS400LinkedServerNotReturningAllRows.aspx</link>
      <pubDate>Tue, 06 Jan 2009 16:00:00 GMT</pubDate>
      <description>&lt;p&gt;
Recently ran into an issue with a linked server between sql server and an as400, using
the iSeries access driver via ODBC.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
The linked server was not returning all the rows and it was not throwing any errors
either.
&lt;/p&gt;
&lt;p&gt;
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/as400_countwrong.jpg" border=0&gt; 
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
There is an advanced settings option on the iSeries as400 setup that needs to be "unchecked",
by default the option is checked and can lead to missing records.
&lt;/p&gt;
&lt;p&gt;
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/as400_odbc1.jpg" border=0&gt; 
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Once it is unchecked, the query returns the correct counts or rows.
&lt;/p&gt;
&lt;p&gt;
&lt;hr&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img src="http://www.lifeasbob.com/content/binary/as400_countgood.jpg" border=0&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=b90e2105-0f61-4980-85e5-f9a1130d0927" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,b90e2105-0f61-4980-85e5-f9a1130d0927.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / Linked Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=ea49f6b7-5117-457a-b2ba-18a080a13b26</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,ea49f6b7-5117-457a-b2ba-18a080a13b26.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,ea49f6b7-5117-457a-b2ba-18a080a13b26.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ea49f6b7-5117-457a-b2ba-18a080a13b26</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <strong>
            <u>SQL Server 2005 to Oracle via Linked Server - OpenQuery Syntax with Datefields</u>
          </strong>
        </p>
        <p>
For some reason the Oracle Linked Server in SQL Server 2005 is more "type sensitive"
when it comes to data types.  We've had to resort to using OpenQuery instead
of the 4 part linked server syntax and using conversions of the datatypes.  The
unique part of using openquery is to get as much of the query to resolve on the host
(oracle) side as possible, to do this you will need to become familiar with Oracle's
functions
</p>
        <p>
Between on two hard coded date fields:
</p>
        <font color="#0000ff" size="2">
          <p>
Select
</p>
        </font>
        <font size="2">
          <font color="#000000"> * </font>
        </font>
        <font color="#0000ff" size="2">from</font>
        <font color="#000000" size="2">
        </font>
        <font color="#0000ff" size="2">openquery</font>
        <font color="#808080" size="2">(</font>
        <font color="#000000" size="2">TSR</font>
        <font color="#808080" size="2">,</font>
        <font color="#ff0000" size="2">'SELECT
to_char(FILE_SEQ_ID) as FILE_SEQ_ID, MACHINE_NM, TO_CHAR(PATH_ID) AS PATH_ID, TUNER_ID,
FILE_NM, TO_CHAR(FILE_SUFFIX_ID) AS FILE_SUFFIX_ID, TO_CHAR(PREVIOUS_FILE_SEQ_ID)
AS PREVIOUS_FILE_SEQ_ID, LEAP_RECV_TS, CRE_PROC_TS, TO_CHAR(FILE_SOURCE_CD) AS FILE_SOURCE_CD
from TSR1.LOAD_FILE_HIST where CRE_PROC_TS between to_date(''03/10/2008 03:00:00'',''mm/dd/yyyy
hh24:mi:ss'') and to_date(''03/14/2008 03:30:00'',''mm/dd/yyyy hh24:mi:ss'')'</font>
        <font color="#808080" size="2">)</font>
        <p>
Between on hard coded date field with System Date.
</p>
        <font color="#0000ff" size="2">
          <p>
Select
</p>
        </font>
        <font color="#000000" size="2"> @fin_Current </font>
        <font color="#808080" size="2">=</font>
        <font size="2">
          <font color="#000000"> fintotal </font>
        </font>
        <font color="#0000ff" size="2">from</font>
        <font size="2">
        </font>
        <font color="#0000ff" size="2">openquery</font>
        <font color="#808080" size="2">(</font>
        <font size="2">FIN</font>
        <font color="#808080" size="2">,</font>
        <font color="#ff0000" size="2">'select
SUM(tot_returns) as fintotal from division_vol_sum where sum_dttm between to_date(''01/01/2008
00:00:00'',''mm/dd/yyyy hh24:mi:ss'') and trunc(sysdate) and division_dept_id &lt;&gt;
24718'</font>
        <font color="#808080" size="2">)
</font>
        <p>
          <font color="#808080" size="2">
            <br />
 
</font>
        </p>
        <font color="#808080" size="2">
        </font>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=ea49f6b7-5117-457a-b2ba-18a080a13b26" />
      </body>
      <title>Oracle Linked Server openQuery Syntax with Datefields</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,ea49f6b7-5117-457a-b2ba-18a080a13b26.aspx</guid>
      <link>http://www.lifeasbob.com/2008/03/17/OracleLinkedServerOpenQuerySyntaxWithDatefields.aspx</link>
      <pubDate>Mon, 17 Mar 2008 18:34:08 GMT</pubDate>
      <description>&lt;p&gt;
&lt;strong&gt;&lt;u&gt;SQL Server 2005 to Oracle via Linked Server - OpenQuery Syntax with Datefields&lt;/u&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
For some reason the Oracle Linked Server in SQL Server 2005 is more "type sensitive"
when it comes to data types.&amp;nbsp; We've had to resort to using OpenQuery instead
of the 4 part linked server syntax and using conversions of the datatypes.&amp;nbsp; The
unique part of using openquery is to get as much of the query to resolve on the host
(oracle) side as possible, to do this you will need to become familiar with Oracle's
functions
&lt;/p&gt;
&lt;p&gt;
Between on two hard coded date fields:
&lt;/p&gt;
&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
Select
&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt; * &lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;from&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;openquery&lt;/font&gt;&lt;font color=#808080 size=2&gt;(&lt;/font&gt;&lt;font color=#000000 size=2&gt;TSR&lt;/font&gt;&lt;font color=#808080 size=2&gt;,&lt;/font&gt;&lt;font color=#ff0000 size=2&gt;'SELECT
to_char(FILE_SEQ_ID) as FILE_SEQ_ID, MACHINE_NM, TO_CHAR(PATH_ID) AS PATH_ID, TUNER_ID,
FILE_NM, TO_CHAR(FILE_SUFFIX_ID) AS FILE_SUFFIX_ID, TO_CHAR(PREVIOUS_FILE_SEQ_ID)
AS PREVIOUS_FILE_SEQ_ID, LEAP_RECV_TS, CRE_PROC_TS, TO_CHAR(FILE_SOURCE_CD) AS FILE_SOURCE_CD
from TSR1.LOAD_FILE_HIST where CRE_PROC_TS between to_date(''03/10/2008 03:00:00'',''mm/dd/yyyy
hh24:mi:ss'') and to_date(''03/14/2008 03:30:00'',''mm/dd/yyyy hh24:mi:ss'')'&lt;/font&gt;&lt;font color=#808080 size=2&gt;)&lt;/font&gt;&gt;
&lt;p&gt;
Between on hard coded date field with System Date.
&lt;/p&gt;
&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
Select
&lt;/font&gt;&lt;font color=#000000 size=2&gt; @fin_Current &lt;/font&gt;&lt;font color=#808080 size=2&gt;=&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt; fintotal &lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;from&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;openquery&lt;/font&gt;&lt;font color=#808080 size=2&gt;(&lt;/font&gt;&lt;font size=2&gt;FIN&lt;/font&gt;&lt;font color=#808080 size=2&gt;,&lt;/font&gt;&lt;font color=#ff0000 size=2&gt;'select
SUM(tot_returns) as fintotal from division_vol_sum where sum_dttm between to_date(''01/01/2008
00:00:00'',''mm/dd/yyyy hh24:mi:ss'') and trunc(sysdate) and division_dept_id &amp;lt;&amp;gt;
24718'&lt;/font&gt;&lt;font color=#808080 size=2&gt;)&gt;
&lt;/font&gt; 
&lt;p&gt;
&lt;font color=#808080 size=2&gt;
&lt;br&gt;
&amp;nbsp;
&lt;/p&gt;
&gt;&lt;font color=#808080 size=2&gt;&lt;/font&gt;&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=ea49f6b7-5117-457a-b2ba-18a080a13b26" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,ea49f6b7-5117-457a-b2ba-18a080a13b26.aspx</comments>
      <category>SQL Server</category>
      <category>SQL Server / Linked Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=cb3635aa-05e7-4a62-a941-e678a5a051b4</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,cb3635aa-05e7-4a62-a941-e678a5a051b4.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,cb3635aa-05e7-4a62-a941-e678a5a051b4.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=cb3635aa-05e7-4a62-a941-e678a5a051b4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Message<br />
Executed as user: {removed}. Cannot get the data of the row from the OLE DB provider
"OraOLEDB.Oracle" for linked server "{removed}". [SQLSTATE 42000] (Error 7346) 
OLE DB provider "OraOLEDB.Oracle" for linked server "{removed}" returned message "ORA-01403:
no data found". [SQLSTATE 01000] (Error 7412).  The step failed.<br /></p>
        <p>
Once again, my most favorite.
</p>
        <p>
This is from a sql agent job, in sql server 2005, that calls a stored procedure that
uses a Oracle Linked server.  Now what really is strange, is that i can take
that stored procedure and run it from a query window and it runs fine !  BUT
NOT AS A JOB !
</p>
        <p>
Stopped SQL Agent, still Fails.
</p>
        <p>
Finally had to stop and start the ENTIRE INSTANCE.  I think this is overkill,
but I didn't have hours to research and I was still in the maintenance window. 
Not sure if this is related to the MS DTC Service or an Oracle issue.
</p>
        <p>
This is on an HP 585, Windows 2003, 64 bit, Oracle 10g client.
</p>
        <p>
%^&amp;$#$#%$%
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=cb3635aa-05e7-4a62-a941-e678a5a051b4" />
      </body>
      <title>Oracle Linked Server, Burned again</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,cb3635aa-05e7-4a62-a941-e678a5a051b4.aspx</guid>
      <link>http://www.lifeasbob.com/2007/12/30/OracleLinkedServerBurnedAgain.aspx</link>
      <pubDate>Sun, 30 Dec 2007 20:21:57 GMT</pubDate>
      <description>&lt;p&gt;
Message&lt;br&gt;
Executed as user: {removed}. Cannot get the data of the row from the OLE DB provider
"OraOLEDB.Oracle" for linked server "{removed}". [SQLSTATE 42000] (Error 7346)&amp;nbsp;
OLE DB provider "OraOLEDB.Oracle" for linked server "{removed}" returned message "ORA-01403:
no data found". [SQLSTATE 01000] (Error 7412).&amp;nbsp; The step failed.&lt;br&gt;
&lt;/p&gt;
&lt;p&gt;
Once again, my most favorite.
&lt;/p&gt;
&lt;p&gt;
This is from a sql agent job, in sql server 2005, that calls a stored procedure that
uses a Oracle Linked server.&amp;nbsp; Now what really is strange, is that i can take
that stored procedure and run it from a query window and it runs fine !&amp;nbsp; BUT
NOT AS A JOB !
&lt;/p&gt;
&lt;p&gt;
Stopped SQL Agent, still Fails.
&lt;/p&gt;
&lt;p&gt;
Finally had to stop and start the ENTIRE INSTANCE.&amp;nbsp; I think this is overkill,
but I didn't have hours to research and I was still in the maintenance window.&amp;nbsp;
Not sure if this is related to the MS DTC Service or an Oracle issue.
&lt;/p&gt;
&lt;p&gt;
This is on an HP 585, Windows 2003, 64 bit, Oracle 10g client.
&lt;/p&gt;
&lt;p&gt;
%^&amp;amp;$#$#%$%
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=cb3635aa-05e7-4a62-a941-e678a5a051b4" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,cb3635aa-05e7-4a62-a941-e678a5a051b4.aspx</comments>
      <category>SQL Server / Linked Server</category>
    </item>
    <item>
      <trackback:ping>http://www.lifeasbob.com/Trackback.aspx?guid=ebb3a6a0-fd3f-4e92-be72-eb09c2a59ef9</trackback:ping>
      <pingback:server>http://www.lifeasbob.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.lifeasbob.com/PermaLink,guid,ebb3a6a0-fd3f-4e92-be72-eb09c2a59ef9.aspx</pingback:target>
      <dc:creator>Bob Admin</dc:creator>
      <wfw:comment>http://www.lifeasbob.com/CommentView,guid,ebb3a6a0-fd3f-4e92-be72-eb09c2a59ef9.aspx</wfw:comment>
      <wfw:commentRss>http://www.lifeasbob.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ebb3a6a0-fd3f-4e92-be72-eb09c2a59ef9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Burned again by the famous combination of Oracle and SQL Server linked servers, and
a poorly configured SQL Agent job.
</p>
        <p>
Scenario:
</p>
        <ol>
          <li>
Job Runs every 5 minutes 
</li>
          <li>
Job Runs a standard T-SQL Stored Procedure 
</li>
          <li>
Stored Procedure makes use of Oracle Linked Server (full 4 part naming and Open query
used) 
</li>
          <li>
Oracle goes down for scheduled maintenance 
</li>
          <li>
SQL DBA's forget to stop job 
</li>
          <li>
Job pages on-call (me) 
</li>
          <li>
Disable job until Oracle maintenance complete 
</li>
          <li>
Oracle maintenance complete. 
</li>
          <li>
Connectivity of linked server verified 
</li>
          <li>
Re-enable job 
</li>
          <li>
JOB Fails ! 
</li>
          <li>
T-SQL Stored procedure runs from SSMS fine, but won't run as a job</li>
        </ol>
        <p>
Here is the poorly configured sql agent.  1st off the job output file is set
to over-write, so know as I write this I can't quote the exact error, 2nd the system
was set at the default job history retention, so I can't go into the job history to
grab the error either.
</p>
        <p>
Basically the error was something about reading a row from sysoledbservers or something.
</p>
        <p>
The solution was to Stop and Start SQLAgent; now why SQLAgent, running tsql using
a linked server would not work, when the sqm tsql would run just fine from SSMS is
beyond me, which is why I wish i had the exact error, as I was going to call pss support,
which i didn't do at 1am in the morning. 
</p>
        <img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=ebb3a6a0-fd3f-4e92-be72-eb09c2a59ef9" />
      </body>
      <title>Linked Servers - Oracle and SQL Agent</title>
      <guid isPermaLink="false">http://www.lifeasbob.com/PermaLink,guid,ebb3a6a0-fd3f-4e92-be72-eb09c2a59ef9.aspx</guid>
      <link>http://www.lifeasbob.com/2007/12/03/LinkedServersOracleAndSQLAgent.aspx</link>
      <pubDate>Mon, 03 Dec 2007 15:02:28 GMT</pubDate>
      <description>&lt;p&gt;
Burned again by the famous combination of Oracle and SQL Server linked servers, and
a poorly configured SQL Agent job.
&lt;/p&gt;
&lt;p&gt;
Scenario:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Job Runs every 5 minutes 
&lt;li&gt;
Job Runs a standard T-SQL Stored Procedure 
&lt;li&gt;
Stored Procedure makes use of Oracle Linked Server (full 4 part naming and Open query
used) 
&lt;li&gt;
Oracle goes down for scheduled maintenance 
&lt;li&gt;
SQL DBA's forget to stop job 
&lt;li&gt;
Job pages on-call (me) 
&lt;li&gt;
Disable job until Oracle maintenance complete 
&lt;li&gt;
Oracle maintenance complete. 
&lt;li&gt;
Connectivity of linked server verified 
&lt;li&gt;
Re-enable job 
&lt;li&gt;
JOB Fails ! 
&lt;li&gt;
T-SQL Stored procedure runs from SSMS fine, but won't run as a job&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
Here is the poorly configured sql agent.&amp;nbsp; 1st off the job output file is set
to over-write, so know as I write this I can't quote the exact error, 2nd the system
was set at the default job history retention, so I can't go into the job history to
grab the error either.
&lt;/p&gt;
&lt;p&gt;
Basically the error was something about reading a row from sysoledbservers or something.
&lt;/p&gt;
&lt;p&gt;
The solution was to Stop and Start SQLAgent; now why SQLAgent, running tsql using
a linked server would not work, when the sqm tsql would run just fine from SSMS is
beyond me, which is why I wish i had the exact error, as I was going to call pss support,
which i didn't do at 1am in the morning. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.lifeasbob.com/aggbug.ashx?id=ebb3a6a0-fd3f-4e92-be72-eb09c2a59ef9" /&gt;</description>
      <comments>http://www.lifeasbob.com/CommentView,guid,ebb3a6a0-fd3f-4e92-be72-eb09c2a59ef9.aspx</comments>
      <category>SQL Server / Linked Server</category>
    </item>
  </channel>
</rss>