ArcSDE10.1 database after direct connection

Source: Internet
Author: User

Blog Park account registration for more than a year, to a programming rookie role, from a lot of Bo friends to learn a lot of articles, solve a lot of trouble, thank you! Today also finally summon up the courage to apply for a blog, will own learning and project experience and Bo friends to share, hope to be helpful to everyone! -----------learn from each other----------

I've been busy with the two development issues of the arcengine (. NET Framework), during which the SDE connected to the Oracle database was used, and the ArcGIS series software was known, ESRI has introduced the SDE Direct database method after ArcGIS10.1 (of course, the traditional SDE connection to the database can still be used, how to do this one can ask Niang, or look at the ArcGIS Help document), our project is also a direct link, in the code we still use the traditional way to access SDE database, as a result, the problem arises! --sde not Running on server--that's the problem! Troubled for a long time, browse the ARCSDE help documentation, the official explanation is to restart the SDE service or to take a direct connection, this is not equal to say, after thinking, the assertion must be the problem of the string! In the case of asking a brother, finally found a solution in a forum! There are two ways to connect, share to everyone. (Mostly connected to Oracle database)

One, the first way

Server: Name or IP (can not be filled)
INSTANCE: Sde:oraclexx: Database listener name
Database: Names of databases to connect to (can not be filled)
Username: User name (preferably with SDE user)
Password: password

1 1Ipropertyset Ppropset =NewPropertysetclass (); 2 2Ppropset. SetProperty ("Server",NULL); 3 3Ppropset. SetProperty ("INSTANCE","sde:oracle11g:xxxx"); 4 4Ppropset. SetProperty ("USER","SDE"); 5 5Ppropset. SetProperty ("PASSWORD","SDE"); 6 6Ppropset. SetProperty ("DATABASE","SDE"); 7 7Ppropset. SetProperty ("VERSION","SDE. DEFAULT"); 8 8Iworkspacefactory Fact =NewSdeworkspacefactoryclass (); 9 9Ifeatureworkspace Workspace = (ifeatureworkspace) fact.open (Ppropset,0);
View Code

One, the second way

Server: Name or IP (can not be filled)
INSTANCE: Sde:oraclexx
database: Names of databases to connect to (can not be filled)
Username: user name (preferably with SDE user)
Password: password @ Database listener name

1Ipropertyset ppropset=NewPropertysetclass (); 2Ppropset.setproperty ("INSTANCE","sde:oracle11g"); 3Ppropset.setproperty ("USER","SDE"); 4Ppropset.setproperty ("PASSWORD","[email protected]"); 5Ppropset.setproperty ("DATABASE","SDE"); 6Ppropset.setproperty ("VERSION","SDE. DEFAULT"); 7Iworkspacefactory Fact =NewSdeworkspacefactoryclass (); 8Ifeatureworkspace Workspace = (ifeatureworkspace) fact.open (Ppropset,0);
View Code

I almost solved this, hoping to help you!!!

ArcSDE10.1 database after direct connection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.