Sie sind auf Seite 1von 6

4/15/2015

Document562509.1

HowtoConfigureDG4MSQL(OracleDatabaseGatewayforMSSQLServer)64bitUnix
OS(Linux,Solaris,AIX,HPUX)postinstall(DocID562509.1)
InthisDocument
Goal
Solution

HowtoSetupDG4MSQL(OracleDatabaseGatewayforMSSQLServer)on64bitUnixoperatingsystemslike
SparcSolaris,AIX,HPUXRISC,HPUXItaniumandLinuxx8664bit

References

APPLIESTO:
OracleDatabaseGatewayforSQLServerVersion11.1.0.6to12.1.0.1[Release11.1to12.1]
IBMAIXonPOWERSystems(64bit)
HPUXPARISC(64bit)
OracleSolarisonSPARC(64bit)
HPUXItanium
Linuxx8664
OracleTransparentGatewayforMicrosoftSQLServerVersion:11.1.0.6to12.1.0.1

GOAL
Startingwith11gOraclenowprovidesaDatabaseGatewayforMSSQLServerfor64bitUnixoperatingsystems.
ThegatewayiscertifiedwithOracledatabaserelease10.1.0.5,10.2.0.3afterapplyingthegatewaycompatibility
patchbug<>oryoucandirectlyuseitwithOracleRDBMS10.2.0.4,10.2.0.5,11.1and11.2.

Itmightworkwith9.2.0.8afterapplyingpatchbug<>butthere'snoguaranteeasthe11.2gatewaywasnever
officiallycertifiedwith9.2.0.8Oracledatabaserelease.

SOLUTION
HowtoSetupDG4MSQL(OracleDatabaseGatewayforMSSQLServer)on64bitUnixoperating
systemslikeSparcSolaris,AIX,HPUXRISC,HPUXItaniumandLinuxx8664bit
SIDENOTE:HPUXRISCDG4MSQLis32bitandinsteadoftheLD_LIBRARY_PATHtheSHLIB_PATHsettingis
requires.
TheOracleDatabaseGatewayforMSSQLServerforLinuxplatformscomesonaseparateCD.Itcanbeinstalled
intoanexisting11gdatabaseOracle_Home(pleasepayattentionthatiftheOracle_Homecontainsanalready
patchedreleaseofthedatabasethenyouMUSTapplythispatchsetagain.Thereasonforthisisthatthegateway
installationmightoverwritealreadypatchedlibrarieswiththebaseversionasdeliveredontheCD.Togetaproper
environmentagainanalreadyappliedpatchsetneedstobereapplied).

Aftertheinstallationthefollowingitemsmustbeconfigured:
1)listener(intheORACLE_HOMEwherethegatewaysoftwareisinstalled)
2)tnsnames(intheORACLE_HOMEwheretheOracledatabasesoftwareisinstalled)
3)init<SID>.oraofthehssubsystem(intheORACLE_HOMEwherethegatewaysoftwareisinstalled)
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrlstate=h6ix9gjz7_295&id=562509.1

1/6

4/15/2015

Document562509.1

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.orafiletoavoidanyconflictswithalready
existingODBCdrivermanagers.
TheLD_LIBRARY_PATHmustcontainthefullqualifiedpathtothe$ORACLE_HOME/liband
$ORACLE_HOME/dg4msql/driver/libdirectory.PleasedoNOTuse$ORACLE_HOMEvariableintheENVpath.
ATTENTION:
1.InstallingonHPUXRISCplatformpleasesetSHLIB_PATHinsteadofLD_LIBRARY_PATHasthegatewayonHP
UXRISCisstill32bitandthusrequirestheSHLIB_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=<hostnameoftheOracleGatewayServer>)(PORT=
1511))
)
)
)

SIDENOTE:Ifyouhavetochangethenameofthelistenerasthere'salreadyalistenerwiththatname
activeinyourenvironment,pleasemakesuretohavethesamenameinfortheaddressandSIDsection.
Oncethelistener.oraischanged,thelistenermustbestoppedandstartedtotakeraffect!

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

2/6

4/15/2015

Document562509.1

2)Thetnsnames.oraneedsanentryfortheDG4MSQLalias:

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

Thedomainofthetnsaliascandifferfromtheoneusedabove(de.oracle.com),dependingontheparameterin
thesqlnet.ora:
NAMES.DEFAULT_DOMAIN=de.oracle.com
Buttheimportantentryisthe(HS=OK)keyword.(HS=)isalsoavalidentry,butDBCAandNetCAwillonly
recognize(HS=OK)entriesandremoveany(HS=)entries.
Afteraddingthetnsnamesaliasandrestartingthelistener,a
connectivitycheckistousetnsping<alias>.
tnspingdg4msql

shouldcomebackwithasuccessfulmessage.

3)init.oraofthegateway:
TherearesomerestrictionshowtonametheSID(describedintheNetAdministratorsGuideindetail).
Atthisplaceonlyashortnote:don'tusedotsintheSIDandkeepitshort!
TheSIDisalsorelevantfortheinitialiastionfileofthegateway.Thenameofthe
fileisinit<SID>.ora.Inthisexampleitiscalledinitdg4msql.ora.
Thefileislocatedat$ORACLE_HOME/dg4msql/admin.
Itshouldcontainatleasttheconnectdetails:

#
HS_FDS_CONNECT_INFO=<SQLServer>:<port>//<database>
#alternateconnectformatishostname/serverinstance/databasename

ShortexplanationoftheparameterHS_FDS_CONNECT_INFO:
ItcanbeconfiguredtouseaSQLServerport#ortoworkwithinstances:
HS_FDS_CONNECT_INFO=<SQLServer>:<port>//<database>
HS_FDS_CONNECT_INFO=<SQLServer>/<instance>/<database>

<SQLServer>isthehostnamewheretheSQLServerresides
<port>istheportnumberoftheSQLServer(defaultis1433)
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrlstate=h6ix9gjz7_295&id=562509.1

3/6

4/15/2015

Document562509.1

<instance>isthenameofadedicatedinstanceyouwanttoconnecttoleaveitblankifyourSQLServersetupdoes
notuseSQLServerinstances(whenusinganamedinstance,pleasemakesurethe"SQLBrowserService"is
startedontheMicrosoftSQLServermachine)
<database>isthenameofthedatabaseDG4MSQLshouldconnecttoforexampleNorthwind

Example:
ToconnecttoaNorthwinddatabaseonaSQLServer(w2k3)withIPAddress192.168.0.1usingthedefault
instanceyoucanuse:

HS_FDS_CONNECT_INFO=x2kx.de.oracle.com:1433//Northwind
or
HS_FDS_CONNECT_INFO=192.168.0.1:1433//Northwind
ToconnecttoaSQLServer2k5namedinstancemsql2k5onthismachinelisteningonport4025eitheruse:
HS_FDS_CONNECT_INFO=x2kx.de.oracle.com:4025//Northwind
or
HS_FDS_CONNECT_INFO=192.168.2.1:4025//Northwind
or
HS_FDS_CONNECT_INFO=x2kx.de.oracle.com/MSQL2k5/Northwind
or
HS_FDS_CONNECT_INFO=192.168.2.1/MSQL2k5/Northwind

SIDENOTE:
TofindthenameofaSQLserverinstance,checkouttheregistrykeyontheSQLServer:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MicrosoftSQLServer\InstanceNames
WhenusingHS_FDS_CONNECT_INFO=<SQLServer>/<instance>/<database>andconnectionsofthegatewayfail
althoughusingportandhostconnectionsareworking,thenmakesureonteSQLServermachinethe"SQLServer
Browser"servicewhichprovidesSQLServerconnectioninformationtoclientcomputersisstarted.
Whenconnectionsusingthenamedinstanceconnectmethodcontinuetofail(evenwiththe"SQLBrowserService"
beingstartedoptionofusingtheportnumberisasuitableworkaround.
YoucanfindtheportnumberbyaccessingSQLServer'sServerNetworkUtilityprogram,choosingtheInstanceyou
wanttoconnectto,highlightingtcp/ipunderEnabledProtocols,andclickingthePropertiesbutton.Awindowshould
openwiththeportnumberthattheinstanceislisteningon.
4)ConfiguringtheOracledatabase
Theonlythingthatmustbedonehereistocreateadatabaselink:
connectwiththeusername/passwordthathassufficientrightstocreatea
databaselink(i.e.system).
Thesyntaxis:

create[public]databaselink<name>
connectto<UID>identifiedby<pwd>using'<tnsalias>'

Inotherwords,toconnecttotheMSSQLServerconfiguredinthelaststeps,
thesyntaxmustbe:
CREATEDATABASELINKsqlserver
CONNECTTO"sa"IDENTIFIEDBY"sa"USING'dg4msql'
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrlstate=h6ix9gjz7_295&id=562509.1

4/6

4/15/2015

Document562509.1

Thedblinknameissqlserver.Usernameandpasswordmustbeindoublequotes,
becausetheusernameandpasswordarecasesensitiveinSQLServer.'dg4msql'pointsto
thealiasinthetnsnames.orafilethatcallstheHSsubsystem.
Ifeverythingisconfiguredwell,aselectofaSQLServertableshouldbesuccessful:
select*from"systables"@sqlserver
...
Sidenote:ThesystablestablenameattheMSSQLServerisinsmallletters.AstheMSSQLServeriscasesensitive
thistablenamemustbesurroundedbydoublequotes.

WouldyouliketoexplorethistopicfurtherwithotherOracleCustomers,OracleEmployees,and
IndustryExperts?
Clickheretojointhediscussionwhereyoucanaskquestions,gethelpfromothers,andshareyourexperiences
withthisspecificarticle.
DiscoverdiscussionsaboutotherarticlesandhelpfulsubjectsbyclickingheretoaccessthemainMyOracle
SupportCommunitypageforDatabaseGateways.

ThisistheactualGatewayMOSCommunitythreadtodiscussthisnote.Itisnotascreenshotandtojointhe
discussionclickon'Reply'inanyofthethreads

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

5/6

4/15/2015

Document562509.1

REFERENCES
NOTE:1083703.1MasterNoteforOracleGatewayProducts

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

6/6