Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm new to this SDE stuff and would like to know the best way to cleanly delete an SQL Server database in order to delete the SDE geodatabase. Is it as easy as right clicking on the database in SQL Server and hitting delete? Or is there a more preferred way to do this?

Also, is there a way to rename the SQL server database that the SDE geodatabase is using? Or is it best to just start fresh with a new database?

Thanks in advance.

share|improve this question
    
You need to 'kill' all connections first - help.arcgis.com/en/geodatabase/10.0/admin_cmds/support_files/… Then Shutdown. or SDE persists connections. –  Mapperz Feb 22 '13 at 21:56
    
Whenever I try a command it returns "Entry for SDE instance not found in service file, Unable to get instance configuration" –  ian Feb 22 '13 at 22:14
    
The sde database is SQL db. And the SQL db is the sde db. The schema with triggers and other internal relates are what make it sde gdb. This can ALL operate now without sde installed via direct connect. –  Brad Nesom Feb 23 '13 at 5:04
    
But in order to do versioning, SDE is required, right? –  ian Feb 23 '13 at 5:22
add comment

1 Answer 1

up vote 4 down vote accepted

Until ArcSDE 10.0 you need to install ArcSDE on the server. You have two possibilies to connect to the Server: Direct Connect or Application Server.

If you configured the DB for application server connections you had to create an sde service. In that case you have to do the following steps to delete the SDE-DB in SQL Server:

  • kill all connections to the SDE DB (using sdemon)
  • delete the ArcSDE service (sdeservice -o delete)
  • remove a keyword from the Windows registry (sdeservice -o unregister -r ADMIN_DATABASE -d SQLSERVER -v SDE) -v is the name of your DB and have not to be SDE
  • remove the entry in the sde and windows service files (%windir%\system32\drivers\etc\services and %SDEHOME%\etc\services.sde)
  • drop the database in SQL Server (e.g. right clicking on the database in SQL Server Management Studio)

If you configured the DB for direct connect you don't need the sde service. And if you have no service created, you just need to drop the database in SQL Server.

As Brad Nesom mentioned, with ArcSDE 10.1 you don't have to install ArcSDE on the Server if you use direct connect. You don't even need to install the ArcSDE command line tools on the server, since you have the most necessary management tools in ArcCatalog and ArcToolbox 10.1. There is a good post to this topic by Russell Brennan (from ESRI): http://forums.arcgis.com/threads/57375-Why-would-I-install-ArcSDE-with-10.1

It is much cleaner and faster to start fresh with a new database and to load the data from the old database into the new database, than to rename the database in SQL Server.

share|improve this answer
    
Thanks, this helped a lot! –  ian Apr 12 '13 at 13:41
    
Could you explain how to "drop" the database in SQL Server? I have the Management Studio opened and when I right click on a database I see the open to "delete" but not drop. Where do I find the drop command? And what exactly does drop do? Or is delete the same as drop within Management Studio? –  ian Apr 12 '13 at 14:01
    
You are right. In Management Studio you have to right click on the database and click delete. Alternatively you can use the DROP DATABASE Command (T-SQL). –  Saleika Apr 12 '13 at 17:01
    
Thanks again, Saleika. –  ian Apr 16 '13 at 13:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.