DOC
DOC
March 2008
© 2008 Autodesk, Inc. All Rights Reserved. Except as otherwise permitted by Autodesk, Inc., this publication, or parts thereof, may not be
reproduced in any form, by any method, for any purpose.
Certain materials included in this publication are reprinted with the permission of the copyright holder.
Trademarks
The following are registered trademarks or trademarks of Autodesk, Inc., in the USA and other countries: 3DEC (design/logo), 3December,
3December.com, 3ds Max, ActiveShapes, Actrix, ADI, Alias, Alias (swirl design/logo), AliasStudio, Alias|Wavefront (design/logo), ATC, AUGI,
AutoCAD, AutoCAD Learning Assistance, AutoCAD LT, AutoCAD Simulator, AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk, Autodesk
Envision, Autodesk Insight, Autodesk Intent, Autodesk Inventor, Autodesk Map, Autodesk MapGuide, Autodesk Streamline, AutoLISP, AutoSnap,
AutoSketch, AutoTrack, Backdraft, Built with ObjectARX (logo), Burn, Buzzsaw, CAiCE, Can You Imagine, Character Studio, Cinestream, Civil
3D, Cleaner, Cleaner Central, ClearScale, Colour Warper, Combustion, Communication Specification, Constructware, Content Explorer,
Create>what's>Next> (design/logo), Dancing Baby (image), DesignCenter, Design Doctor, Designer's Toolkit, DesignKids, DesignProf, DesignServer,
DesignStudio, Design|Studio (design/logo), Design Your World, Design Your World (design/logo), DWF, DWG, DWG (logo), DWG TrueConvert,
DWG TrueView, DXF, EditDV, Education by Design, Exposure, Extending the Design Team, FBX, Filmbox, FMDesktop, Freewheel, GDX Driver,
Gmax, Heads-up Design, Heidi, HOOPS, HumanIK, i-drop, iMOUT, Incinerator, IntroDV, Inventor, Inventor LT, Kaydara, Kaydara (design/logo),
LocationLogic, Lustre, Maya, Mechanical Desktop, MotionBuilder, Mudbox, NavisWorks, ObjectARX, ObjectDBX, Open Reality, Opticore,
Opticore Opus, PolarSnap, PortfolioWall, Powered with Autodesk Technology, Productstream, ProjectPoint, ProMaterials, Reactor, RealDWG,
Real-time Roto, Recognize, Render Queue, Reveal, Revit, Showcase, ShowMotion, SketchBook, SteeringWheels, StudioTools, Topobase, Toxik,
ViewCube, Visual, Visual Bridge, Visual Construction, Visual Drainage, Visual Hydro, Visual Landscape, Visual Roads, Visual Survey, Visual Syllabus,
Visual Toolbox, Visual Tugboat, Visual LISP, Voice Reality, Volo, Wiretap, and WiretapCentral
The following are registered trademarks or trademarks of Autodesk Canada Co. in the USA and/or Canada and other countries: Backburner,
Discreet, Fire, Flame, Flint, Frost, Inferno, Multi-Master Editing, River, Smoke, Sparks, Stone, and Wire
All other brand names, product names or trademarks belong to their respective holders.
Disclaimer
THIS PUBLICATION AND THE INFORMATION CONTAINED HEREIN IS MADE AVAILABLE BY AUTODESK, INC. "AS IS." AUTODESK, INC. DISCLAIMS
ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE REGARDING THESE MATERIALS.
iii
Get the List of Dependent Files . . . . . . . . . . . . . . . . 14
Get the Connection Properties . . . . . . . . . . . . . . . . 15
Get Values for the Connection Properties . . . . . . . . . . 15
Set the Connection Properties . . . . . . . . . . . . . . . . 16
Open a Connection . . . . . . . . . . . . . . . . . . . . . . 16
Open a Pending Connection . . . . . . . . . . . . . . . . . 16
Get the List of Dependent Files . . . . . . . . . . . . . . . . 17
Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
ArcSDE Provider . . . . . . . . . . . . . . . . . . . . . . . . 17
MySQL Provider . . . . . . . . . . . . . . . . . . . . . . . . 17
Capabilities API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Command Capabilities . . . . . . . . . . . . . . . . . . . . . . . 18
User Management API . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
User Management Capabilities . . . . . . . . . . . . . . . . . . . 18
Data Store Management API . . . . . . . . . . . . . . . . . . . . . . . 19
Spatial Context API . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
iv | Contents
Add a Service Name . . . . . . . . . . . . . . . . . . . . . . . . . 51
Installing and Configuring an Oracle Database on Linux . . . . . . . . 52
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Get the Installer . . . . . . . . . . . . . . . . . . . . . . . . 52
Get the Installation Instructions . . . . . . . . . . . . . . . 53
Check the Hardware Requirements . . . . . . . . . . . . . . 53
Check the Software Requirements . . . . . . . . . . . . . . 53
Create Required UNIX Groups and User . . . . . . . . . . . 54
Create the Required Directories . . . . . . . . . . . . . . . . 54
Configure Kernel Parameters . . . . . . . . . . . . . . . . . 55
Set Shell Limits For The Oracle User . . . . . . . . . . . . . 55
Configure the Oracle Account . . . . . . . . . . . . . . . . 56
Run the Installer . . . . . . . . . . . . . . . . . . . . . . . 57
Post-Installation Tasks . . . . . . . . . . . . . . . . . . . . . . . . 58
Patching . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Set the Environment . . . . . . . . . . . . . . . . . . . . . 60
Create a Database . . . . . . . . . . . . . . . . . . . . . . . 60
Configure the Database . . . . . . . . . . . . . . . . . . . . 60
Create a Listener . . . . . . . . . . . . . . . . . . . . . . . 61
Add a Service Name . . . . . . . . . . . . . . . . . . . . . . 61
Automatic Startup of Oracle Database and Listener at
System Boot Time . . . . . . . . . . . . . . . . . . . . . . 61
Installing and Configuring an Oracle Client on Linux . . . . . . . . . . 62
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Get the Installation Instructions . . . . . . . . . . . . . . . 63
Get the Installer . . . . . . . . . . . . . . . . . . . . . . . . 63
Preliminary Steps . . . . . . . . . . . . . . . . . . . . . . . 64
Run the Installer . . . . . . . . . . . . . . . . . . . . . . . 65
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Set Environment Variables . . . . . . . . . . . . . . . . . . 65
Add a Local Name Service . . . . . . . . . . . . . . . . . . . 66
Testing the Connection . . . . . . . . . . . . . . . . . . . . 66
Installing and Configuring SQL Server 2000 . . . . . . . . . . . . . . . 67
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Installing and Configuring SQL Server 2005 Developer Edition . . . . . 69
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Contents | v
Disk Space and Memory . . . . . . . . . . . . . . . . . . . . . . . 73
Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Feature Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Connection API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Create a Username and Password for the ArcSDE Provider
Connected to Oracle . . . . . . . . . . . . . . . . . . . . . . . 81
Create a Username and Password for the ArcSDE Provider
Connected to SQL Server . . . . . . . . . . . . . . . . . . . . . 81
Connecting to the ODBC Provider . . . . . . . . . . . . . . . . . 82
Overview of the Connection Properties . . . . . . . . . . . 82
Create an ODBC DSN for an MS Access File . . . . . . . . . 83
Create an ODBC DSN for an Excel File . . . . . . . . . . . . 84
Create an ODBC DSN for an Oracle Database . . . . . . . . 85
Create an ODBC DSN for a MySQL Database . . . . . . . . . 86
Create an ODBC DSN for a SQL Server Database . . . . . . . 87
Command Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . 88
User Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Data Store Management API . . . . . . . . . . . . . . . . . . . . . . . 94
Spatial Context API . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Exception Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Connection Not Established . . . . . . . . . . . . . . . . . . . . 97
Incorrect usage of DB GRANT and GLOBAL PRIVILEGES . . . . . 97
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
vi | Contents
The Essential FDO
1
You can use this document is to get up and running with the Feature Data Objects (FDO) API.
The Objectives section provides more information on the topics covered in this document.
Comments on this document can be sent to [email protected].
1
The storage of FDO feature data can be modeled as a containment hierarchy:
■ A data store may contain one or more feature schema and one or more
spatial contexts.
Related Documentation
The reference documentation includes this document as well as the following.
The ReadMe and the API reference documents are formatted as HTML or CHM
files on Windows and HTML on Linux. This document, the developer’s guide
and the open source build document are formatted as HTML and PDF.
■ FDO ReadMe
Objectives | 3
■ OSGeo FDO Provider for ArcSDE API Reference
■ Autodesk FDO Provider for Oracle API Reference (only included with Autodesk
software)
■ Autodesk FDO Provider for Raster API Reference (only included with Autodesk
software)
■ Autodesk FDO Provider for SQL Server API Reference (only included with
Autodesk software)
NOTE The FDO Provider for WFS has no WFS-specific public API; all of its
functionality is accessed through the FDO API.
OSGeo FDO Provider Read/write access to feature data in an ESRI ArcSDE-based data store (that is,
for ArcSDE with an underlying Oracle or SQL Server database). Supports describing schema,
and inserting, selecting, updating, and deleting feature data in existing
schemas; does not support creating or deleting schemas.
OSGeo FDO Provider Read/write access to feature data in a MySQL-based data store. Supports spatial
for MySQL data types and spatial query operations. Custom API can gather information,
transmit exceptions, list data stores, and create connection objects. MySQL
architecture supports various storage engines, characteristics, and capabilities.
OSGeo FDO Provider Read/write to feature data in a ODBC-based data store. Supports XYZ feature
for ODBC objects and can define feature classes for any relational database table with X,
Y, and optionally, Z columns; does not support creating or deleting schema.
Object locations are stored in separate properties in the object definition.
OSGeo FDO Provider Read-write access to feature data in an SDF-based data store. Autodesk’s geo-
for SDF spatial file format, SDF, supports multiple features/attributes, provides high
performance for large data sets, and interoperability with other Autodesk
products. Supports spatial indexing and is a valid alternative to database stor-
age. Note that this release of the SDF provider supports version 3.0 of the SDF
file format.
OSGeo FDO Provider Read/write access to existing spatial and attribute data in an ESRI SHP-based
for SHP data store, which consists of separate shape files for geometry, index, and at-
tributes. Each SHP file and its associated DBF file is treated as a feature class
with a single geometry property. This is a valid alternative to database storage
but does not support locking.
Provider Overview | 5
Provider Name Description
OSGeo FDO Provider Read-only access to feature data in an OGC WFS-based data store. Supports a
for WFS client/server environment and retrieves geospatial data encoded in GML from
one or more Web Feature Services sites. Client/server communication is encoded
in XML with the exception of feature geometries, which are encoded in GML.
Note that there is no public API documentation for this provider; all WFS
functionality is accessible through the base FDO API.
OSGeo Provider for Read-only to feature data in an OGC WMS-based data store. Web Map Service
WMS (WMS) produces maps of spatially referenced data dynamically from geographic
information, which are generally rendered in PNG, GIF, or JPEG, or as vector-
based Scalable Vector Graphics (SVG) or Web Computer Graphics Metafile
(WebCGM) formats.
Autodesk FDO Provider Read/write access to feature data in an Oracle-based data store. Supports
for Oracle spatial indexing, long transactions, and persistent locking. Custom API can
gather provider information, transmit client services exceptions, list data stores,
and create connection objects.
Autodesk FDO Provider Read-only access to feature data in a raster-based file format. Supports various
for Raster image and GIS data formats (for example, JPEG, PNG, MrSID, and others).
Supports georeferenced file-based raster images and file-based grid coverages.
Pixel-based images, such as satellite images, are useful underneath vector data.
Autodesk FDO Provider Read/write access to feature data in a Microsoft SQL Server-based data store.
for SQL Server A custom API supports schema read/write access and geospatial and non-
geospatial data read/write access.
NOTE This section describes the features referenced in the Feature Matrix sections
in the Provider chapters.
Feature Description
Commands
Spatial Contexts Manage the properties required for the storage and manipulation of geo-
metric data.
Select Use the FDO filter and expression language to select a set of features from
a data store.
Select Aggregates Selects groups of features from the data store and applies filters to each of
the groups.
Insert Create an instantiation of a feature schema class and add it to the data
store.
Feature Description | 7
Feature Description
SQL Command Supports the execution of a SQL statement against an underlying RDBMS.
Two execute methods are provided to distinguish between statements that
return table data versus those that execute non query type operations.
Locking Persistent and transaction locks are supported. A persistent lock is applied,
if a user requires exclusive access to an object for an extended period of
time (for example, for multiple sessions). In contrast, a transaction lock is
applied if exclusive access to an object is required for the duration of a
transaction only. Such a transaction could cover the time required to change
an object.
Long Transactions Group conditional changes to one or more objects. A root long transaction
represents permanent data. A descendent of a root long transaction repres-
ents revisions to objects where the revisions do not involve permanent
changes to those objects.
Schema Capabilities
Schema Overrides This allows FDO applications to customize the mappings between Feature
(logical) Schemas and the Physical Schema of the Provider data store.
Schema Mappings will be customized through Schema Override sets. Each
Feature Schema may have a number of associated sets, one per FDO Pro-
vider that the Feature Schema might be applied against.
Data Property Constraints Specify that a property or list of properties taken together have unique
values for all objects of that class in a data store. A unique constraint that
is based on a list of two or more properties is called a composite unique
constraint. This constraint type applies to all data property types except
for Boolean, BLOB, and CLOB. A Boolean property can be included if it is
part of a composite unique constraint.
Feature Schema Serializa- Read and write Feature Schema, Schema Overrides and Spatial Context
tion information using an OGC GML format.
Feature Data Serialization Read and write feature data using an OGC GML format.
System Requirements
System Requirements | 9
Windows XP, SP2
Both the enterprise and open source editions of the FDO API require the use
of Microsoft Visual Studio 2005 for development (Express, Standard, or
Professional editions).
Getting Started
Install FDO
Enterprise Edition
FDO is installed as part of the Autodesk Map 3D and Autodesk MapGuide
Enterprise installs. The FDO C++ and C# APIs are exposed in AutoCAD Map3D
2008. The FDO C# API is exposed in MapGuide Enterprise 2007 Server.
Windows
Check out the settings in the solution (.sln) and project (.vcproj) files found
in the FDO source folders.
Use the installation path to set up the environment so that the headers and
libraries can be located at compile time, and the shared objects can be located
at runtime.
Use the source path to set up the environment so that the debugger can locate
program database files (symbol tables) and source files at runtime.
You can make the various files visible by either setting solution or project
properties or by setting Visual Studio tool options or by setting an environment
variable (PATH).
The first step for the properties method is to select the solution or project in
the Solution Explorer, right-click to its pop-up menu and select Properties.
The result is that the properties dialog is displayed. If the project properties
dialog is displayed, the second step is to expand 'Configuration Properties' in
the properties dialog contents pane.
The first step for the tool options method is to select 'Options...' from the
Tools menu in the main menubar. The result is that the options dialog is
displayed.
Headers
In the properties dialog contents pane expand 'Configuration Properties' and
then 'C/C++'. Select 'General' and edit 'Additional Include Directories'.
In the options dialog contents pane expand 'Projects and Solutions' and then
'VC++ Directories'. Select 'Include files' from the spinbox labeled 'Show
directories for:'. Follow the procedure for adding a directory.
Source
In the solution properties dialog contents pane expand 'Common Properties'.
Select 'Debug Source Files'. Follow the procedure for adding a directory.
In the options dialog contents pane expand 'Projects and Solutions' and then
'VC++ Directories'. Select 'Source files' from the spinbox labeled 'Show
directories for:'. Follow the procedure for adding a directory.
Linux
Set LD_LIBRARY_PATH environment variable.
3 Create a connection
10 Open a connection
Create a Connection
Read about the CreateConnection method in the FdoConnectionManager class
reference.
■ user names
■ passwords
■ URLs
■ service identifiers
Each provider has its own unique set of connection properties. Read abou the
connection properties in the chapter about the providers.
Open a Connection
Read about the Open method in the FdoIConnection class reference.
Confirm that the connection is open by calling the GetConnectionState
method.
Next Steps
ArcSDE Provider
You use this provider to connect to an ArcSDE server, which is, in turn,
connected to an Oracle or SQL Server data source.
The next step is to determine the number and composition of feature schema
in the data store so that you can execute data maintenance (insert, update,
and delete) and query (select) commands.
MySQL Provider
The next steps are to create a data store and a user, and after that, create a
feature schema and execute data maintenance and query commands.
Capabilities API
You can use this API to determine what capabilities to expose or hide in the
user interface depending on the current provider.
Next Steps | 17
You access the Capabilities API by way of the connection object. The
availability of this API is not dependent on the connection state; it is always
available. This static definition represents the maximum set of capabilities
available through the current provider under optimum conditions. For
example, the capabilities API says that the Oracle provider supports the update
command; however, the execution of an update command could throw an
exception because the user has not been granted access to the table to be
updated. In this example, the update capability is conditional on user privilege.
The exception message provides the additional information you need to use
the capability successfully.
Use the FdoIConnection object to obtain the capability objects whose class
names are FdoICommandCapabilities, FdoIConnectionCapabilities,
FdoIExpressionCapabilities, FdoIFilterCapabilities,
FdoIRasterCapabilities, FdoISchemaCapabilities, and
FdoITopologyCapabilities.
Command Capabilities
Use the FdoIConnection object's GetCommandCapabilities method to get the
list of commands and related attributes supported by the provider.
The procedure used for creating and destroying a data store in an RDBMS-based
provider is slightly different than the procedure used for these operations in
the SDF provider. The key difference is that the connection to the RDBMS-based
provider is in the pending state, and the connection to the SDF provider is in
the closed state.
■ f_associationdefinition
■ f_attributedefinition
■ f_attributedependencies
■ f_classdefinition
■ f_classtype
■ f_dbopen
■ f_lockname
■ f_options
■ f_sad
■ f_schemainfo
■ f_schemaoptions
■ f_sequence
■ f_spatialcontext
■ f_spatialcontextgeom
■ f_spatialcontextgroup
2 Verify these operations by looking in the file system. The SDF provider
does not support the FdoIListDataStores command.
Glossary
Tolerance
Used to determine when two points are close enough to be considered to be
equivalent in certain spatial tests. In FDO, the tolerance value is used as a
radius around a position rather than as a distance along an axis. In the majority
of cases, the distance between the points is compared to the tolerance using
the 'less than or equals to' predicate rather than the 'less than' predicate. If
the X and Y tolerances are both 0.05, then point B (1.0, 1.0) is considered to
be equivalent to point A (0.96, 0.96) and point C (1.04, 1.04), but is not
considered to be equivalent to point D (0.96, 0.94) or point E (1.04, 1.06). The
System Requirements
Software
The following table maps the various providers to the operating system and
RDBMS versions against which they have been tested (T). The provider requires
that an Oracle client is installed in order to communicate with the Oracle
database. It is your choice to install just the Oracle client or the client and server
combined. Connection to a remote SQL Server database is done through the
standard ODBC component that is installed with the Windows operating system
so that installing a SQL Server client is not a necessity. The FDO API provides
user and data store management for both the Oracle and SQL Server providers.
You may, nevertheless, wish to install a SQL server client.
FDO and its Providers run on the Windows Vista operating system. However,
Autodesk cannot guarantee that the underlying file or database that an FDO
Provider is connecting to is Vista compatible (except for the Autodesk Spatial
23
Data File format, SDF). Please consult the file or database vendor to verify
Vista compatibility.
NOTE
1 In previous releases the use of the Oracle Workspace Manager for
versioning (locking and long transactions) was enabled by default. In the
current release the OWM is disabled by default and so, therefore, is
support for versioning. How to reenable versioning is described in the
Oracle appendix in the FDO Developers Guide.
Windows
This tables shows the disk space and memory requirements for the RDBMS
clients on an XP client machine.
Component D M N
NOTE
1 The disk size does not include the database directory. The memory size
is an approximate sum of the memory sizes for an Oracle instance running
as a service. The memory footprint is configurable. The processes are
oracle.exe, tnslsnr.exe, and emagent.exe. The Oracle instance includes
both client and server components. The Oracle provider uses the Oracle
client to connect to a local or remote Oracle database. When the FDO
application connects to Oracle, it loads the Oracle dynamically linked
libraries (DLLs)
3 The two major components installed are database and analysis services.
The database engine service is sqlserver.exe. The analysis service is
msmdsrv.exe. The full-text search service is msftesql.exe. The disk size is
that of C:\Program Files\Microsoft SQL Server\90, C:\Program Files\Microsoft
SQL Server\MSSQL.2, and C:\Program Files\Microsoft SQL Server\MSSQL.3.
Component D M N
NOTE
1 The memory value is a combination of RAM and swap. There are 14
ora_xxxx_<sid> processes where ‘xxxx’ represents alphanumeric characters
and ‘<sid>’ represents the System IDentifier (SID) value given to teh
database during its creation.
Feature Matrix
The main features for Commands, Schema Capabilities, and Tools and Setup
of the FDO API are listed in the table . “Y” means the command or attribute
is supported in that particular provider.
NOTE The features are described in the Feature Description on page 7section.
Commands
Connection Y Y Y
List Datastores Y Y Y
Create Datastore Y Y Y
Destroy Datastore Y Y Y
Describe Schema Y Y Y
Apply Schema Y Y Y
Destroy Schema Y Y Y
Select Y Y Y
Select Aggregates Y Y Y
Insert Y Y
Update Y Y
Delete Y Y
SQL Command Y Y
Transactions Y Y
Locking Y Y
Long Transactions Y Y
Schema Capabilities
Feature Matrix | 27
Feature Or- Ras- SQL
acle ter Serv-
er
Schema Overrides Y Y
Foreign Schemas Y Y
Associations Y Y
Inheritance Y Y
Object Properties Y Y
XML Configuration Y Y Y
Connection API
The following table shows the connection properties for each provider. “T”
means true, and “F” means false. For important details, refer to the associated
Notes.
Provider/Properties DV R P FN FP D E Notes
Provider/Properties DV R P FN FP D E Notes
Username T F F F F F 1
Password T F F F F F 1
Service T F F F F F 2
DataStore F F F F T T 3
DefaultRasterFileLocation F F F F F F 5
Username F F F F F F 7
Password F T F F F F 7
Service T F F F F F 8
DataStore F F F F T T 9
Connection API | 29
NOTE
1 See the User Management API topic for information about adding a
username and password.
3 An Oracle instance can contain many data stores. You can obtain the list
of data stores by opening a pending connection to the Oracle service as
described in the Getting Started topic.
4 The raster file formats supported by this provider are listed in File Formats
Supported by Raster Provider on page 31.
5 This is a file name. The named file is in the local file system.
7 If your Windows user name has been added to the remote SQL Server by
an administrator or you are connecting to the SQL Express instance on
your local machine, you do not have to provide values for the Username
and Password properties. If you are connecting by way of SQL Server
Authentication, you must provide a user name and password that has
been added by an administrator. If you connect to a SQL Server instance
with administrator privileges, you can use the FDO User Management
API to add users.
8 If you can see the server name in the list of SQL Servers known to the
ODBC Data Source Administrator, then you can connect to it using FDO.
Use the name of the remote SQL Server as it appears in the list as the
value of the Service property. If you want to connect to the SQL Express
instance running on the local host, use <hostname>\SQLEXPRESS or
.\SQLEXPRESS as the value of the Service property. Be sure the the SQL
Server service is running on the local machine. To see the list of remote
SQL Servers, do the following:
1 In the Windows Start menu, click Settings, click Control Panel, click
Administrative Tools, click Data Sources (ODBC). The ODBC Data
Source Administrator dialog box is displayed.
3 In the Create New Data Source dialog box, scroll down and select
SQL Server, click OK. The Create a New Data Source to SQL Server
dialog box is displayed.
4 In the Create a New Data Source to SQL Server dialog box, click the
down arrow-head on the spin box labeled Server to make the list of
SQL Servers visible.
JPG2K .jp2, .j2p, .j2c, .j2k, .jpc, .jpk Joint Photographic Experts Group
DTED .dt0, dt1, .dt2 Digital Terrain Elevation Data (Windows Only)
ESRI Grid .asc, .adf ESRI ASCII and Binary Grid Files (Windows Only)
Command Capabilities
The list of command class names is shown in the first table. For descriptions
of what the commands do, see the API reference documentation. The command
attributes are shown in the second table. For descriptions of what the attributes
mean, see entry for the FdoICommandCapabilities class in the API reference
documentation. “Y” means the command or attribute is supported in that
particular provider.
FdoISelect Y Y Y
FdoISelectAggregates Y Y Y
FdoIInsert Y Y
FdoIDelete Y Y
FdoIUpdate Y Y
FdoIDescribeSchema Y Y Y
FdoIDescribeSchemaMapping Y
FdoIApplySchema Y Y
FdoIDestroySchema Y Y
FdoIActivateSpatialContext Y Y
FdoICreateSpatialContext Y Y
FdoIDestroySpatialContext Y Y
FdoIGetSpatialContexts Y Y Y
FdoICreateDataStore Y Y
FdoIDestroyDataStore Y Y
FdoIListDataStores Y Y
FdoICreateSDFFile
FdoISQLCommand Y Y
FdoIAcquireLock Y
FdoIGetLockInfo Y
FdoIGetLockedObjects Y
FdoIGetLockOwners Y
FdoIReleaseLock Y
FdoIActivateLongTransaction Y
FdoICommitLongTransaction Y
FdoICreateLongTransaction Y
Command Capabilities | 33
Command Class Name Oracle Raster SQL Server
FdoIDeactivateLongTransaction Y
FdoIFreezeLongTransaction
FdoIGetLongTransactions Y
FdoIRollbackLongTransaction Y
FdoICreateSpatialIndex Y Y
FdoIDestroySpatialIndex Y Y
FdoIGetSpatialIndexes Y Y
NOTE The capability to create and destroy a data store is associated with the
capability to create and destroy a feature schema. To create a data store you specify
values for data store properties. For more information about these properties are
discussed in Data Store Management API on page 19.
Parameters
Timeout
SelectExpressions Y Y
SelectFunctions Y Y
SelectDistinct Y Y
SelectOrdering Y Y
SelectGrouping Y Y
name = ‘user’;
use master
2 The new Oracle user is assigned the F_USER_ROLE role. The SQL statement
used to obtain this information is select granted_role from
sys.dba_role_privs where grantee = 'username';. A new Oracle user
is assigned the 'unlimited tablespace,' 'execute any indextype,' and 'execute
any procedure' privileges. The SQL statement used to obtain this
information is select privilege from sys.dba_sys_privs where
grantee = 'username'; A new Oracle user is assigned a long list of
privileges as a result of being assigned the role of F_USER_ROLE. You can
determine the contents of this list using the SQL statement select
privilege from sys.role_sys_privs where role = 'F_USER_ROLE';
The list is drop user, alter user, analyze any, create user, alter
session, drop any view, create session, drop any index, drop any
table, grant any role, lock any table, alter any index, alter any
table, create any view, create any index, create any table, create
procedure, delete any table, drop any synonym, insert any table,
select any table, update any table, drop any sequence, alter any
sequence, create any synonym, create any sequence, grant any
privilege, select any sequence, global query rewrite, and grant any
object privilege. The F_USER_ROLE also has default table privileges.
You can determine what these are by the SQL statement select
table_name,privilege from sys.role_tab_privs where role =
'rolename';
3 A new SQL Server user created using the stored procedure sp_login is
given one system privilege db_creator. The user can login using SQL
Server authentication. Call GrantAccessToDatastore(username, datastore)
to grant the user default privileges for the data store.
5 User privileges extend across all data stores defined in the Oracle instance.
7 You can get the same information from the connection properties
dictionary for the DataStore property. The MySQL SQL command mysql>
show databases; lists the database (data store) names. In Oracle, user
names and data store names are classed as Oracle users. The Oracle SQL
command SQL> select username from dba_users; shows data store and
user names
8 All users are listed. SQL Server reports the user privileges as well as the
user name. If you are connected to MySQL and you created the user with
AddUser, USAGE is shown as the privilege. If you are connected to SQL
Server and you created the user with AddUser, db_creator is shown as the
privilege.
9 All users in a particular data store are listed along with the privileges that
they have in the data store. If connected to MySQL and you used the
two-argument version of GrantAccessToDatastore, the privileges are
listed in the note for that method.
14 This overloaded method takes three arguments: a user name, a data store
name, and a privilege name. It grants the specified privilege to that user
for the named data store. The MySQL provider does not allow you to
grant any privilege other than those assigned by a call to
GrantAccessToDatastore(<user>, <datastore>). The SQL Server provider
does allow you to grant any of the supported privileges with the exception
of the publicprivilege. Call GetDBUsers(<datastore>) to verify the result.
15 This method takes three arguments: a user name, a data store name, and
a privilege name. It revokes the specified privilege from that user for the
named data store. If the role is set to ‘*’, the provider revokes all privileges
in the data store from the user. In this case the SQL Server provider also
drops the database user from the data store; the user’s login status is not
changed.
16 This method takes two arguments: a user name and a role or privilege
name. It revokes the specified role or privilege.
17 If True, you can call the two GrantAccessToDatastore methods and the
RevokeAccessToDatastore method.
Provider/Properties DV R P FN D E Notes
Autodesk.Oracle.3.0
Provider/Properties DV R P FN D E Notes
DataStore T F F T F 1
Password T T F F F 2
Description F F F F F
LtMode OWM F F F F T 3
TableSpace F F F F F 4
Autodesk.SqlServer.3.0
DataStore T F F T F 1
Password T T F F F 2
Description F F F F F
LtMode FDO F F F F T 3
LockMode FDO F F F F T 5
Unit dimension XY XY XY 3
NOTE
1 A static extent type means that the extent is defined at the time of the
creation of the spatial context using the FdoICreateSpatialContext
command. A dynamic extent type means that the extent may change as
features are added so that it always encloses all of the features.
2 The default extents expressed in AGF text format for the various providers
are as follows:
■ Oracle and SQL Server: POLYGON ((-2000000 -2000000, 2000000
-2000000, 2000000 2000000, -2000000 2000000, -2000000 -2000000))
5 The Oracle and SQL Server providers can have multiple spatial contexts
defined and can, therefore, show contexts in the reader that are not active.
Exception Messages
47
Installing and Configuring an Oracle Database
on Windows
1 Go to
http://www.oracle.com/technology/software/products/database/oracle10g/index.html
3 Read the export restriction statements and the license agreement. Click
the checkbox and click I Accept, which displays the “Oracle Database
10g Release 1 (10.1.0.2)” page.
4 Click the 10g_win32_db.zip link, which displays the File Download dialog
box asking you if you want to Open or Save this file. Click Save, which
displays a file system browser dialog box where you can save the file to
the desktop.
5 Unzip the file to the desktop. This action results in a folder called Disk1
being created on the desktop. This folder contains setup.exe.
1 Select Universal Installer from the menu path Start ➤ Programs ➤ Oracle
- OraDb10g_home1 ➤ Oracle Installation Products.
Create a Database
Select Database Configuration Assistant from the menu path
Start ➤ Programs ➤ Oracle - OraDb10g_home1 ➤ Configuration and Migration
Tools.
In step 3 Database Identification when you type a fully qualified name
(<root>.domainname) in the text box labeledGlobal Database Name, you will
see the <root> of that fully qualified name appear in the text box labeledSID
(Oracle System Identifier). The fully qualifed name used for this example is
‘r10102.ads.autodesk.com’.
NOTE Keep the root of the fully qualified name to 8 characters or less. Oracle will
truncate the root name for some purposes and not others. Save yourself some
confusion.
In the step that creates the system accounts, use the default accounts (SYS,
SYSTEM, DBSNMP, and SYSMAN). You can create your own accounts later
using the Fdo User Manager API. Be sure to specify a password for the default
accounts. This example uses ‘test’ for the password.
Verify that the database and database console services are running.
Click on theServices icon in the Administrative Tools folder. The access path
is Start ➤ Programs ➤ Settings ➤ Control Panel ➤ Administrative Tools. In
the Services window, you will see two services whose names are something
like OracleServiceR10102 and OracleDBConsoler10102. Each should have a
status of Started.
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS_LIST =
To verify that you can connect to the service, execute the following commands
in a cmd.exe window.
1 sqlplus/nolog
Introduction
What follows is a detailed description of the installation and configuration
of an Oracle database on a RHEL3 machine.
Installation
1 Go to http://www.oracle.com/database/index.html
4 Click the checkbox labeled YES, I accept the License Terms and Export
Restrictions and I acknowledge that I have reviewed and understood the
agreement and agree to use the language I selected in entering into this
agreement.
3 Download the PDF for Oracle Database Quick Installation Guide 10g
Release 1 (10.1.0.3) for Linux x86
■ Thedu -h /tmp result is 3.9 GB, which is greater than the required 2.5 GB.
■ kernel-2.4.21-40.EL
■ gcc-3.2.3-54
Installation | 53
■ gcc-c++-3.2.3-54
■ glibc-2.3.2-95.39
■ make-3.79.1-17.1
■ openmotif-2.2.3-5.RHEL3.3
■ setarch-1.3-1
■ compat-db-4.0.14-5.1
■ compat-gcc-7.3-2.96.128
NOTE These operations were done using the Users and Groups application rather
than the command-line tools groupadd, useradd, and usermod because the latter
returned puzzling results.
ulimit -p 16384
Installation | 55
ulimit -n 65536
else
fi
fi
endif
4 [oracle] # ORACLE_BASE=/app/oracle
5 [oracle] # ORACLE_SID=r10103
1 [oracle] # cd /tmp
Installation | 57
Adding to inittab
Checking the status of Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
otwcamed
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
Post-Installation Tasks
These tasks are described in the The Oracle Database Installation Guide. The
PDF file B10811_05.pdf can be downloaded from
http://www.oracle.com/technology/documentation/database10g.html. Chapter 4
describes the post-installation tasks.
Patching
Patching is a required post-installation task. To get the patch follow the
instructions in Chapter 4 of The Oracle Database Installation Guide. You will
have a zip file with a name similar to p4505133_10105_LINUX.zip. Unzip the
patch file to a temporary directory. The unzip operation creates a directory
called Disk1 and an html readme file. The readme contains the instructions
2 Use the information from the oratab file to set the ORACLE_SID and
ORACLE_HOME environment variable. In this case ORACLE_SID is not
set since no database exists.
3 Shut down the Oracle databases. There are none to shut down.
4 Stop all listener processes. Check for listener processes. ps -ef | grep
tnslsnr. None have been configured yet. If you had, you would stop it
using lsnrctl utility. This utility is in the $ORACLE_HOME/bin directory.
9 In the Specify file locationsscreen the installer asks you to specify a name
and a path. The path must be the value of the ORACLE_HOME
environment variable.
Post-Installation Tasks | 59
10 The installer displays a dialog box asking you to run root.sh script as root
and to resume installer execution after the script terminates.
Configuration
Create a Database
This process is essentially the same as that described for the Windows platform.
On Linux the Database Configuration Assistant binary is called dbca and is
located in the bin directory that you just added to the PATH environment
variable. For this exercise the SID name is r10103. The ps -ef output shows
a number of processes whose names end with _r10103.
You will notice that the *:/app/oracle/product/10.1.0/Db_2:N line in the
/etc/oratab has been changed to r10103:/app/oracle/product/10.1.0/Db_2:N.
Modify this file to change the third field from N to Y. This will cause the
dbstart utility to restart the database after a system reboot.
3 $ sqlplus “/ AS SYSDBA”
4 @?/rdbms/admin/utlrp.sql
Create a Listener
This process is essentially the same as that described for the Windows platform.
On Linux the Net Configuration Assistant binary is called netca and is located
in the bin directory that you just added to the PATH environment variable.
The default name for the first listener is LISTENER. The ps -ef output displays
a string that includes bin/tnslsnr LISTENER -inherit.
Configuration | 61
!#/bin/sh########################################## RHEL 3.0 and
Oracle 10.1.0# autostart oracle database and listen
er########################################## Comments to support
chkconfig on RedHat Linux# chkconfig: 2345 64 36# description:
starts and stops the database and the listenerORA_HOME=/app/or
acle/product/10.1.0/Db_2ORA_OWNER=oracleif [ ! -f /app/or
acle/product/10.1.0/bin/dbstart ]thenecho "Oracle Auto Startup:
CANNOT START"exitfi case "$1" in'start')su - oracle -c "/app/or
acle/product/10.1.0/DB_2/bin/dbstart &"su - oracle -c "/app/or
acle/product/10.1.0/DB_2/bin/lsnrctl start listener";;'stop')su -
oracle -c "/app/oracle/product/10.1.0/DB_2/bin/dbshut &"su - or
acle -c "/app/oracle/product/10.1.0/DB_2/bin/lsnrctl stop";;esac
Introduction
What follows is a detailed description of the installation and configuration
of a runtime version of an Oracle client on a linux x86 (RHEL3) machine. The
runtime version is one of four installation types (instant, administrator,
runtime, and custom).
4 Click PDF next to the B12091-02 part number. The document title is
Oracle Database Client Quick Installation Guide 10g Release 1 (10.1.0.3) for
Linux x86
1 Go to http://www.oracle.com/database/index.html
3 Click Oracle Database 10g Release 1 (10.1.0.3) Client for Linux x86
4 Click the checkbox labeled YES, I accept the License Terms and Export
Restrictions and I acknowledge that I have reviewed and understood the
agreement and agree to use the language I selected in entering into this
agreement.
5 Click I Accept underneath the text box containing the licence agreement.
This takes you to
http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/linuxsoft.html
Installation | 63
6 Click ship.client.lnx32.cpio.gz which is located under the label Oracle
Database 10g Client Release 1 (10.1.0.3) for Linux x86. This will download
the file to your Linux machine into your home account.
9 yourAccount> su - root
17 root> su - oracle
18 oracle> ORACLE_BASE=/app/oracle
20 oracle> TEMP=/tmp
21 oracle> TMPDIR=/tmp
Preliminary Steps
The steps for checking the software and hardware requirements, for creating
the required UNIX group and user, for setting up the Oracle base directory,
and configuring the Oracle user’s environment are the same as for installing
an Oracle database.
1 oracle> Disk1/runInstaller
3 Click Next to go to the Select Installation Type screen. For this exercise
the Runtime installation type was selected.
4 Click Next to go to the Summary screen. Review the list of products that
will be installed.
6 The installer ran the Oracle Net Configuration Assistant. Click Finish.
NOTE This step creates a sqlnet.ora file where the value (TNSNAMES,
EZConnect) is assigned to the NAMES.DIRECTORY_PATH parameter.
7 The installer halted to request that a script be run as root. The dialog
displayed the following message. A configuration script needs to be run
as root before installation can proceed. Leaving this window open, open
another window and run ‘/app/oracle/oraHome_1/root.sh as root, then
return to this window and click OK to continue. This script writes three
files, dbhome, oraenv, and coraenv to /usr/local/bin. It also writes an entry
in /etc/oratab. This entry specifies that no databases should be brought
up at system reboot time.
Configuration
Configuration | 65
Add a Local Name Service
Run the Oracle Net Configuration Assistant. The name of the executable is
netca, and it is in the bin directory. The assistant prompts you to define a
service name, a network protocol, a host name, and a port. With this
information, it creates an entry for the service name in the tnsnames.ora file
1 Click the radio button labeled Local Net Service Name Configuration.
Click Next.
3 In the text box labeled Service Name type the Global Database Name of
the target Oracle instance. For this exercise the service name is
r10102.ads.autodesk.com. Click Next.
5 In the text box labeled Hostname type the fully qualified name of the
host where the Oracle instance is located. The port value is 1521 by
default. Click Next.
7 By default the text box labeled Net Service Name contains the root of the
service name, that is, the characters preceding the dot (.) signaling the
start of the domain name part. For this exercise this value is r10102. Click
Next.
Connected.
SQL>
‘R10102’ is the net service name in the tnsnames.ora file. ‘test’ is the password
for the ‘sys’ account in the Oracle instance on the XP machine.
Installation
This describes the installation of SQL Server client tools on a Windows XP
system. Do the following.
1 Insert the Microsoft SQL Server 2000 Enterprise Edition CD into the drive.
NOTE A warning dialog will appear. Microsoft SQL Server 2000 Enterprise
server component is not supported on this operating system. Only client
components will be available for installation.
5 Use the default action (Create a new instance of SQL Server or install
Client Tools).
1 Click Enterprise Manager in the Microsoft SQL Server menu. The menu
path is Start ➤ Programs ➤ Microsoft SQL Server.
2 Click the + to expand the node labeled Microsoft SQL Servers in the
Console Root pane.
3 Click New SQL Server Registration from the pop-up menu accessed by
right-clicking on the SQL Server Group node in the Console Root pane.
As a result the Register SQL Server Wizard window is displayed. Click
Next.
4 Select a server from the list of available servers and click Add. Click Next.
6 Accept the default. This adds the server that you selected to the default
server group called SQL Server Group. Click Next. Click Finish. A dialog
is displayed saying that the registration has been completed.
Connection
The name of the SQL Server that you added is the value that you will use for
the Service connection property. You can connect to the SQL Server that you
added by just setting the Service connection property because you specified
Windows Authentication during the configuration procedure. The connection
will not succeed unless your windows account name has been added as a new
login to the remote server.
Installation
This topic describes installation of the Developer Edition from a CD. You must
install .NET Framework 2.0 first. Then do the following.
NOTE During initialization the installer complained that it could not find an
application to open the splash.hta file. A google on ‘splash.hta’ yielded the
suggestion to try C:\WINDOWS\system32\mshta.exe. This worked.
2 Select the components to install. For this exercise datbase services, analysis
services, and workstation components were installed. Reporting Services,
Notification Services, and Integration Services were not.
5 Select the services to be started upon completion of the setup. SQL Server
and Analysis Services were chosen.
7 Select the collation setting. The default SQL Collation was left selected.
This is described as dictionary order, case-insensitive, for use with 1252
Character Set.
■ Analysis Services
■ SQLXML4
■ Workstation Componnents
NOTE The first installation failed to install all of the expected tools. The second
installation succeeded after uninstalling the SQL Server Mobile Edition that had
been installed by the Visual Studio 2005 installer.
Connection
Use the SQL Server Management Studio to connect to a SQL Server. Before
you can connect, your database administrator must add your Windows account
to the server as a login account. Do the following.
1 Click SQL Server Management Studio in the Microsoft SQL Server 2005
menu. The menu path is Start ➤ Programs ➤ Microsoft SQL Server 2005.
3 There are three spinboxes labeled Server type, Server name, and
Authentication. The server type was set to Database Engine. The
authentication was set to Windows Authentication. The server name had
to be set to that of a known SQL Server 2005 server.
4 Click Connect. The result is that the components of the named server
are displayed in the Object Explorer.
System Requirements
Software
The following table maps the various providers to the operating system and
RDBMS versions against which they have been tested (T). The RDBMS-based
providers (ArcSDE and MySQL) require that the corresponding RDBMS client
is installed. The ODBC provider requires that an ODBC driver be installed on
Linux. Windows XP contains the required ODBC drivers.
FDO and its Providers run on the Windows Vista operating system. However,
Autodesk cannot guarantee that the underlying file or database that an FDO
Provider is connecting to is Vista compatible (except for the Autodesk Spatial
Data File format, SDF). Please consult the file or database vendor to verify Vista
compatibility.
71
WXP=Windows XP Pro; W2K=Windows 2000 Pro; W2K3=Windows 2003 Server
SDF T T T T n/a 4
SHP T T T T n/a
WFS T T T T n/a 5
WMS T T T T n/a 6
NOTE
1 The ArcSDE 9.1 client and ArcSDE 9.1 server for Oracle and ArcSDE 9.1
server for SQL Server are required.
3 The MDAC 2.8 ODBC driver manager is tested on Windows for access to
all of the named data sources. The intent is to test the new Oracle ODBC
driver for read-only access on Linux in the near future.
4 File formats 3.0 and 3.2 are supported. An SDF file can have only one
schema.
Windows
This table shows the disk space/memory requirements for the RDBMS clients.
Component D M N
NOTE
1 The ArcSDE client disk size is reflected in the total, but the memory size
would be included in that of the running FDO application.
Linux
This table shows the disk space/memory requirements for the RDBMS clients.
Component D M N
Feature Matrix
The main features for Commands, Schema Capabilities, and Tools and Setup
of the FDO API are listed in the table . “Y” means the command or attribute
is supported in that particular provider.
NOTE The features are described in the Feature Description on page 7 section.
Commands
Connection Y Y Y Y Y Y Y Y
List Datastores Y Y
Create Datastore Y Y Y
Destroy Datastore Y Y Y
Describe Schema Y Y Y Y Y Y Y Y
Apply Schema Y Y Y
Destroy Schema Y Y
Select Y Y Y Y Y Y Y Y
Select Aggregates Y Y Y Y Y Y Y Y
Insert Y Y Y Y Y
Update Y Y Y Y Y
Delete Y Y Y Y Y
SQL Command Y Y Y Y
Transactions Y
Locking Y
Long Transactions Y
Schema Capabilities
Schema Overrides Y Y Y Y Y
Foreign Schemas Y Y
Associations Y Y Y
Inheritance Y Y Y Y Y Y Y
Feature Matrix | 75
Feature Arc- My ODBC SDF SHP WFS WMS GDAL
SDE SQL
Object Properties Y Y
XML Configuration Y Y Y
Connection API
The following table shows the connection properties for each provider. “T”
means true, and “F” means false. For important details, refer to the associated
Notes.
Provider/Properties DV R P FN FP D E Notes
OSGeo.ArcSDE.3.0
Server T F F F F F 1
Instance T F F F F F 2
Username T F F F F F 3,4
Password T T F F F F 3,4
Datastore F F F F T T 5,6
Provider/Properties DV R P FN FP D E Notes
OSGeo.MySQL.3.0 7
Username T F F F F F 8
Password T T F F F F 8
Service T F F F F F 9
DataStore F F F F T T 10
OSGeo.ODBC.3.0 11
DataSourceName F F F F F T 12
UserId F F F F F F 13
Password F T F F F F 13
ConnectionString F F F F F F 14
GenerateDefaultGeo- True F F F F F F
metryProperty
OSGeo.SDF.3.0 15
File T F T F F F 16
ReadOnly False F F F F F T 17
OSGeo.SHP.3.0
DefaultFileLocation F F T F F F 18
Connection API | 77
DV=Default Value; R=Required; P=Protected; FN=FileName; FP=FilePath; D=Datastore;
E=Enumerable
Provider/Properties DV R P FN FP D E Notes
TemporaryFileLocation F F T F F F 19
OSGeo.WFS.3.0
FeatureServer T F F F F F 20
Username F F F F F F
Password F F F F F F
OSGeo.WMS.3.0 21
FeatureServer T F F F F F
Username F F F F F F
Password F F F F F F
DefaultImageHeight F F F F F F
2 The value of the Instance property defines the port and protocol to use
when communicating with the ArcSDE server. This instance name must
be mapped to the TCP/IP listen port used by the Server to accept
connection requests. This mapping is stored in the
C:\WINDOWS\system32\drivers\etc\services file and has the form
"instance_name portnum/protocol # comment". For example,
"esri_sde_oracle 5151/tcp #ArcSDE Server listening port". There
can be multiple instances because the server can connect to multiple
back-end database technologies, for example, both Oracle and SQL Server.
3 You must create the username and password from the sqlplus
command-line when FDO Provider for ArcSDE is using Oracle as the
back-end database technology. This is described in topic Create a
Username and Password for the ArcSDE Provider Connected to Oracle
on page 81.
4 You must create the username and password from the Enterprise Manager
when FDO Provider for ArcSDE is using SQL Server as the back-end
database technology. This is described in topic Create a Username and
Password for the ArcSDE Provider Connected to SQL Server on page 81.
5 When FDO Provider for ArcSDE is using Oracle as the back-end database,
the value of DataStore is always 'Default Datastore'.
6 When FDO Provider for ArcSDE is using SQL Server as the back-end
database, the value of DataStore is one of the values in the list of databases
supported by that instance of the SQL Server.
9 The value of the Service property is localhost for a local connection and
a valid domain name for a remote connection. A firewall at the remote
end can prevent a connection from succeeding. However, note that the
exception message will not tell you that this is the cause.
Connection API | 79
to the provider. This is described in topic Open a Pending Connection
on page 16.
11 You cannot use the ODBC provider either to create or destroy a feature
schema. The provider will interpret numeric fields named X and Y to
contain coordinate data; otherwise you must supply it with an xml file
that tells it which column is X and which column is Y. With one
qualification, you can use the provider to insert, update, and delete
features in the data store; you cannot delete features in an Excel-based
data store. See the topic Overview of the Connection Propertiesfor an
overview of the use of ODBC connection properties.
16 This is a file name. The named file is in the local file system.
3 sql> grant connect, resource, select any table, insert any table,
update any table, delete any table to username;
Create a Username and Password for the ArcSDE Provider Connected to Oracle | 81
added to a database with privileges, db_ddladmin, db_datareader, and
db_datawriter.
1 On the Windows Start menu, click Programs, click Microsoft SQL Server,
click Enterprise Manager.
3 In the SQL Server Login Properties - New Login dialog box, click the tab
labeled General, type name in the text entry box labeled Name, click the
radio button labeled SQL Server Authentication, type a password in the
text entry box labeled Password.
4 Click the tab labeled Server Roles, click the check-box labeledDatabase
Creators
5 Click the tab labeled Database Access, click the check-box in the column
labeled Permit next to the name of the database to which you are adding
this user, click the check-boxes in the column labeled Permit in Database
Role next to the labels db_ddl_admin, db_datareader, and db_datawriter.
7 In the Confirm Password dialog box, type password in the text entry box
labeled Password, click OK.
8 In the SQL Server Login Properties - New Login dialog box, click OK.
1 On the Windows Start menu, click Settings, click Control Panel, click
Administrative Tools, click Data Sources (ODBC). The ODBC Data Source
Administrator dialog box is displayed.
2 In the Data Source Administrator dialog box, click the User DNS tab if
you want the data source to be visible only to you on this machine, or
click the System DSN tab if you want the data source to be visible to
others on this machine and on the network. Click Add. The Create New
Data Source dialog box is displayed.
NOTE You may not use the File DSN tab, because Fdo does not support its
use.
4 In the ODBC Microsoft Access Setup dialog box, in the text entry box
labeled Data Source Name , type the name for the data source that you
want to use as the value of the DSN parameter in the connection string,
click Select. The Select Database dialog box is displayed.
5 In the Select Database dialog box, browse to the folder where the MS
Access file is, select the file, and click OK.
1 On the Windows Start menu, click Settings, click Control Panel, click
Administrative Tools, click Data Sources (ODBC). The ODBC Data Source
Administrator dialog box is displayed.
2 In the Data Source Administrator dialog box, click the User DNS tab if
you want the data source to be visible only to you on this machine, or
click the System DSN tab if you want the data source to be visible to
others on this machine and on the network. Click Add. The Create New
Data Source dialog box is displayed.
NOTE You may not use the File DSN tab, because Fdo does not support its
use.
3 In the Create New Data Source dialog box, click Microsoft Access Driver
(*.mdb), click Finish. The ODBC Microsoft Access Setup dialog box is
displayed.
4 In the ODBC Microsoft Access Setup dialog box, in the text entry box
labeled Data Source Name , type the name for the data source that you
want to use as the value of the DSN parameter in the connection string,
click Select. The Select Database dialog box is displayed.
5 In the Select Database dialog box, browse to the folder where the MS
Access file is, select the file, and click OK.
1 On the Windows Start menu, click Settings, click Control Panel, click
Administrative Tools, click Data Sources (ODBC). The ODBC Data Source
Administrator dialog box is displayed.
2 In the ODBC Data Source Administrator dialog box, click the User DNS
tab if you want the data source to be visible only to you on this machine,
or click the System DSN tab if you want the data source to be visible to
others on this machine and on the network. Click Add. The Create New
Data Source dialog box is displayed.
NOTE You may not use the File DSN tab, because Fdo does not support its
use.
4 In this dialog box, in the text entry box labeled Data Source Name , type
the name that you want to use as the value of the DataSourceName
connection property.
5 In this dialog in the text entry box labeled TNS Service Name, type the
<SERVICE_NAME> found in the tnsnames.ora file.
NOTE If you type the User ID in all uppercase letters, you will be able to use
all lowercase or all uppercase letters for the UserID connection property value;
otherwise you will have to use all uppercase for that value.
7 In the ODBC Data Source Administrator dialog box, you see the DSN that
you just added listed. Click OK.
1 On the Windows Start menu, click Settings, click Control Panel, click
Administrative Tools, click Data Sources (ODBC). The ODBC Data Source
Administrator dialog box is displayed.
2 In the ODBC Data Source Administrator dialog box, click the User DNS
tab if you want the data source to be visible only to you on this machine,
or click the System DSN tab if you want the data source to be visible to
others on this machine and on the network. Click Add. The Create New
Data Source dialog box is displayed.
NOTE You may not use the File DSN tab, because Fdo does not support its
use.
3 In the Create New Data Source dialog box, click MySQL ODBC 3.51 Driver,
click Finish. The Connector/ODBC 3.51.12 dialog box is displayed.
4 In this dialog box, in the text entry box labeled Data Source Name , type
the name that you want to use as the value of the DataSourceName
connection property.
6 You can ignore text entry boxes labeled User and Password. You provide
that information using the Fdo UserId and Password connection
properties.
9 In the ODBC Data Source Administrator dialog box, you see the DSN that
you just added listed. Click OK.
1 On the Windows Start menu, click Settings, click Control Panel, click
Administrative Tools, click Data Sources (ODBC). The ODBC Data Source
Administrator dialog box is displayed.
2 In the ODBC Data Source Administrator dialog box, click the User DNS
tab if you want the data source to be visible only to you on this machine,
or click the System DSN tab if you want the data source to be visible to
others on this machine and on the network. Click Add. The Create New
Data Source dialog box is displayed.
NOTE You may not use the File DSN tab, because Fdo does not support its
use.
3 In the Create New Data Source dialog box, click SQL Server, click Finish.
The Create a New Data Source to SQL Server dialog box is displayed.
4 In this dialog box, in the text entry box labeled Name , type the name
that you want to use as the value of the DataSourceName connection
property.
5 In this dialog in the text entry box labeled Server, type the name of the
SQL Server that you want to connect to.
6 Click Next to go to the next screen where you see the network login Id
is used to verify the user’s identity.
8 Click Next to go to the next screen where you can change other
parameters.
9 Click Finish. The ODBC Microsoft SQL Server Setup dialog appears
showing the configuration parameter settings.
10 In this dialog click Test Data Source.... The SQL Server ODBC Data Source
Test dialog appears giving you test results. Click OK to close this dialog.
12 In the ODBC Data Source Administrator dialog box, you see the DSN that
you just added listed. Click OK.
Command Capabilities
The list of command class names is shown in the first table. For descriptions
of what the commands do, see the API reference documentation. The command
attributes are shown in the second table. For descriptions of what the attributes
mean, see entry for the FdoICommandCapabilities class in the API reference
documentation. “Y” means the command or attribute is supported in that
particular provider.
Command Class Name Arc- MySQL ODBC SDF SHP WFS WMS
SDE
FdoISelect Y Y Y Y Y Y
FdoISelectAggregates Y Y Y Y Y Y
FdoIInsert Y Y Y Y Y
FdoIDelete Y Y Y Y Y
FdoIUpdate Y Y Y Y Y
FdoIDescribeSchema Y Y Y Y Y Y Y
FdoIDescribeSchemaMapping Y Y Y
FdoIApplySchema Y Y Y
FdoIDestroySchema Y Y
FdoIActivateSpatialContext Y Y Y
FdoICreateSpatialContext Y Y Y
FdoIDestroySpatialContext Y Y
FdoIGetSpatialContexts Y Y Y Y Y Y Y
FdoICreateDataStore Y Y
FdoIDestroyDataStore Y Y
FdoIListDataStores Y
FdoICreateSDFFile Y
FdoISQLCommand Y Y Y
FdoIAcquireLock Y
FdoIGetLockInfo Y
FdoIGetLockedObjects Y
FdoIGetLockOwners Y
FdoIReleaseLock Y
Command Capabilities | 89
Command Class Name Arc- MySQL ODBC SDF SHP WFS WMS
SDE
FdoIActivateLongTransaction Y
FdoICommitLongTransaction Y
FdoICreateLongTransaction Y
FdoIDeactivateLongTransaction Y
FdoIFreezeLongTransaction
FdoIGetLongTransactions Y
FdoIRollbackLongTransaction Y
FdoICreateSpatialIndex Y
FdoIDestroySpatialIndex Y
FdoIGetSpatialIndexes Y
NOTE The capability to create and destroy a data store is associated with the
capability to create and destroy a feature schema. To create a data store you specify
values for data store properties. For more information about these properties are
discussed in Data Store Management API on page 19.
Parameters Y
Timeout
SelectExpressions Y Y Y Y
SelectFunctions Y Y Y Y Y
SelectDistinct Y Y Y Y Y
SelectOrdering Y Y Y Y
SelectGrouping Y Y
User Management
In the open source release there is no API for this functional domain. Before
you can connect to your own database account using MySQL or ArcSDE
provider , someone with the requisite privileges must create that account for
you. The following topics show the commands used to create accounts and
perform other user-related operations.
MySQL
The following table maps a set of user-related operations expressed as
pseudo-API calls to the SQL commands that perform them.
User Management | 91
Operation MySQL Notes
2 To confirm the results of this command, execute the SQL command that
maps to the pseudo-API callShowPrivileges(user).
3 You can get the same information from the FdoIListDatastores command.
4 If you are connected to MySQL and you created the user with AddUser,
USAGE is shown as the privilege.
5 All users in a particular data store are listed along with the privileges that
they have in the data store.
8 This command grants the specified privilege to that user for the named
data store. The MySQL provider does not allow you to grant any privilege
other than those assigned by a call to GrantAccessToDatastore(user,
datastore). To verify the result execute the SQL command that maps to
the pseudo-API call ShowAccessToDatastore(user, datastore).
9 This command revokes the specified privilege from that user for the
named data store. If the role is set to ‘*’, the provider revokes all privileges
in the data store from the user. To verify the result execute the SQL
MySQL | 93
command that maps to the pseudo-API call ShowAccessToDatastore(user,
datastore).
10 This command revokes the specified role or privilege. To verify the result
execute the SQL command that maps to the pseudo-API call
ShowPrivileges(user).
Provider/Properties DV R P FN D E Notes
OSGeo.MySQL.3.0
DataStore T F F T F 1
Description F F F F F
NOTE
1 A data store is a container in the data source to which you can apply a
feature schema.
2 A static extent type means that the extent is defined at the time of the
creation of the spatial context using the FdoICreateSpatialContext
command. A dynamic extent type means that the extent may change as
features are added so that it always encloses all of the features.
3 The default extents expressed in AGF text format for the various providers
are as follows:
■ MySQL, : POLYGON ((-2000000 -2000000, 2000000 -2000000, 2000000
2000000, -2000000 2000000, -2000000 -2000000))
6 ArcSDE and MySQL providers can have multiple spatial contexts defined
and can, therefore, show contexts in the reader that are not active.
Exception Messages | 97
98
Installing RDBMS Clients
Used By The Open
Source Providers
5
Introduction
The operation of the ArcSDE provider requires the installation of an ArcSDE
client on the same machine. This chapter describes the installation of an ArcSDE
9.1 client on Windows XP and Linux x86.
The operation of the MySQL provider requires the installation of an MySQL
client on the same machine. This chapter describes the installation of a MySQL
5.0 database (server and client) on Windows XP and Linux x86.
The operation of the ODBC provider on Linux x86 requires the installation of
an ODBC driver manager as well as ODBC provider-specific drivers. No
installation is required on XP because XP is installed with the requisite software.
This chapter describes the installation of the unixODBC driver manager and
the Easysoft ODBC Oracle driver.
99
Installing and Configuring an ArcSDE Client
on Windows
Installation
You must purchase the ArcSDE 9.1 client SDK from an ESRI vendor. There are
instructions on how to purchase the client at
http://www.esri.com/software/arcgis/arcsde/how-to-buy.html.
Follow the instructions that come with the SDK to install the client to a folder
outside of the FDO distribution. Make sure that the folder containing the
following DLLs is visible in the %PATH% environment variable .
■ pe91.dll
■ sde91.dll
■ sg91.dll
Configuration
Before you can complete the configuration of the client on the local machine,
you must install and configure the ArcSDE server to which the client will
connect. An ArcSDE client does not have to be the same version as the ArcSDE
server. Connecting an ArcSDE 9.0 or 9.1 client to an ArcSDE 8.3 server has
been tested. Not all possible configurations are known.
It is possible for an ArcSDE client to connect directly to an Oracle or SQL
Server database provided the required drivers are installed. This type of ‘direct’
connection has not been tested with the ArcSDE Provider, and so is not
supported.
An ArcSDE server connects to only one kind of RDBMS. The ArcSDE Server
for Oracle can connect to an Oracle database and the ArcSDE Server for SQL
Server can connect to a Sql Server database. There are post-installations actions
that you must take to create ArcSDE-specific tables in the target RDBMS before
you can connect to the “ArcSDE-aware” database.
When you install an ArcSDE server, you configure it to listen on a port for
database connect requests. Each ArcSDE server listens on its own dedicated
listener port.
100 | Chapter 5 Installing RDBMS Clients Used By The Open Source Providers
The ArcSDE client needs to know the number of the server’s listener port and
the protocol to use for sending requests to that port. The listener port and
protocol is what the ArcSDE client needs to get from the ArcSDE provider in
order to connect to the ArcSDE server. The ArcSDE provider API requires that
the user put this information in the Instance connection property. The user
can provide the information either directly or indirectly.
The direct way is simply the listener port and protocol. The syntax is
“<port>/<protocol>”, for example, “5151/tcp”.
The indirect way is a symbolic name, for example, “esri_sde_oracle.” The
ArcSDE provider translates the symbolic name into a port and protocol by
looking the symbolic name up in the
C:\WINDOWS\System32\drivers\etc\services file. An example of an entry in
the services file is esri_sde_oracle 5151/tcp.
You must also create usernames and passwords in each of the databases that
you plan to connect to. You or your database administrator must connect to
the database using an account with sufficient privileges to create a new user
account and to grant the appropriate privileges to the new user.
Installation
You must purchase the ArcSDE 9.1 client SDK from an ESRI vendor. There are
instructions on how to purchase the client at
http://www.esri.com/software/arcgis/arcsde/how-to-buy.html.
Follow the instructions that come with the SDK to install the client to a
directory outside of the Fdo distribution. Make sure that the folder containing
the following shared objects is visible in the LD_LIBRARY_PATH environment
variable .
■ libpe91.so
■ libsde91.so
■ libsg91.so
Installation
Install the MySQL database, which includes the client as well as the server.
Download a Windows (x86) installer of the latest production release of MySQL
5.0 from http://dev.mysql.com/downloads/mysql/5.0.html. Do a ‘typical’ install
to the default location (C:\Program Files\MySQL\MySQL Server 5.0).
The install wizard does not configure MySQL. At the conclusion of the
installation procedure, you are given the option of continuing with
configuration or leaving that step to later. If you decide to continue, you
simply click the Finish button, which triggers the launch of the configuration
wizard. If you decide to configur later, you invoke the MySQL Server Instance
Config Wizrd by following the menu path Start > Programs > MySQL > MySQL
Server 5.0.
Configuration
The configuration wizard presents you with the following configuration
defaults. Go with the defaults except where noted otherwise.
1 Detailed Configuration
2 Multifunctional Database
102 | Chapter 5 Installing RDBMS Clients Used By The Open Source Providers
7 Use UTF-8 instead of the Standard Character Set
9 Modify Security Settings (you must provide a root password (twice) and
if you deinstalled an existing MySQL database, you must provide a current
password)
You may optionally request that the bin directory be added the the Windows
PATH environment variable. Do so. The wizard will add that directory to the
end of %PATH%. The bin folder contains the libmysql.dll used by the MySQL
provider.
NOTE If you have PHP installed on your machine, make sure that C:\Program
Files\MySQL\MySQL Server 5.0\bin precedes the PHP path in the PATH environment
variable. The PHP installation contains a copy of the libmysql.dll and it is important
for the operation of the MySQL provider that the correct DLL is used.
NOTE If you enabled remote root access when you installed MySQL, you can
create user accounts by way of a remote connection. Otherwise, you will have to
connect locally in order to create a user account.
You can use the Fdo Data Store Management API to create a data store.
Configuration | 103
Installing and Configuring the MySQL on Linux
Installation
Install the MySQL database, which includes the client as well as the server.
Download a Linux x86 non RPM package Standard version (gzipped tarfile)
containing the latest production release of MySQL 5.0 from
http://dev.mysql.com/downloads/mysql/5.0.html. At the time of the writing of
this document the latest version is 5.0.22 compiled with glibc-2.2.
Follow the installation instructions in the reference manual accessible at this
URL http://dev.mysql.com/doc/refman/5.0/en/index.html. Click on 2. Installing
and Upgrading MySQL. Click on 2.8 Installing MySQL on Other Unix-Like
Systems.
NOTE The sequence of shell commands specified at the beginning of this section
are executed with root privileges.
Configuration
Configuration consists of setting up the mysql server as a service and of setting
passwords for the 2 root and 2 anonymous accounts.
Return to the page containing the table of contents for Chapter 2. Click on
2. Installing and Upgrading MySQL. Click on 2.10.2 Unix Post-Installation
Procedures. Scroll down to the paragraph whose first sentence is If you install
MySQL from a source distribution or using a binary distribution format that
does not install mysql.server automatically, you can install it manually. and
read to the line containing the shell command shell> chkconfig --add
mysql.
Verify that chkconfig has written the correct entries to the /etc/rc*.d directories.
104 | Chapter 5 Installing RDBMS Clients Used By The Open Source Providers
Return to the page containing the table of contents for Chapter 2. Click on
2. Installing and Upgrading MySQL. Click on 2.10.3 Securing the Initial MySQL
Accounts. Follow the instructions for securing the 2 root and 2 anonymous
accounts.
NOTE If you get an error message like ERROR 2003 (HY00): Can’t connect to
MySQL server on ‘<hostname>’ (<somenumber>) when setting the password for
the ‘’@’<hostname>” or the ‘root’@’<hostname>’ account, verify that the IP address
that <hostname> maps to in the /etc/hosts file is correct.
You can use the Fdo User Manager API to create a user account with the usage
privilege if you are using the enterprise version of FDO. Otherwise you can
use the 2 SQL commands, create user <user> identified by ‘<password>’
and grant select, insert, update, delete, create, create view, drop,
index, alter on *.* to ‘<user>’@’%’ identified by ‘<password>’. In
either case you must be connected as a user, for example, root, with the grant
privilege. The value <user> can be ‘<username>’@’localhost’ if the connection
local, or it must be ‘<username>’@’,hostname.’ if the connection is remote.
The value of <hostname> is <host label>.<domain name>, for example,
someComputer.someCompany.com.
NOTE If you enabled remote root access when you installed MySQL, you can
create user accounts by way of a remote connection. Otherwise, you will have to
connect locally in order to create a user account.
You can use the FDO Data Store Management API to create a data store.
1 ./configure --prefix=/usr/local/unixODBC
106 | Chapter 5 Installing RDBMS Clients Used By The Open Source Providers
Index
A FDO Provider for SDF 5, 19, 21, 77, 80
FDO Provider for SHP 5, 77
API 17–18, 21, 30, 35, 79 FDO Provider for SQL Server 6, 19–21,
capabilities 17 30, 38, 42, 44–45
spatial context 21 FDO Provider for WFS 4, 6, 78
user management 18, 30, 35, 79 FDO Provider for WMS 6, 78
ArcSDE client 25, 72–74, 99–101 FdoIActivateSpatialContext 21
Installing on Linux 101 FdoICommandCapabilities 19
Installing on Windows 100 FdoICreateDataStore 19, 21
ArcSDE server 72, 79, 100 FdoICreateSpatialContext 21, 44, 96
FdoIDestroyDataStore 19, 21
FdoIDestroySpatialContext 21
C FdoIGetSpatialContexts 21
Capabilities API 17 FdoIListDataStores 19, 21
capabilities, command 18 FdoUserManager 18, 35, 39, 93
connection properties 21, 28, 44, 76,
79, 97 M
memory management 25–26, 73
D Method 36–41, 45, 91–93, 97
data store 2, 19, 21, 34, 43, 90, 94 AddUser 40, 93
Data Store Management API 19, 31 GetDbUsers 36, 39, 41, 91, 93
data store, create or destroy 19, 21 GetRolesOrPrivileges 37, 92, 97
documentation 13 GrantAccessToDatastore 37, 39–41,
45, 92–93, 97
RevokeAccessToDatastore 38, 41,
E 92
RevokeRoleOrPrivilege 38, 92
Easysoft ODBC Oracle driver 99 SupportsDataStoreGrants 38
SupportsWindowsAuthentication 38
F Microsoft Access 72, 80, 84–87
Microsoft Excel 72, 80
FDO provider 1, 5 MySQL client 99, 102, 104
FDO Provider for ArcSDE 5, 21, 76, 79, Installing on Linux 104
96, 99 Installing on Windows 102
FDO Provider for MySQL 5, 19–21, 38, MySQL database 39, 73–74, 79, 93, 99
77, 92, 94, 96–97, 99
FDO Provider for ODBC 5, 77, 99
FDO Provider for Oracle 6, 18–21, 38,
O
41, 43–44 ODBC 105
FDO Provider for Raster 6, 29, 44 Installing on Linux 105
Index | 107
ODBC data source 30, 83–87 Service 29–30, 77, 79
Open Source Geospatial Foundation 5 TableSpace 42–43
Oracle 23–24, 71 TemporaryFileLocation 78, 80
Oracle database 25–26, 79 UserId 77
Oracle user 39 Username 29–30, 76–78
P R
privileges, MySQL 41, 94, 97 Raster 24, 72
privileges, SQL Server 39–41, 79, 93–94 RDBMS 5, 19, 23, 71
Property 29–31, 40, 42–44, 76–80, 94, roles, Oracle 39, 41, 93–94
97
ConnectionString 77
DataSourceName 77
S
Datastore 76 Spatial Context API 21
DataStore 29, 31, 40, 42, 44, 77, 79, spatial context properties 43, 94
94, 97 SQL command 19
DefaultFileLocation 77, 80 SQL Server 24, 72
DefaultImageHeight 78 SQL Server database 23, 30–31, 79
DefaultRasterFileLocation 29 SQL Server user 39
Description 42, 94
FeatureServer 78
File 77 U
GenerateDefaultGeometryProperty77
Instance 76, 79 User Management API 18, 30, 35, 79
LockMode 42–43
LtMode 42–43 W
Password 29–30, 42, 76–78
ReadOnly 77 Web Feature Service 72
Server 76, 79 Web Map Service 72, 96
108 | Index