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.
List_ALL_DB_Permissions.sql.txt
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:

http://blogs.msdn.com/b/sql-bi-sap-cloud-crm_all_in_one_place/archive/2013/07/02/optimal-sql-maxservermemory-setting-tsql-all-versions-sql-2005-sql-2008-r2-sql-2012-sql-2014ctp
OptimalMaxServerMemory_New_Multi-Version
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.
Get_FileSizes_of_All_Databases.sql.txt
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.
RemoteQueryExecution.sql.txt
Text Document 1.7 KB
Comments: 4
  • #4

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

    taktomierz

  • #3

    liebesmagie (Tuesday, 29 November 2016 07:14)

    sprechen

  • #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@ http://professionalmovers.in
    movers and packers Gurgaon@ http://professionalmovers.in/packers-and-movers-in-gurgaon/
    movers and packers delhi@ http://professionalmovers.in/packers-and-movers-in-delhi/
    all Moving Companies Will Make Relocation Easy and Smooth information Visit site:-
    movers and packers Noida@ http://professionalmovers.in/packers-and-movers-in-nodia/
    movers and packers Bangalore@ http://professionalmovers.in/packers-and-movers-in-bangalore/