Select to view content in your preferred language

How to run multiple SDE services/intances?

1760
16
07-05-2010 03:32 AM
VaL
by
Occasional Contributor
Hi all
could someone point me to the direction of this article on how to run multiple SDE service.
What I need to do is to have 3 Oracle 10g database and to have 3 SDE instances, each pointing to separate oracle DB.
Running 9.3.1 SDE 64bit/Oracle 10g 64 on win2008.
Any advice welcome.
0 Kudos
16 Replies
ForrestJones
Esri Contributor
Hi all,

For the case where you'd like to use the same SDEHOME for all your sde services, would you be able to try the following, please?

For each service (after created), run the sdeservice command to specify the NET_SERVICE_NAME to be used for the particular service:

C:\>sdeservice -o modify -i sde_service1 -r NET_SERVICE_NAME -v <TNSENTRY_NAME>


That might do the trick.

see the sdeservice -o modify help for more info:

sdeservice -h

...
...
-r    Registers/Unregisters/Modify following windows registry keywords:
      SDEHOME                              ArcSDE software location.
      SDE_DBA_PASSWORD                     ArcSDE DBA password.
      SDE_DBA_USER     (SQLSERVER only)    ArcSDE DBA user.
      ADMIN_DATABASE   (DB2/INFORMIX/SQLSERVER/POSTGRESQL only)
                        ArcSDE admin database.
      NLS_LANG         (ORACLE only)       ArcSDE server codepage.
      NET_SERVICE_NAME (ORACLE only)       Oracle TWO_TASK or
                                           LOCAL environment variable.
...
...
0 Kudos
TimDine
Frequent Contributor
Is it possible to do this with:
Multiple SDE Services
One SDEHOME
Remote Databases

It seems that the only method I can find that will satisfy the multiple SDE Services and the remote database requirements is the multiple SDEHOME directories.
0 Kudos
ForrestJones
Esri Contributor
Is it possible to do this with:
Multiple SDE Services
One SDEHOME
Remote Databases

It seems that the only method I can find that will satisfy the multiple SDE Services and the remote database requirements is the multiple SDEHOME directories.


Hi timdine,

Yes. It should work if you follow the steps here:

http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Using_multiple_geodatabases_in_Oracle&...

and then also specify the NET_SERVICE_NAME to be used for each particular service.

This can be done using the sdeservice command or by setting LOCAL=<TNSNAME> in the dbinit files (LOCAL for windows, TWO_TASK for unix).

If that is not working for you, what error(s) are you encountering?
0 Kudos
VinceAngelo
Esri Esteemed Contributor
Back in the days of 100Mb disks, I had to do ugly things with symbolic links to run multiple copies
of SDE from a single SDEHOME (faking multiple SDEHOMEs to save disk space).

Now that ArcSDE supports multiple Oracle instances fom a single SDEHOME, I wouldn't consider
using that feature if I was running under 15-20 instances.  Instead I copy the ora*exe directory
to D:\ESRI with the instance in the folder name (e.g. D:\ESRI\sdeexe931sp1_prod), open a
command window, set the SDEHOME and PATH to use %SDEOME%\bin, establish the correct
ORACLE_SID/LOCAL, and run 'sdeservice' manually.  This way, when it's time to upgrade, I can
apply the SP to the base install without corrupting my instances, and upgrade them each over
time.  The way I see it, the space savings on a 200-500Gb disk just aren't worth the dependencies
caused by using a single SDEHOME for multiple instances.

- V
0 Kudos
TimDine
Frequent Contributor
Hi timdine,

Yes. It should work if you follow the steps here:

http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Using_multiple_geodatabases_in_Oracle&...

and then also specify the NET_SERVICE_NAME to be used for each particular service.

This can be done using the sdeservice command or by setting LOCAL=<TNSNAME> in the dbinit files (LOCAL for windows, TWO_TASK for unix).

If that is not working for you, what error(s) are you encountering?


I've used those instructions and tried to follow them very closely, it's possible I've got something slightly off though.  Everything works great except for the creating my windows service.  I can direct connect without issue.  If I use the post install wizard it fails unable to connect to my database as it doesn't let me connect to a remote database through the wizard noted http://resources.arcgis.com/content/kbase?fa=articleShow&d=23753  I can get one of my services running connected to my remoted if I use the sdeservice command instead to create the sercice, to modify the NET_MANAGER_NAME equal to LOCAL, AND modify the dbinit.sde file to include "set LOCAL=<oracleInstanceName>".  If I use sdeservice though it overwrites the dbinit.sde file each time rather than let me specify a unique file for each windows service.  Any ideas?  It isn't the end of the world to have multiple folders, it is just duplication that seem I seem so close to being able to avoid. 

The ability to do independent upgrades on each instance is appealing on it's own and may be enough reason to go that way on it's own.
0 Kudos
TimDine
Frequent Contributor
So the next logical step of the thread is upgrading them.  My multiple services have been working well for a while and we'd like to upgrade.  To do this do the steps below make sense?

Upgrade the base installation with the upgrade application
Stop the service I would like to upgrade
Use the sdesetup command in the base installation directory to upgrade one of the geodatabases
Replace the contents of the SDEHOME associated with the database I just upgraded with upgraded base installation except for the files unique to the service (dbinit, etc.)

Do these steps make sense?  Do I need to recreate the sde services as well?
0 Kudos
VinceAngelo
Esri Esteemed Contributor
I prefer to use the service SDEHOME for the actual upgrade (so the logs stay
with the instance), but other than that, you've pretty much nailed it.

Different sites have different situations, but If I'm retaining the custom SDEHOME path
(vice tweaking the name to include the SPn), then I'll:
+ stop the service
+ rename the custom SDEHOME
+ copy the installation to the service SDEHOME path
+ copy the etc directory contents from the old SDEHOME
+ manually set SDEHOME to the new directory in old name
+ prepend %SDEHOME%\bin to the PATH
+ set the ORACLE_SID/LOCAL variable
+ grant the necessary privs (or DBA) to SDE
+ execute 'sdesetup -o upgrade' (or, at 10.x, the Catalog/Python equivalent)
+ revoke the unnecessary privs from SDE
+ restart the service
+ if all has gone well, either zip and burn the old directory(ies) to CD-ROM, or
just delete the old directory

If I chose to rename the service directory, I delete the service after stop and recreate
it before start (renaming the directory is the only reason to drop the service).

- V
0 Kudos