|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Sunday, September 16, 2012 3:26 AM
Points: 1,038,
Visits: 443
|
|
kkam, you are correct. Hmmm - I thought I had done so before but obviously not... Perhaps I was using a UDF of some sort as the source. In any case, you could still use a #temp table rather than a ##temp table. The scope is limited to the DB connection rather than the current SQL block but it's still not global.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 10:35 AM
Points: 15,
Visits: 166
|
|
That would probably work. However, I am not sure what happens if the SP were called again before the first call could finish executing. This SP is called from a web page and my concern is that before the contents of the table could be cleared after we are done processing the request, the SP could be called again. Is that a valid concern or am I off in my understanding of SP execution within SQL server? Thanks again
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Sunday, September 16, 2012 3:26 AM
Points: 1,038,
Visits: 443
|
|
The temporary tables prefixed with a single # are scoped within a single database connection. Thus if you have 10 hits on your website then you might have 10 concurrent database connections (being simple here - no pooling or other voodoo ). Each connection can have its own temp table. Thus the use of temp tables within the stored proc should not cause any problem. A global temporary table (prefix ##) IS shared - much like a standard fixed table in the database.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 10:35 AM
Points: 15,
Visits: 166
|
|
Thanks! That narrows down the wires that were crossed for me. I won't have a chance to test it for at least a few days but I'll keep you posted. Thanks again!
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Wednesday, February 20, 2013 2:23 PM
Points: 254,
Visits: 131
|
|
Nice article and with SQL Server and Oracle, it comes back into focus every couple of years. I am experiencing a problem today that is supposed to be with a date/timestamp; but, there isn't one in my query. This isn't an oddball case, it is happening regularly with a linked server from SS 2005 to Oracle10g.
The query is as follows:
SELECT [QUEUE] FROM [EMREP]..[SYSMAN].[AQ$MGMT_LOADER_QTABLE]
The error message is as follows:
Msg 7354, Level 16, State 1, Line 1 The OLE DB provider "OraOLEDB.Oracle" for linked server "EMREP" supplied invalid metadata for column "DELAY_TIMESTAMP". The data type is not supported.
Anybody have a clue?
(I will post in forum tomorrow)
Thanks!
Thanks,
David Russell Oracle Since 1982 SQL Server Since 1998
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 5:01 AM
Points: 4,815,
Visits: 1,343
|
|
Good article. The problems were well discussed.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 12:36 AM
Points: 2,547,
Visits: 3,648
|
|
Good Article and Good Topic. I also stumbeled accross the oracle timestamp issue and used TO_CHAR as well to get around it.
Btw, here is some information regarding the deprecated timestamp datatype and its replacement "rowversion" in SQL Server 2008. http://msdn.microsoft.com/en-us/library/ms182776(SQL.100).aspx
Best Regards,
Chris Büttner
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, June 11, 2013 11:13 AM
Points: 85,
Visits: 118
|
|
| Your article referred to timestamps but I've had the same problem with date fields in Oracle and had to do the same thing you suggested and convert them to character data to make it work.
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Wednesday, January 02, 2013 12:15 PM
Points: 1,443,
Visits: 711
|
|
| Excellent article. I've found it's a crapshoot getting things to work w/ oracle reliably from SQL server.....
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Yesterday @ 5:08 PM
Points: 258,
Visits: 2,423
|
|
What a timely article for me. I recently found out that I might have to do some queries/reports off of another agency's Oracle database. I've only worked with MS database products and Sybase. I don't know anything about Oracle. Any advice or "gotchas" people have on doing queries off of Oracle would be appreciated.
Thanks, - JJ
|
|
|
|