Select to view content in your preferred language

Unable to delete ???file geodatabase???,

10122
19
Jump to solution
09-29-2013 10:55 AM
by Anonymous User
Not applicable
Original User: Jamal432@gmail.com

Unable to delete ???file geodatabase???,

I wanted to delete the file geodatabase but sounds not to work and got the message below knowing that this file goedatabase is a replica from the enterprise geodatabase ???N??? and from which the data is published by the ArcGIS server.

[ATTACH=CONFIG]27856[/ATTACH], [ATTACH=CONFIG]27857[/ATTACH]

What might be the issue then? why it is impossible to delete this file geodatabase?

To give a context for this problem, I???m frequently used to delete this file geodatabase (which is a replica from the enterprise geodatabase ???N???) due to the fact that some changes on the enterprise goedatabase are not reflected to the replica when synchronize (then the easiest way is to delete the old replica and to create a new one) such as :

1. If feature class added to the enterprise geodatabase then it is not added to the replica when synchronize

2. If a field is added to a feature class in the  enterprise geodatabase then this field is not added to its feature class in the replica

But originally, why do I need to create replica?

I publish the data from the replica (file geodatabase) but not from the enterprise geodatabase to gain some performance. If the data is published directly from the enterprise geodatabase then accessing the published data (services) gets quite slow.


Thank you

Best

Jamal
0 Kudos
19 Replies
JamalNUMAN
Legendary Contributor
I was referring to anyone else directly connected to your file geodatabase, not through the web services.  If these file geodatabases are only accessed by the web service, then stopping the web service should let you delete the file geodatabase.

I believe Zach was suggesting to delete the contents of the file geodatabase, then delete the empty geodatabase container.


Many thanks Leo,
I tried to delete the contents of the file geodatabase but again I�??m unable to delete some files (shown below)

[ATTACH=CONFIG]28473[/ATTACH], [ATTACH=CONFIG]28474[/ATTACH]

What might be the issue here?
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
by Anonymous User
Not applicable
Original User: nidhinkn

Jamal,

Try to delete the contents of File Geodatabase after stopping the services associated with ArcGIS Server in "Windows Services"

The other option is to use Task Manager, and select the ArcSoc.exe under processes and End Process.


Regards,
0 Kudos
MarcoBoeringa
MVP Alum
Jamal, as Nidhin suggested, you need to ensure no ArcGIS Server process is still using your file geodatabase. Your second screenshot in your last post here, clearly shows the ArcSOC.exe process, which is part of ArcGIS Server (see this Help page and specifically the topic "Processes started by the GIS server"), still keeping hold of your file geodatabase files.

So whatever you did to stop the relevant ArcGIS Server processes, something / some process (the ArcSOC.exe) is clearly still running and needs to be stopped before you can delete the remaining file geodatabase files.
0 Kudos
by Anonymous User
Not applicable
Original User: Jamal432@gmail.com

Jamal, as Nidhin suggested, you need to ensure no ArcGIS Server process is still using your file geodatabase. Your second screenshot in your last post here, clearly shows the ArcSOC.exe process, which is part of ArcGIS Server (see this Help page and specifically the topic "Processes started by the GIS server"), still keeping hold of your file geodatabase files.

So whatever you did to stop the relevant ArcGIS Server processes, something / some process (the ArcSOC.exe) is clearly still running and needs to be stopped before you can delete the remaining file geodatabase files.


Many thanks Nidhin and Marco for the help.

Stopping the ArcGIS SERVER makes it possible to delete the file geodatabase.

[ATTACH=CONFIG]28502[/ATTACH]

Best

Jamal
0 Kudos
JamalNUMAN
Legendary Contributor
Jamal,

Try to delete the contents of File Geodatabase after stopping the services associated with ArcGIS Server in "Windows Services"

The other option is to use Task Manager, and select the ArcSoc.exe under processes and End Process.


Regards,


Hi Nidhin,

I�??m again in trouble with the same issue. The ArcGIS Server is stopped but still unable to delete the file geodatabase (please, see screenshots below)

[ATTACH=CONFIG]29653[/ATTACH], [ATTACH=CONFIG]29654[/ATTACH]

What might be the issue?

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
by Anonymous User
Not applicable
Original User: nidhinkn

Make sure that none of the Feature class or tables are accessed by ArcGIS for Desktop. If this issue is specific to a particular machine, then you have to close ArcGIS for Desktop, clear(End task) ArcMap and ArcCatalog from Task Manager.
0 Kudos
by Anonymous User
Not applicable
Original User: MLF

You may also consider using multiple replicas, instead of one replica containing all of your replicated data.  My replicas are organized by data owner and/or function.  This way, if one replica fails or requires adjustment, it does not stop all replication.
0 Kudos
WilliamCraft
MVP Alum
I made this suggestion in a different-but-related post from earlier this month, but it may help if there happens to be a process lock on one or more of the files within your file geodatabase.

If you are still having issues with deleting a geodatabase on the file system despite the fact that the .lock files no longer exist, it's possible there is still a process lock on one or more of the files within it. That being said, if you're using Windows Server 2008 / Windows 7 or later you can try one of the following methods:

1. From the Start menu, type FSMGMT.MSC, then multi-select the files you want from the GUI, then right click them and chose "Close". That method should force close the files that are technically still open due to a process lock.

or

2. From a batch file, run the following (example is for a file geodatabase) to close a file named a00000225.gdbtable:

cd C:\this_server\directory\subdirectory
for /f "skip=4 tokens=1,2*" %%a in ('net files') do if %%b == C:\this_server\...\a00000225.gdbtable net file %%a /close


You can modify the command above to loop through all of the files in the file geodatabase to close them all rather than specify them individually, which would be tedious since there are so many.

From the command prompt, type NET FILES to see what the underlined text above should contain.

Remember that double percent characters are required for batch files (in other words, %% rather than %) but single percent characters are used when running the command outside of a batch script.
0 Kudos
by Anonymous User
Not applicable
Original User: Jamal432@gmail.com

I made this suggestion in a different-but-related post from earlier this month, but it may help if there happens to be a process lock on one or more of the files within your file geodatabase.

If you are still having issues with deleting a geodatabase on the file system despite the fact that the .lock files no longer exist, it's possible there is still a process lock on one or more of the files within it. That being said, if you're using Windows Server 2008 / Windows 7 or later you can try one of the following methods:

1. From the Start menu, type FSMGMT.MSC, then multi-select the files you want from the GUI, then right click them and chose "Close". That method should force close the files that are technically still open due to a process lock.

or

2. From a batch file, run the following (example is for a file geodatabase) to close a file named a00000225.gdbtable:

cd C:\this_server\directory\subdirectory
for /f "skip=4 tokens=1,2*" %%a in ('net files') do if %%b == C:\this_server\...\a00000225.gdbtable net file %%a /close


You can modify the command above to loop through all of the files in the file geodatabase to close them all rather than specify them individually, which would be tedious since there are so many.

From the command prompt, type NET FILES to see what the underlined text above should contain.

Remember that double percent characters are required for batch files (in other words, %% rather than %) but single percent characters are used when running the command outside of a batch script.



Thank you Nidhin, Marianne and William.

As my file geodatabase itself (the one I wanted to delete) is a replica of enterprise geodatabase (SQL based), then I stopped the SQL Server and then I was able to delete it.

[ATTACH=CONFIG]29660[/ATTACH]

Best

Jamal
0 Kudos
JamalNUMAN
Legendary Contributor
I made this suggestion in a different-but-related post from earlier this month, but it may help if there happens to be a process lock on one or more of the files within your file geodatabase.

If you are still having issues with deleting a geodatabase on the file system despite the fact that the .lock files no longer exist, it's possible there is still a process lock on one or more of the files within it. That being said, if you're using Windows Server 2008 / Windows 7 or later you can try one of the following methods:

1. From the Start menu, type FSMGMT.MSC, then multi-select the files you want from the GUI, then right click them and chose "Close". That method should force close the files that are technically still open due to a process lock.

or

2. From a batch file, run the following (example is for a file geodatabase) to close a file named a00000225.gdbtable:

cd C:\this_server\directory\subdirectory
for /f "skip=4 tokens=1,2*" %%a in ('net files') do if %%b == C:\this_server\...\a00000225.gdbtable net file %%a /close


You can modify the command above to loop through all of the files in the file geodatabase to close them all rather than specify them individually, which would be tedious since there are so many.

From the command prompt, type NET FILES to see what the underlined text above should contain.

Remember that double percent characters are required for batch files (in other words, %% rather than %) but single percent characters are used when running the command outside of a batch script.



Hi William,

You have fantastically provided root solution to this issue. closing open files solved the issue (screenshots below).

[ATTACH=CONFIG]29675[/ATTACH], [ATTACH=CONFIG]29676[/ATTACH]

Very much appreciated

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos