Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

What would be best way to change datatype given slow Oracle Linked Server situation Expand / Collapse
Author
Message
Posted Wednesday, November 13, 2013 11:37 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, February 13, 2014 12:31 PM
Points: 108, Visits: 305
Working: Oracle Linked Server - however due to the extremely slow VPN, it took a couple of minutes for each table (or select) to respond.
Working: Stored Procedures - Each early morning (and over lunch) the Oracle Linked Server tables MakeTable for local SQL Server Tables
SP example: SELECT * INTO [NV_SIDETRACK] FROM [PNAV2.RESOURCES.COM]..[NAV_DBA].[NV_SIDETRACK]
Use: MS Access uses DSNLess Linked Tables to SQL Server tables for application use.

Problem: All of the Oracle Linked Tables for MakeTable end up converting numeric type to MEMO
For example: the Primary Key (1234567) on the SQL Server table is a data type memo
Lets take into account, the VPN is very slow and I am a newbie.

Question: How should I proceed and can you offer some hints for coding?
1. the data types be converted during the Make Table from the Oracle Linked Server?
2. the data types be converted in some kind of a View? (Access can link to a view, it is all read-only anyway).
3. a SP update the memo fields to numeric in the same SQL table (in place).
4. A SP take the SQL table, make a new table and convert it in the process.

My SQL Server is dedicated and has huge resources.
Post #1514008
Posted Wednesday, November 13, 2013 12:51 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, February 13, 2014 12:31 PM
Points: 108, Visits: 305
Am I on the right track?
Started designing a View (MS Access can link to a view). The Oracle data is Read-Only.
The Oracle data residing in SQL Server will be where the View is run from.
Tried this and it looks promising:
SELECT TOP 1000 (CAST( [Audit_ID] as varchar(5) ) ) as Audit_ID
,[TAXPAYER_NAME]
,[DIVISION_ID]
,[STATE_ABBRV]
,[STATE_NAME]
,[COUNTY_NAME]

My reading indicates that CAST can only be used on fields with no Nulls or no Non-Numeric values.
A PK is a good candidate for CAST
Post #1514038
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse