How to retrieve roles from a Database

If you have environment where you restrict access to database objects based on user roles and if you have a lot of databases on different servers in the same domain.  The following script can generate roles from a given database in a format that can be used to create roles on different servers where the […]

2003-05-14

167 reads

How to get Foreign keys

If you ever have been put in a situation where your database has a lot of objects and some of those do not have primary keys, trying to find feels like needle in the haystack.  I have modified the script contributed by Mr.Tandrei and Mr.Rahul sharma.  The following script gives all the tables that do […]

2003-04-17

134 reads

Blogs

What the ???? T-SQL Tuesday #120

By

Hey, it’s T-SQL Tuesday again! I almost forgot about it what with Summit and...

First Time Speaking at PASS Summit

By

This week, I filmed my experience as a first time speaker at PASS Summit...

Azure SQL Best Practices?

By

A way to enforce good practice and standards is by Azure Policy. As stated...

Read the latest Blogs

Forums

SQL View - Pivot

By bbranco

I have the following data in a table, its pricing for items, so if...

does WITH (NOLOCK) hint in Select statement really make a difference?

By VoldemarG

In any regular Select query joining a few tables like below, does using this...

Query

By jsshivalik

Hi Table 1 AccountId Name 1101 aaaa 1701 bbbb Table 2 TransId Account Debit...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers