By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,574 Members | 1,977 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,574 IT Pros & Developers. It's quick & easy.

Linked Server Time Difference

P: n/a
I am using SQL 2000 and/or SQL 2005 to link to an Oracle Db using
OPENQUERY.
The SQL 2000 box is SP4 on Win2000.

I can run a query thru Q.A. for SQL 2000 or I can run an Oracle query
thru SQL-Plus to see the data. But, if I run a date-query using the
linked server then SQL Server returns a TIME that is off by 4 hours.

SQL Query:
SELECT * FROM OPENQUERY( ORASERVER, 'SELECT MYDATE FROM MYTABLE')

Oracle Query:
'SELECT MYDATE FROM MYTABLE'

Oracle results:
04/16/2006 01:07:00

SQL 2000 result:
04/16/2006 05:07:00

Has anyone seen this before? Is there a fix?
I have searched the newsgroups and MS Kb but can not find an answer.

Thanks,
Marty

May 31 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

MartyP wrote:
I am using SQL 2000 and/or SQL 2005 to link to an Oracle Db using
OPENQUERY.
The SQL 2000 box is SP4 on Win2000.

I can run a query thru Q.A. for SQL 2000 or I can run an Oracle query
thru SQL-Plus to see the data. But, if I run a date-query using the
linked server then SQL Server returns a TIME that is off by 4 hours.

SQL Query:
SELECT * FROM OPENQUERY( ORASERVER, 'SELECT MYDATE FROM MYTABLE')

Oracle Query:
'SELECT MYDATE FROM MYTABLE'

Oracle results:
04/16/2006 01:07:00

SQL 2000 result:
04/16/2006 05:07:00

Has anyone seen this before? Is there a fix?
I have searched the newsgroups and MS Kb but can not find an answer.

Thanks,
Marty


I have never seen this problem, but could you verify that the Oracle
mydate column datatype is a defined as DATE or as a TIMESTAMP? If it
is a timestamp is it a timestamp with timezone by any chance?

HTH -- Mark D Powell --

May 31 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.