<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.esri.com/Dev/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Geoprocessing : ArcSDE</title><link>http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/ArcSDE/default.aspx</link><description>Tags: ArcSDE</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Debug Build: 61120.2)</generator><item><title>Send us your feedback</title><link>http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2009/03/25/Send-us-your-feedback.aspx</link><pubDate>Wed, 25 Mar 2009 23:47:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:2779</guid><dc:creator>dmhoneycutt</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.esri.com/Dev/blogs/geoprocessing/comments/2779.aspx</comments><wfw:commentRss>http://blogs.esri.com/Dev/blogs/geoprocessing/commentrss.aspx?PostID=2779</wfw:commentRss><description>&lt;p&gt;You may not have noticed, but you can send us feedback about this site. There's
a feedback link at the bottom right of the home page, as illustrated at the bottom 
of this post.&lt;/p&gt;


&lt;p&gt;We're particularly interested in hearing from you about blog post topics
you'd like to see and suggestions on how we could make this site more useful.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.esri.com/Dev/photos/geoprocessing/picture2780.aspx" target="_blank"&gt;&lt;img src="http://blogs.esri.com/Dev/photos/geoprocessing/images/2780/408x480.aspx" border="0"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=2779" width="1" height="1"&gt;</description><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/beginner/default.aspx">beginner</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/advanced/default.aspx">advanced</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/New+at+9.3/default.aspx">New at 9.3</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/Spatial+Analysis/default.aspx">Spatial Analysis</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/script+tools/default.aspx">script tools</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/Python/default.aspx">Python</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/ArcSDE/default.aspx">ArcSDE</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/Geostatistical+Analyst/default.aspx">Geostatistical Analyst</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/Digging+deeper/default.aspx">Digging deeper</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/Tips+and+tricks/default.aspx">Tips and tricks</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/UNIX_2F00_Linux/default.aspx">UNIX/Linux</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/3D+Lidar+Point+Data/default.aspx">3D Lidar Point Data</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/ModelBuilder/default.aspx">ModelBuilder</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/2009+Developers+Summit/default.aspx">2009 Developers Summit</category></item><item><title>Tips and Tricks - Creating ArcSDE connection files on the fly using Python and ArcObjects</title><link>http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2008/09/24/Tips-and-Tricks-_2D00_-Creating-ArcSDE-connection-files-on-the-fly-using-Python-and-ArcObjects.aspx</link><pubDate>Wed, 24 Sep 2008 22:57:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:2620</guid><dc:creator>dmhoneycutt</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.esri.com/Dev/blogs/geoprocessing/comments/2620.aspx</comments><wfw:commentRss>http://blogs.esri.com/Dev/blogs/geoprocessing/commentrss.aspx?PostID=2620</wfw:commentRss><description>&lt;p&gt;ArcGIS 9.3 does not provide a geoprocessing tool for creating ArcSDE 
connection files (.sde files).   Some of you have requested such a tool for security 
reasons - typically because you do not want .sde connection files hanging 
around on machines.  Rather, you want to automatically create a connection file 
in a temporary location, use it in your script or model, and then delete it 
within the process you are running.  Others need the ability to create .sde files 
on the fly because the connection properties, such as what version to connect to, 
are not known at the start of the process.  Having to stop the process for someone 
to manually create the .sde file with the correct properties really isn't an 
option anyone wants to entertain.&lt;/p&gt;

&lt;p&gt;The attached .zip file (&lt;a href="http://resources.esri.com/help/9.3/geoprocessing/zip/SDE_ConnectionFiles.zip"&gt;download .zip file&lt;/a&gt;) contains a java class (CreateSDEConnFile) and a 
python script (CreateSDEConnFile.py) to create
ArcSDE connection files on the fly.  Download and unzip the file.  Be sure to 
unzip the file into a folder that does not contain spaces.  For example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;E:\SDE Conn sample (incorrect - contains spaces)&lt;/font&gt;&lt;br&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;E:\SDEConnectionSample (correct - no spaces)&lt;/font&gt;&lt;br&gt;
&lt;/blockquote&gt;

&lt;h4&gt;Java must be installed&lt;/h4&gt;
&lt;p&gt;You must have Java installed in order to use the files included in the .zip file.  
Most likely, Java is installed on your machine -- it gets installed by many websites.
You can check by examining your installed programs list.  You can install java by
visiting &lt;a href="http://java.com/en/" target="_blank"&gt;java.com&lt;/a&gt;.
&lt;/p&gt;

&lt;h4&gt;Setting JAVA_HOME&lt;/h4&gt;
&lt;p&gt;In order for CreateSDEConnFile.py file to execute, you must have the JAVA_HOME
system environment variable set to the location of the java install directory.&lt;/p&gt;

&lt;p&gt;On Windows XP, right-click "My Computer" on your desktop, click the Advanced tab, and click the
"Environment Variables" button.  If the JAVA_HOME environment variable doesn't exist,
create it by clicking the "New" button.  
(On my machine, &lt;font size="2" face="courier new, courier, mono"&gt;JAVA_HOME = C:\Program Files\Java\jre1.6.0_07&lt;/font&gt;)&lt;/p&gt;

&lt;h4&gt;About CreateSDEConnFile.py Python script&lt;/h4&gt;
&lt;p&gt;
CreateSDEConnFile.py is a sample script.  
You will need to modify it to include details about your ArcSDE configuration and security needs.
There is no associated geoprocessing script tool for CreateSDEConnFile.py -- you will have to
create your own script tool for use in ModelBuilder (See &lt;a href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=An_overview_of_creating_script_tools"&gt;An overview of creating script tools&lt;/a&gt; in the web help for
more information about creating script tools.)
&lt;/p&gt;

&lt;h4&gt;Arguments to the CreateSDEConnFile java class&lt;/h4&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;String sConFileDir = args[0]; //Folder path to store the .sde file.&lt;/font&gt;&lt;br&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;String sConFile = args[1]; //.sde file name. include the .sde extension.&lt;/font&gt;&lt;br&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;pConnProps.setProperty("SERVER", args[2]); //ArcSDE Server name.&lt;/font&gt;&lt;br&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;pConnProps.setProperty("INSTANCE", args[3]); //ArcSDE port number.&lt;/font&gt;&lt;br&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;pConnProps.setProperty("USER", args[4]); //ArcSDE user name.&lt;/font&gt;&lt;br&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;pConnProps.setProperty("PASSWORD", args[5]); //ArcSDE password.&lt;/font&gt;&lt;br&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;pConnProps.setProperty("VERSION", args[6]); //Version to connect to.&lt;/font&gt;&lt;br&gt;
&lt;font size="2" face="courier new, courier, mono"&gt;pConnProps.setProperty("DATABASE", args[7]); //Database to connect to.&lt;/font&gt;&lt;br&gt;
&lt;br&gt;

&lt;h4&gt;zip file&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://resources.esri.com/help/9.3/geoprocessing/zip/SDE_ConnectionFiles.zip"&gt;Download zip file&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=2620" width="1" height="1"&gt;</description><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/advanced/default.aspx">advanced</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/ArcSDE/default.aspx">ArcSDE</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/Tips+and+tricks/default.aspx">Tips and tricks</category></item><item><title>Digging deeper - Troubleshooting geoprocessing errors when using ArcSDE data</title><link>http://blogs.esri.com/Dev/blogs/geoprocessing/archive/2008/09/05/Digging-deeper-_2D00_-Troubleshooting-geoprocessing-errors-when-using-ArcSDE-data.aspx</link><pubDate>Fri, 05 Sep 2008 23:13:00 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:2601</guid><dc:creator>dmhoneycutt</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.esri.com/Dev/blogs/geoprocessing/comments/2601.aspx</comments><wfw:commentRss>http://blogs.esri.com/Dev/blogs/geoprocessing/commentrss.aspx?PostID=2601</wfw:commentRss><description>&lt;p&gt;Geoprocessing error reporting has significantly improved in the ArcGIS 9.3 release.  
All tractable errors now have a unique error code and each error code has 
a detailed explanation in the help system.  See&lt;a href="http://webhelpdev.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Understanding_geoprocessing_tool_errors_and_warnings"&gt; Understanding geoprocessing tool errors and warnings&lt;/a&gt; for more details.
&lt;/p&gt;


&lt;p&gt;However, at this time, geoprocessing errors that occur when reading or writing 
ArcSDE/DBMS data receive a generic 'catch-all' error message, such as error 00210 when writing output:&lt;/p&gt;

&lt;p&gt;&lt;font face="courier new, courier, mono"&gt;ERROR 000210: Cannot create output E:\Infra\ToolData\Connection to ArcSDE.sde\ken.cities&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;  We are working 
hard to improve reporting of ArcSDE/DBMS geoprocessing errors in future service 
packs and releases.  In the meantime, here are some techniques you can use to 
determine the cause of your error.&amp;nbsp; Note that the cause of the error could be anything from not being able to connect 
to ArcSDE to any number of DBMS or network related issues.&lt;/p&gt;

&lt;h3&gt;Test the connection&lt;/h3&gt;

&lt;p&gt;The first thing you should test is whether your ArcSDE/DBMS connection properties 
are correct.  Open ArcCatalog and navigate to the location containing the .sde 
connection file ("E:\Infra\ToolData" in the above example) and double-click the 
connection, causing a connection to be made to the database.  If a connection cannot be made, you'll receive an error message with details on the cause. If you can make a connection, then your connection properties may be invalid.&amp;nbsp; Right-click the connection and select Connection 
Properties.&amp;nbsp; Visually inspect the connection properties.  Make sure that your 
script or model is using the correct user name when fully qualifying object names. For example, you may have connected to the database as the user 'ken' in the 
connection file, but the data paths in the script or model has a different user 
for the qualified feature class name, as illustrated below. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.esri.com/Dev/photos/geoprocessing/picture2608.aspx" target="_blank"&gt;&lt;img src="http://blogs.esri.com/Dev/photos/geoprocessing/images/2608/640x320.aspx" border="0"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;
If everything seems correct with your connection file, the next investigation step is to set up a client-side SDEINTERCEPT.&lt;/p&gt;
&lt;h3&gt;Client-side SDEINTERCEPT&lt;/h3&gt;
&lt;p&gt;You may need to dig 
deeper by instructing ArcGIS to log information about the communication between 
your computer and the ArcSDE server.  To instruct ArcGIS to log information, and where 
to write the logs, you need to set certain system environment variables.  
The exact technique for setting these variables depends on whether you are 
using Windows or UNIX.  For a full explanation of the variables and how to set 
them, see the web help topic &lt;a href="http://webhelpdev.esri.com/arcgisdesktop/9.3/index.cfm?topicname=the_dbinit.sde_file"&gt;The dbinit.sde file&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;(For a more general introduction to configuring ArcSDE geodatabases, see &lt;a href="http://webhelpdev.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=An_overview_of_configuring_an_ArcSDE_geodatabase"&gt;An Overview of configuring an ArcSDE geodatabase&lt;/a&gt; .)
&lt;/p&gt;
A SDEINTERCEPT file contains all the calls to ArcSDE along with their return values.  
These return values often contain the failure message received from ArcSDE or the error message ArcSDE received from the database.  On Windows, the general 
steps are:

&lt;p&gt;&lt;b&gt;1. Set the following system environment variables:&lt;/b&gt;&lt;/p&gt;


&lt;ul&gt;SDEINTERCEPT=crwft&lt;br&gt;
SDEINTERCEPTLOC=&amp;lt;folder name&amp;gt;&lt;/ul&gt;

&lt;p&gt;&amp;lt;folder name&amp;gt; can be any existing folder on your computer.  
Just be sure to add the slash at the end of the pathname (i.e.: C:\temp\logs\)&lt;/p&gt;


&lt;p&gt;On Windows XP, system environment variables are accessed by right-clicking 
My Computer and clicking Properties.  On the Advanced Tab, click Environment 
Variables, as illustrated below.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.esri.com/Dev/photos/geoprocessing/picture2609.aspx" target="_blank"&gt;&lt;img src="http://blogs.esri.com/Dev/photos/geoprocessing/images/2609/640x383.aspx" border="0"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;


&lt;p&gt;&lt;b&gt;2. Restart the application that will run the geoprocessing tool 
(such as ArcMap) so that it inherits the new system environment. &lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;3. Run the geoprocessing tool or script that caused the failure.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;After the task is run, a file named se_intercept.&amp;lt;nnn&amp;gt;  is created in the folder specified 
in the SDEINTERCEPTLOC variable (where &amp;lt;nnn&amp;gt; is a unique number starting at 001).  
This file will contain error and warning messages.  Not all of these 
errors and warnings are issues you need to worry about; some are a normal part 
of using ArcSDE and are just warnings that are automatically handled by ArcSDE.  
It will take some time to learn how to read these files.  If necessary, you can get 
help interpreting the file from ESRI support.  A good strategy is to search the file 
from the bottom up since it's more likely that the real error is near the bottom.&lt;/p&gt;

&lt;h3&gt;ArcSDE Server error logs&lt;/h3&gt;
&lt;p&gt;Each entry in an ArcSDE Server error log contains three pieces of information: the time of the message, the name of the client machine, and the message.&amp;nbsp;  If you can identify the time your error occurred, you can 
search the log for any obvious error messages around the time the error occurred on your client machine.&lt;br&gt;&lt;/p&gt;


&lt;p&gt;ArcSDE Server error logs are written to the location specified by your SDE administrator, 
so you will need to contact your SDE administrator to gain access to these logs.  
(They are written to SDEHOME\etc\&amp;lt;sde_instance_name&amp;gt;.log, such as sde_esri_sde.log).&lt;/p&gt;

&lt;p&gt;To have more detailed information in the ArcSDE Server error logs, see the SDEVERBOSE setting in the topic &lt;a href="http://webhelpdev.esri.com/arcgisdesktop/9.3/index.cfm?topicname=the_dbinit.sde_file"&gt;The dbinit.sde file&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;DBMS logs and trace files&lt;/h3&gt;
&lt;p&gt;Most database management systems have the ability to log detailed information 
about database activities and queries.  Investigating these logs usually 
require assistance from your database administrator as a certain amount of 
database specific expertise is needed to gain useful information from their contents.&lt;/p&gt;

&lt;p&gt;DBMS logs contain information on the state of the database and any database related 
issues that may have occurred.  Things such as the database running out of 
space to store your data, dead locks, database system errors and much more are 
contained in these files.  &lt;/p&gt;

&lt;p&gt;DBMS trace files, on the other hand, are files that contain all the SQL 
statements and their return values for a session in the database.  When you 
request ArcSDE to perform an action, a lot of what is done is the running of SQL 
in the database.  The database trace file will contain all the SQL used by ArcSDE 
and the messages the database returned when running this SQL.  Any unexpected errors 
can be found in these files.&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=2601" width="1" height="1"&gt;</description><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/advanced/default.aspx">advanced</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/script+tools/default.aspx">script tools</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/ArcSDE/default.aspx">ArcSDE</category><category domain="http://blogs.esri.com/Dev/blogs/geoprocessing/archive/tags/Digging+deeper/default.aspx">Digging deeper</category></item></channel></rss>