Problem in creating User in SqlServer using smo

我与影子孤独终老i 提交于 2019-12-05 15:13:00

check up transactions and batches.

DDL statements also support transactions, so when you create new user and pass server login, there might not be such login on the server because previous statement being not committed.

Also batch close statement "GO" would help


Try first:

  • CreateServerLogin

  • issue GO

  • CreateDBLogin

  • issue COMMIT


if failed try this logic:

  • CreateServerLogin

  • issue COMMIT

  • CreateDBLogin

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!