Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6355971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:52:31+00:00 2026-05-24T22:52:31+00:00

In MS SQL 2008 Management Studio, I’m trying to deny certain columns/fields in a

  • 0

In MS SQL 2008 Management Studio, I’m trying to deny certain columns/fields in a table to a specific user.

To do this, I right click on the DB, expand “Security” and then expand “Users”.
Once I’ve selected the user in question, I then right click and choose “Properties”.

The next step is to then choose the page “Securables” and then choose the “Select” Permission. This is followed by clicking on “Column Permissions”

enter image description here

Once I’ve chosen the fields that I want to deny access to for the selected user, I then hit Script, so I can see the T-SQL in a new query window (you can refer to the same image above. The Script is on the top of the window).

So here’s my question: the resulting script seems to duplicate each action twice.
For example, here’s what it looks like:

use [master_table]
GO
DENY SELECT ON [dbo].[Table_Main] ([DatabaseConnectionString]) TO [Testing_Login]
GO
use [master_table]
GO
DENY SELECT ON [dbo].[Table_Main] ([DBUserName]) TO [Testing_Login]
GO
use [master_table]
GO
DENY SELECT ON [dbo].[Table_Main] ([DBPassword]) TO [Testing_Login]
GO
use [master_table]
GO
DENY SELECT ON [dbo].[Table_Main] ([DatabaseConnectionString]) TO [Testing_Login]
GO
use [master_table]
GO
DENY SELECT ON [dbo].[Table_Main] ([DBUserName]) TO [Testing_Login]
GO
use [master_table]
GO
DENY SELECT ON [dbo].[Table_Main] ([DBPassword]) TO [Testing_Login]
GO

Any idea why it does this? We have a number of tables that I want to match the permissions for and was thinking of using a CURSOR to do this. But I don’t know if I should include the above script as is in my procedure or if it’s safe to remove the duplicate statements.

Please let me know what you think.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:52:33+00:00Added an answer on May 24, 2026 at 10:52 pm

    I tried the same in SSMS 2008 R2 and got the same duplicate scripts for each column in the table. It seems to be an issue with SSMS. I don’t see any reason why you need to include the duplicate script. I would suggest that you can ignore them.

    You might want to report this issue at Microsoft Connect website.

    Looks like there was a similar issue report at the website. It is still listed as Active.

    SSMS Script Action produces 2 ALTER DATABASE statements

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In SQL Server 2008 Management Studio, when I right click on a database table
When I run the this select '$(''test'')' in SQL Management Studio 2008 it returns
Sql Server Management Studio 2008 is not scripting table permissions even when I select
This is regarding SQL server 2008 management studio.. I connect to different environment DB
I am using SQL Server 2008 Management Studio and have a table I want
In SQL Server 2008 R2 Management Studio, if I right-click on an object inside
Need to duplicate a TABLE using Microsoft SQL Management Studio 2008 The TABLE needs
In SQL Server 2008 Management studio, I can hit F5 to execute everything in
I'm using SQL Server 2008 Management studio viewing a 2005 server and have just
I have tried SQL Server 2008 Management Studio and other third party tools to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.