How to Configure DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris,...

Post on 12-Nov-2015

246 views 2 download

Transcript of How to Configure DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris,...

  • 4/15/2015 Document562509.1

    https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrlstate=h6ix9gjz7_295&id=562509.1 1/6

    HowtoConfigureDG4MSQL(OracleDatabaseGatewayforMSSQLServer)64bitUnixOS(Linux,Solaris,AIX,HPUX)postinstall(DocID562509.1)

    InthisDocument

    GoalSolution

    HowtoSetupDG4MSQL(OracleDatabaseGatewayforMSSQLServer)on64bitUnixoperatingsystemslikeSparcSolaris,AIX,HPUXRISC,HPUXItaniumandLinuxx8664bitReferences

    APPLIESTO:

    OracleDatabaseGatewayforSQLServerVersion11.1.0.6to12.1.0.1[Release11.1to12.1]IBMAIXonPOWERSystems(64bit)HPUXPARISC(64bit)OracleSolarisonSPARC(64bit)HPUXItaniumLinuxx8664OracleTransparentGatewayforMicrosoftSQLServerVersion:11.1.0.6to12.1.0.1

    GOAL

    Startingwith11gOraclenowprovidesaDatabaseGatewayforMSSQLServerfor64bitUnixoperatingsystems.

    ThegatewayiscertifiedwithOracledatabaserelease10.1.0.5,10.2.0.3afterapplyingthegatewaycompatibilitypatchbugoryoucandirectlyuseitwithOracleRDBMS10.2.0.4,10.2.0.5,11.1and11.2.

    Itmightworkwith9.2.0.8afterapplyingpatchbugbutthere'snoguaranteeasthe11.2gatewaywasneverofficiallycertifiedwith9.2.0.8Oracledatabaserelease.

    SOLUTION

    HowtoSetupDG4MSQL(OracleDatabaseGatewayforMSSQLServer)on64bitUnixoperatingsystemslikeSparcSolaris,AIX,HPUXRISC,HPUXItaniumandLinuxx8664bit

    SIDENOTE:HPUXRISCDG4MSQLis32bitandinsteadoftheLD_LIBRARY_PATHtheSHLIB_PATHsettingisrequires.

    TheOracleDatabaseGatewayforMSSQLServerforLinuxplatformscomesonaseparateCD.Itcanbeinstalledintoanexisting11gdatabaseOracle_Home(pleasepayattentionthatiftheOracle_HomecontainsanalreadypatchedreleaseofthedatabasethenyouMUSTapplythispatchsetagain.ThereasonforthisisthatthegatewayinstallationmightoverwritealreadypatchedlibrarieswiththebaseversionasdeliveredontheCD.Togetaproperenvironmentagainanalreadyappliedpatchsetneedstobereapplied).

    Aftertheinstallationthefollowingitemsmustbeconfigured:

    1)listener(intheORACLE_HOMEwherethegatewaysoftwareisinstalled)2)tnsnames(intheORACLE_HOMEwheretheOracledatabasesoftwareisinstalled)3)init.oraofthehssubsystem(intheORACLE_HOMEwherethegatewaysoftwareisinstalled)

  • 4/15/2015 Document562509.1

    https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrlstate=h6ix9gjz7_295&id=562509.1 2/6

    4)Oracledatabase

    1)ThelistenerneedsanewSIDentrylikethefollowing:

    (SID_NAME=dg4msql)(ORACLE_HOME=/home/oracle/oracle/product/11.1)(ENV="LD_LIBRARY_PATH=/home/oracle/product/11.1/dg4msql/driver/lib:/home/oracle/product/11.1/lib")(PROGRAM=dg4msql)

    PleasecorrecttheORACLE_HOMEentryandtheENVentryaccordingtoyourinstallation.WestronglyrecommendtoaddtheLD_LIBARARY_PATHtothelistener.orafiletoavoidanyconflictswithalreadyexistingODBCdrivermanagers.TheLD_LIBRARY_PATHmustcontainthefullqualifiedpathtothe$ORACLE_HOME/liband$ORACLE_HOME/dg4msql/driver/libdirectory.PleasedoNOTuse$ORACLE_HOMEvariableintheENVpath.

    ATTENTION:1.InstallingonHPUXRISCplatformpleasesetSHLIB_PATHinsteadofLD_LIBRARY_PATHasthegatewayonHPUXRISCisstill32bitandthusrequirestheSHLIB_PATHsetting.

    2.ForAIXplatformspleaseuseLIBPATHinsteadofLD_LIBRARY_PATH.

    Soalistener.orafilewithalistenercalled"LISTENER"listeningonport1511mightlooklike:

    SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=dg4msql)(ORACLE_HOME=/home/oracle/oracle/product/11.1)(ENV="LD_LIBRARY_PATH=/home/oracle/product/11.1/dg4msql/driver/lib:/home/oracle/product/11.1/lib")(PROGRAM=dg4msql)))

    LISTENER=(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1511)))))

    SIDENOTE:Ifyouhavetochangethenameofthelistenerasthere'salreadyalistenerwiththatnameactiveinyourenvironment,pleasemakesuretohavethesamenameinfortheaddressandSIDsection.

    Oncethelistener.oraischanged,thelistenermustbestoppedandstartedtotakeraffect!

  • 4/15/2015 Document562509.1

    https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrlstate=h6ix9gjz7_295&id=562509.1 3/6

    2)Thetnsnames.oraneedsanentryfortheDG4MSQLalias:

    dg4msql.de.oracle.com=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1511))(CONNECT_DATA=(SID=dg4msql))(HS=OK))

    Thedomainofthetnsaliascandifferfromtheoneusedabove(de.oracle.com),dependingontheparameterinthesqlnet.ora:NAMES.DEFAULT_DOMAIN=de.oracle.com

    Buttheimportantentryisthe(HS=OK)keyword.(HS=)isalsoavalidentry,butDBCAandNetCAwillonlyrecognize(HS=OK)entriesandremoveany(HS=)entries.

    Afteraddingthetnsnamesaliasandrestartingthelistener,aconnectivitycheckistousetnsping.

    tnspingdg4msql

    shouldcomebackwithasuccessfulmessage.

    3)init.oraofthegateway:

    TherearesomerestrictionshowtonametheSID(describedintheNetAdministratorsGuideindetail).Atthisplaceonlyashortnote:don'tusedotsintheSIDandkeepitshort!

    TheSIDisalsorelevantfortheinitialiastionfileofthegateway.Thenameofthefileisinit.ora.Inthisexampleitiscalledinitdg4msql.ora.Thefileislocatedat$ORACLE_HOME/dg4msql/admin.Itshouldcontainatleasttheconnectdetails:

    #HS_FDS_CONNECT_INFO=://#alternateconnectformatishostname/serverinstance/databasename

    ShortexplanationoftheparameterHS_FDS_CONNECT_INFO:ItcanbeconfiguredtouseaSQLServerport#ortoworkwithinstances:

    HS_FDS_CONNECT_INFO=://HS_FDS_CONNECT_INFO=//

    isthehostnamewheretheSQLServerresidesistheportnumberoftheSQLServer(defaultis1433)

  • 4/15/2015 Document562509.1

    https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrlstate=h6ix9gjz7_295&id=562509.1 4/6

    isthenameofadedicatedinstanceyouwanttoconnecttoleaveitblankifyourSQLServersetupdoesnotuseSQLServerinstances(whenusinganamedinstance,pleasemakesurethe"SQLBrowserService"isstartedontheMicrosoftSQLServermachine)isthenameofthedatabaseDG4MSQLshouldconnecttoforexampleNorthwind

    Example:ToconnecttoaNorthwinddatabaseonaSQLServer(w2k3)withIPAddress192.168.0.1usingthedefaultinstanceyoucanuse:

    HS_FDS_CONNECT_INFO=x2kx.de.oracle.com:1433//NorthwindorHS_FDS_CONNECT_INFO=192.168.0.1:1433//Northwind

    ToconnecttoaSQLServer2k5namedinstancemsql2k5onthismachinelisteningonport4025eitheruse:

    HS_FDS_CONNECT_INFO=x2kx.de.oracle.com:4025//NorthwindorHS_FDS_CONNECT_INFO=192.168.2.1:4025//NorthwindorHS_FDS_CONNECT_INFO=x2kx.de.oracle.com/MSQL2k5/NorthwindorHS_FDS_CONNECT_INFO=192.168.2.1/MSQL2k5/Northwind

    SIDENOTE:TofindthenameofaSQLserverinstance,checkouttheregistrykeyontheSQLServer:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MicrosoftSQLServer\InstanceNamesWhenusingHS_FDS_CONNECT_INFO=//andconnectionsofthegatewayfailalthoughusingportandhostconnectionsareworking,thenmakesureonteSQLServermachinethe"SQLServerBrowser"servicewhichprovidesSQLServerconnectioninformationtoclientcomputersisstarted.Whenconnectionsusingthenamedinstanceconnectmethodcontinuetofail(evenwiththe"SQLBrowserService"beingstartedoptionofusingtheportnumberisasuitableworkaround.YoucanfindtheportnumberbyaccessingSQLServer'sServerNetworkUtilityprogram,choosingtheInstanceyouwanttoconnectto,highlightingtcp/ipunderEnabledProtocols,andclickingthePropertiesbutton.Awindowshouldopenwiththeportnumberthattheinstanceislisteningon.

    4)ConfiguringtheOracledatabase

    Theonlythingthatmustbedonehereistocreateadatabaselink:connectwiththeusername/passwordthathassufficientrightstocreateadatabaselink(i.e.system).Thesyntaxis:

    create[public]databaselinkconnecttoidentifiedbyusing''

    Inotherwords,toconnecttotheMSSQLServerconfiguredinthelaststeps,thesyntaxmustbe:

    CREATEDATABASELINKsqlserverCONNECTTO"sa"IDENTIFIEDBY"sa"USING'dg4msql'

  • 4/15/2015 Document562509.1

    https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrlstate=h6ix9gjz7_295&id=562509.1 5/6

    Thedblinknameissqlserver.Usernameandpasswordmustbeindoublequotes,becausetheusernameandpasswordarecasesensitiveinSQLServer.'dg4msql'pointstothealiasinthetnsnames.orafilethatcallstheHSsubsystem.

    Ifeverythingisconfiguredwell,aselectofaSQLServertableshouldbesuccessful:

    select*from"systables"@sqlserver...

    Sidenote:ThesystablestablenameattheMSSQLServerisinsmallletters.AstheMSSQLServeriscasesensitivethistablenamemustbesurroundedbydoublequotes.

    WouldyouliketoexplorethistopicfurtherwithotherOracleCustomers,OracleEmployees,andIndustryExperts?

    Clickheretojointhediscussionwhereyoucanaskquestions,gethelpfromothers,andshareyourexperienceswiththisspecificarticle.DiscoverdiscussionsaboutotherarticlesandhelpfulsubjectsbyclickingheretoaccessthemainMyOracleSupportCommunitypageforDatabaseGateways.

    ThisistheactualGatewayMOSCommunitythreadtodiscussthisnote.Itisnotascreenshotandtojointhediscussionclickon'Reply'inanyofthethreads

  • 4/15/2015 Document562509.1

    https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrlstate=h6ix9gjz7_295&id=562509.1 6/6

    REFERENCES

    NOTE:1083703.1MasterNoteforOracleGatewayProducts