List All Database Permissions.sql
The script creates three table variables (@dbs, @permission and @objects), one for storing the databases' names (@dbs), other to store the permission (@permission) and the third for storing the databases objects (@objects).

When the script runs, it will fill the @dbs with all the databases on the server, including snapshots. Then, it'll loop through the table, using the database name, to fill the @objects table.

Finally, it'll join the @objects table with the sys.database_principals and sys.database_permissions to retrieve the permission and fill the @permission table.

This operation will be performed on each database on the @dbs table. In case you want to get the permission for specific databases, just change the line that inserts the databases name from the sys.databases for the custom one.
Text Document 3.8 KB
Optimal SQL MaxServerMemory Setting TSQL- All Versions (SQL 2005/SQL 2008/R2/ SQL 2012/SQL 2014CTP1)
I created a script sometime back for finding optimal MaxServerMemory setting using TSQL automation script, I have and some of you have used it for initial analysis. The script used to find the buffer distribution, followed by Lock Memory, SQL Cache memory, Optimizer memory etc. and based on that the MaxServermemory used to be calculated.

Now in SQL 2012 as ‘SQL Server Buffer’ is now a client of SQL Server Memory Manager, the whole calculation falls wrong as per what we achieved in the previous script. Thanks to Matt Lavery and John Balke for pointing this out and encouraging to re-write the whole logic flow again, especially as per best practices. As I got sometime this week I landed up writing the new OptimalMaxServerMemory TSQL based on the following logic: FOR MORE INFORMATION PLEASE CHECK MY MSDN BLOG:
Text Document 4.4 KB
List File Sizes of All Databases.sql (works for all versions SQL)
The Following code will help in Listing the File Sizes of all databases in an instance.
Text Document 1.5 KB
Remote Query execution -Multiple Servers Using Linked Server
Execute a Remote Query on Multiple Servers using Linked Servers

Use the Insert Into statement to add more SQL Instances to the table... Try it and let me know if you have issues.
Text Document 1.7 KB
Comments: 4
  • #4

    oczyszczanie aury (Thursday, 01 December 2016 06:02)


  • #3

    liebesmagie (Tuesday, 29 November 2016 07:14)


  • #2

    70-410 (Tuesday, 22 March 2016 03:30)

    This is very helpful article for me because i am a web developer and have knowledge about windows server. I am creating content management system in PHP that is why i am searching about MySql and MySqli.

  • #1

    Packers and Movers Bangalore (Friday, 14 August 2015 04:46)

    Super Services by Packing and Moving Companiesinformation Visit site:-
    movers and packers@
    movers and packers Gurgaon@
    movers and packers delhi@
    all Moving Companies Will Make Relocation Easy and Smooth information Visit site:-
    movers and packers Noida@
    movers and packers Bangalore@