来自visual studio的SQL服务器管理

时间:2022-08-08 16:59:33

I need to make some permission changes on a MS SQL server (2005) database. Some tables read only for all but dbo, some tables read-write for all etc. In the past I used the management program that came on the SQL server disk. That is not an option for me right now. I cannot find a place in visual studio to alter table permissions. Does visual studio have that feature?

我需要在MS SQL Server(2005)数据库上进行一些权限更改。有些表只读取除了dbo以外的所有表,有些表可以读写所有等。过去我使用了SQL服务器磁盘上的管理程序。这对我来说不是一个选择。我无法在visual studio中找到一个可以改变表权限的地方。 visual studio是否具有该功能?

4 个解决方案

#1


Can you download SQL Server Management Studio Express?

你能下载SQL Server Management Studio Express吗?

#2


GRANT for tables:

表格的GRANT:

GRANT <permission> [ ,...n ] ON 
    [ OBJECT :: ][ schema_name ]. object_name [ ( column [ ,...n ] ) ]
    TO <database_principal> [ ,...n ] 
    [ WITH GRANT OPTION ]
    [ AS <database_principal> ]

<permission> ::=
    ALL [ PRIVILEGES ] | permission [ ( column [ ,...n ] ) ]

<database_principal> ::= 
        Database_user 
    | Database_role 
    | Application_role 
    | Database_user_mapped_to_Windows_User 
    | Database_user_mapped_to_Windows_Group 
    | Database_user_mapped_to_certificate 
    | Database_user_mapped_to_asymmetric_key 
    | Database_user_with_no_login

example:

GRANT SELECT ON dbo.YourTable TO YourUser
GRANT INSERT ON dbo.YourTable TO YourUser
GRANT DELETE ON dbo.YourTable TO YourUser

#3


Visual Studio 2008 does not have this ability and I don't see it included in the future editions either.

Visual Studio 2008没有此功能,我也不认为它包含在未来的版本中。

#4


you could always use the command line to alter the permissions.

您始终可以使用命令行来更改权限。

#1


Can you download SQL Server Management Studio Express?

你能下载SQL Server Management Studio Express吗?

#2


GRANT for tables:

表格的GRANT:

GRANT <permission> [ ,...n ] ON 
    [ OBJECT :: ][ schema_name ]. object_name [ ( column [ ,...n ] ) ]
    TO <database_principal> [ ,...n ] 
    [ WITH GRANT OPTION ]
    [ AS <database_principal> ]

<permission> ::=
    ALL [ PRIVILEGES ] | permission [ ( column [ ,...n ] ) ]

<database_principal> ::= 
        Database_user 
    | Database_role 
    | Application_role 
    | Database_user_mapped_to_Windows_User 
    | Database_user_mapped_to_Windows_Group 
    | Database_user_mapped_to_certificate 
    | Database_user_mapped_to_asymmetric_key 
    | Database_user_with_no_login

example:

GRANT SELECT ON dbo.YourTable TO YourUser
GRANT INSERT ON dbo.YourTable TO YourUser
GRANT DELETE ON dbo.YourTable TO YourUser

#3


Visual Studio 2008 does not have this ability and I don't see it included in the future editions either.

Visual Studio 2008没有此功能,我也不认为它包含在未来的版本中。

#4


you could always use the command line to alter the permissions.

您始终可以使用命令行来更改权限。