你执行的语句问题吧?为什么会访问master数据库?'sp_sdidebug',資料庫 'master',擁有者 'dbo'

解决方案 »

  1.   

    sp_sdidebug 这个存储过程是属于master数据库的,而你的用户没有master数据库的权限.
      

  2.   

    你的存储过程sp_sdidebug在系统表master中。你要建在你的用户数据库中。重新建立存储过程。
    use dbname
    create proc sp_sdidebug
    -----或者修改使用着:
    EXEC sp_changeobjectowner 'sp_sdidebug', 'username'
      

  3.   

    我就是不明白為何用到 master 數據庫的sp_sdidebug, 隨便一條SQL都是這樣的錯, 是不是
    C#的數據庫控件需要設置什麼屬性啊
      

  4.   

    我的問題是: 為何在應用程序中,任何一條SQL語句在執行前都要調用 sp_sdidebug 呢, 可不可以設置不調?
      

  5.   

    你的程序开发环境可能是设置了SQL存储过程调试的功能
      

  6.   

    sp_sdidebus is debug stored procedures, you need to have appropriate user permissions to execute the extended stored procedure sp_sdidebug. The default access is for system administrators only. To set up SQL Server for debugging :
    1.From the Start menu, choose Settings and click Control Panel. 
    2.In Control Panel, choose Services. 
    3.Select MSSQLServer and then choose Startup. 
    4.Check the Log On As settings. If the option is set to System Account, change it to This Account, enter the valid domain and user account (in the form domain\account) of a user with administration privileges (that is, administrator on the local SQL Server machine), and then enter the password. 
    5.If you have changed the settings, restart SQL Server. 
      

  7.   

    存儲過程要單獨授EXECUTE權,除非是dbo或sa