July 14, 2012 at 3:59 pm
I need to get a record count from an Oracle Table and store the values in a log table before and after the load (OLE DB).
I need to do this without assigning a Linked Server.
Any ideas would be greatly appreciated?
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 14, 2012 at 5:35 pm
Welsh Corgi (7/14/2012)
I need to get a record count from an Oracle Table and store the values in a log table before and after the load (OLE DB).I need to do this without assigning a Linked Server.
If the "log" table is sitting on the Oracle database then SQLPlus can do it, SQLPlus query can be wrapped in a job.
On the other hand, if "log" table is sitting on SQL Server side then I do not know how to do it if specifications forbid the use of a Linked Server.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.July 14, 2012 at 6:12 pm
Paul,
I need to do it within an SSIS Package.
I could truncate a table and insert the count into table but that is Kinda silly.
So it looks like I need to do an OPENROWSET or an OPENQUERY with a Linked Server.
Thanks for replying.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 15, 2012 at 6:49 am
I could truncate a table and insert the count into table but that is Kinda silly.
What about an UPDATE?
UPDATE Table_Name
SET Column_Name = Column_Name -- fake update
WHERE 1 = 1 -- Optional, always true predicate
Then a row count...
July 15, 2012 at 9:15 am
Dev (7/15/2012)
I could truncate a table and insert the count into table but that is Kinda silly.
What about an UPDATE?
UPDATE Table_Name
SET Column_Name = Column_Name -- fake update
WHERE 1 = 1 -- Optional, always true predicate
Then a row count...
Maybe I'm missing something but I need a ROWCOUNT on Oracle Tables?
I'm installing the 64 bit Oracle Client and I'm hoping that that installs the ODBC Drivers so that I can define a linked Server.
I did not want to use OPENQUERY because it is so slow, etc.
Thanks for responding.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
July 15, 2012 at 11:11 am
I was able to setup the Linked Server to Oracle so I would consider this post closed.
Thanks for all of the input.:-)
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy