<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Table Permission &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/table-permission/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Thu, 25 Jan 2018 11:26:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server Interview: Revoke all permissions, Grant one Table to User</title>
		<link>https://www.dbrnd.com/2018/02/sql-server-interview-revoke-all-permissions-grant-one-table-to-user/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 12 Feb 2018 16:16:54 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[GRANT]]></category>
		<category><![CDATA[REVOKE]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[Table Permission]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7079</guid>

					<description><![CDATA[How to revoke all permissions of a user and grant only one table to that user in SQL Server? If you are SQL DBA and planning for an interview, you should prepare for database security related interview questions. I already published, please check the below link. The Ultimate Page of the SQL Server Interview Questions [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-interview-revoke-all-permissions-grant-one-table-to-user%2F&amp;linkname=SQL%20Server%20Interview%3A%20Revoke%20all%20permissions%2C%20Grant%20one%20Table%20to%20User" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-interview-revoke-all-permissions-grant-one-table-to-user%2F&amp;linkname=SQL%20Server%20Interview%3A%20Revoke%20all%20permissions%2C%20Grant%20one%20Table%20to%20User" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-interview-revoke-all-permissions-grant-one-table-to-user%2F&amp;linkname=SQL%20Server%20Interview%3A%20Revoke%20all%20permissions%2C%20Grant%20one%20Table%20to%20User" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-interview-revoke-all-permissions-grant-one-table-to-user%2F&amp;linkname=SQL%20Server%20Interview%3A%20Revoke%20all%20permissions%2C%20Grant%20one%20Table%20to%20User" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-interview-revoke-all-permissions-grant-one-table-to-user%2F&amp;linkname=SQL%20Server%20Interview%3A%20Revoke%20all%20permissions%2C%20Grant%20one%20Table%20to%20User" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-interview-revoke-all-permissions-grant-one-table-to-user%2F&amp;linkname=SQL%20Server%20Interview%3A%20Revoke%20all%20permissions%2C%20Grant%20one%20Table%20to%20User" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F02%2Fsql-server-interview-revoke-all-permissions-grant-one-table-to-user%2F&#038;title=SQL%20Server%20Interview%3A%20Revoke%20all%20permissions%2C%20Grant%20one%20Table%20to%20User" data-a2a-url="https://www.dbrnd.com/2018/02/sql-server-interview-revoke-all-permissions-grant-one-table-to-user/" data-a2a-title="SQL Server Interview: Revoke all permissions, Grant one Table to User"></a></p><p><strong>How to revoke all permissions of a user and grant only one table to that user in SQL Server?</strong></p>
<p>If you are SQL DBA and planning for an interview, you should prepare for database security related interview questions. </p>
<p>I already published, please check the below link. </p>
<blockquote class="wp-embedded-content" data-secret="pSRYIoIsqV"><p><a href="https://www.dbrnd.com/sql-server-advance-important-interview-questions-answers-for-database-administrators-developers/">The Ultimate Page of the SQL Server Interview Questions &#038; Answers for Database Administrators and Developers</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/sql-server-advance-important-interview-questions-answers-for-database-administrators-developers/embed/#?secret=pSRYIoIsqV" data-secret="pSRYIoIsqV" width="600" height="338" title="&#8220;The Ultimate Page of the SQL Server Interview Questions &#038; Answers for Database Administrators and Developers&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>As a SQL DBA, operating with database permissions is a routine work like giving permission to ad-hoc users and modifying whenever it is required. </p>
<blockquote><p>Last year, I asked this question to a DBA, and I got an answer like &#8220;Remove the user and Create a new user with specific table permission.&#8221;<br />
What do you think? Is this correct answer? &#8211; Partially Yes&#8230; </p>
<p>Before removing a user, you should verify the created objects by that user and create a new user with the same old name.</p></blockquote>
<p><strong>But without doing this all, the answer can be the below script:</strong></p>
<p><strong>Stop access to all tables for a user:</strong></p>
<pre class="crayon-plain-tag">EXEC sp_msforeachtable "DENY ALL ON '?' TO [User_Name];"
GO</pre> </p>
<p><strong>Grant specific table permission:</strong></p>
<pre class="crayon-plain-tag">GRANT ALL ON [Schema_Name].[Table_Name] TO [User_Name]
GO</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
