Friday, July 19, 2013

[SQL 2012] Truncate permission only on specified tables

[SQL 2012] Truncate permission only on specified tables


Truncate permission only on specified tables

Posted: 19 Jul 2013 02:55 AM PDT

Hi Experts,How can I grant truncate permission to users to only specified tables?Help Please

Security Assessment

Posted: 19 Jul 2013 02:28 AM PDT

Hi guys,I was asked to perform security assessment for the Sql Server 2012.I could find how to perform anywhereAny one do have any idea about any tools used for this or ??on browsing some site mention to download tools, some were defining about it.Rookie here :hehe:

Identity key (unique column) not behaving properly

Posted: 19 Jul 2013 12:01 AM PDT

Hi,Wonder if someone has seen this issue before or if I am missing any recent hotfix here that I should apply.I've seen this error on several of my databases again and again this week:[code="plain"]Violation of PRIMARY KEY constraint 'PK_XXXX'. Cannot insert duplicate key in object 'dbo.MyTable'. The duplicate key value is (whatever number here).The statement has been terminated.[/code]The thing is, the PK is unique, and the INSERT statement does not touch that column, it touches the other ones. So SQL2012 is the one that automatically generates the next and unique available value.How can be possible that the value to be inserted (generated by SQL2012) is a duplicate one? By the way, this was not happening on the previous SQL2005 or SQL2008 server where the databases were being hosted.Here's my SQL 2012 version: 11.0.3000.0 (SP1 applied). Runs on top of a Win2008R2 Cluster.Any hints are highly appreciated!

Notification for Availabilty Group Failover

Posted: 19 Jul 2013 01:20 AM PDT

How can we setup auto notification for Availabilty Group Failover in SQL 2012? Please suggest.Regardssqldba4u

Single Index on multiple tables?

Posted: 18 Jul 2013 11:05 PM PDT

This is a long shot, but is it possible to create an index that references columns on two tables.Scenario: The application tracks internal and external items in separate tables - a new requirement is a reference number that must be unique in both internal and external tables.So we have a unique index on both tables, and a check trigger to make sure reference numbers in insert/updates don;t exist on the other table, So that's 4 T-SQL objects for one business requirement, and its causing maintenance issues.Is there an easier way? - perhaps something to do with indexed views?

Blocked

Posted: 18 Jul 2013 09:48 PM PDT

Hi,How to find out the total number of all blocked sessions by using T-SQL Statement

Accessing MSSQL using a web browser

Posted: 18 Jul 2013 09:01 PM PDT

I have seen various posts showing interest in being able to perform simple queries and execute storedprocs on MSSQL using a web browser. I had a similar interest so I developed a web app to do it. The beta is here: http://esqlclient.azurewebsites.netI'd be interested to know whether people think this is useful and what issues (licensing, security, traffic etc.) there might be. I only tested it on MSSQL 2012 but it may work for earlier versions that are exposed to the internet. It also works for Azure SQL.The beta will be taken down in a few days so feel free to use it until then and let me know what you think. It should be fairly obvious how to connect but let me know if not. Once connected, you can perform T-SQL and execute SPs according to the permissions set by your DBA.

No comments:

Post a Comment

Search This Blog