If you get a message "Another process is accessing the package database" when starting yast2, the following command may be the solution:
killall packagekitd