Why would you wanna Find your Sql Server Database Size ?

     As a day to day task in a DBA life is to be able to monitor the Entire Database Server and make sure he is aware of everything that goes around in the Database.  Monitoring the size of your databases is crucial and can provide you with great information about your environment.

The script below will generate a very detailed Database Size reports such as:

Data Size , Data Size Used , Log Size , Log Size Used ,Recovery Model Type and more other metrics.

Note: you must have sysadmin privileges in order to get the full report populated.

 

Have you ever got and 17892 Error ?

Some extra prepared Junior was playing around and had created something that might lock out form your instance ?

  • Let’s see how we can fix this ?
  • We can see from the start that a log on trigger is doing it’s job !!! So in order to make use of a Dedicated Administrator Connection.

    Log in to your host where the Sql Server service is running and open a command line prompt and connect to SQL Server using sqlcmd and -A option and
    argument -d master which will directly enable me to log on to master database .

  • Find the trigger that holds the login
  • So here is the villain !!! Let’s save the code and drop the trigger.(question why the trigger was created letter ! now free the Sql Server)



    Done , test the connection to your instance now!

    Backing up your database on a shared network device can save the day sometimes.

    Let’s see how we can setup our SQL Server so you can achieve this.

  • Go to your instance backup devices configuration and add a new device
  • Choose a name for your device


  • Specify the full path to the file including the file name and save the device configuration.
  • Backup your database
  • Chosse the device option as your backup location


  • Here is a list of articles that will show you how to install, use and understand SQL Server database. None of this articles Represent Following Microsoft Corporation in any way, and is not advised to be used in production environments before testing. So aodba.com will not be held Responsible for any damages that will produce the materials presented to any database environments. Use with care.