A lock commonly means that another application is accessing a database, and the ability to alter its structure, such as by adding or removing fields, is restricted. A common cause for a schema lock is displaying a dataset while trying to modify the dataset in another application.
Solution - If using multiple applications, check whether those applications might be accessing the same data.
I usually get locks when:
- someone else is using the data
- I have multiple programs looking at the data
- the data is in my mxd multiple times
- the data is being used in a service and the service hasn't been shut down
You can try looking at your database connections to identify where the multiple connections are coming from, and either disconnect them from there, or manually shut things down.