How to check if table exists in all databases in SQL Server- SQL Server Scripts
Scenario:You are working as SQL Server DBA / Developer. You have many databases on SQL Server Instance and you would like to check in which databases table exists or does not exists.Declare @TableName...
View ArticleHow to create table in all the databases in SQL Server - SQL Server Scripts
Scenario:You are working as SQL Server DBA or developer and you got this requirement" You have to create a table in all the databases on SQL Server Instance" If you have few databases, it might be each...
View ArticleHow to Drop Table from All the Databases from SQL Server
Scenario : How to Drop Table from All the Databases from SQL Server You are working as SQL server developer or SQL server DBA. You got this requirement " You need to create the scripts to drop the...
View ArticleHow to create View in all the databases in SQL Server
Scenario: How to create a view in all SQL Server DatabasesYou are working as SQL Server DBA or SQL Server developer and you need to create a view with same definition in multiple databases of all...
View ArticleHow to drop View from Multiple or All Databases in SQL Server
Scenario: How to drop View from multiple or all SQL Server DatabasesYou are working as SQL Server DBA or SQL Server developer, you need to come up with scripts to drop the view from many databases in...
View ArticleHow to Create Same Stored Procedure on All Databases in SQL Server
Scenario:How to Create Same Stored Procedure on All Databases or multiple Databases in SQL Server We often face this situation where we need to create a same Stored Procedure in multiple databases....
View ArticleHow to drop Stored Procedure from All or Multiple databases in SQL Server
Scenario: How to drop Stored Procedure from multiple or all Databases in SQL ServerIn my last post, I wrote How to create a Stored Procedure in all the databases or multiple databases in SQL Server....
View ArticleHow to check when the view definition was refreshed in SQL Server
Scenario: How to check when last time view definition was refreshed or changedWe know that if the data type changes for columns for objects which are used in the view, we have to refresh the view...
View ArticleHow to generate script to REFRESH all views in a SQL Server Database
Scenario: How to generate script to REFRESH all views in a SQL Server DatabaseLet's say you have made changes to data types of few of the tables and you had views created on those tables. You need to...
View ArticleHow to check if User is Enabled or Disabled in all the databases in SQL Sever
Scenario: How to check if the database user is enabled or disabled in multiple or all the databases in SQL ServerYou have created a login and then user in multiple databases by using that login. You...
View ArticleCannot connect to WMI provider. You do not have permission or the server is...
Scenario: SQL Server 2016 Installed successfully as per Wizard but can't find SQL Server Service and can't connect to SQL Server from SSMS.Solution:Today I installed SQL Server 2016 on my 64 bit...
View ArticleHow to get list of all the tables with all the columns from SQL Server...
Scenario:Was working on a project and needed to get list of all the tables from all the databases with columns. Write below script. The script uses cursor to loop through all the databases to get the...
View ArticleMariaDB - mysqldump: Got error: 1045: "Access denied for user...
Scenario:Today when was trying to take logical backup of MariaDB database by using below Shell> mysqldump DatabaseName > DatabaseName.sqlgot below errorShell> mysqldump...
View ArticleMariaDB - How to Restore .sql file to Database in MariaDB or MySQL
Scenario: In our last post we created the logical backups of a database by using mysqldump. Now we need to restore that .SQL file to database.Solution:Login to MariaDB or MySQL database. Create an...
View ArticleHow to Install SQL Server 2016 Enterprise Step by Step - SQL Server 2016...
Scenario:How to install SQL Server 2016 Enterprise Step by Step?Solution:In this video, we will learn how to install SQL Server 2016 Enterprise step by step. Following items are covered in this...
View ArticleMariaDB : How to change Root Password for MariaDB
Scenario:You are working as MariaDB / MySQL DBA and you need you change the password for root. How would you do that?Solution:You can use mysqladmin command to change the password for root user. use...
View ArticleHow to Install and Configure SQL Server Reporting Services 2016 SSRS - SQL...
Scenario: How to install and Configure SQL Server 2016 Enterprise Reporting Services?In this video you will learn below items.1.How to install SSRS 2016 step by step2.What are the pre-requisites of SQL...
View ArticleHow to Install and Configure SQL Server 2016 Analysis Services - SQL Server...
Scenario:You are working as SQL Server DBA and you need to install SQL Server 2016 Analysis Services. How would you perform SSAS 2016 installation.The below video demo will show you all the steps you...
View ArticleHow to use Sum, Avg and Count in Select Statement - SQL Server / TSQL...
Scenario:Let's say that you have dbo.Customer table with SaleAmount column and you are asked to write a query that should return you sum of SaleAmount, Average of SaleAmount and Count of all the...
View ArticleHow to Get Max and Mix values from a Table by using Aggregate Function - SQL...
Scenario:Let's say you are working as SQL Server Developer, you have dbo.Customer table with SaleAmount. You are asked to write a query that should return Max SaleAmount and Min SaleAmount from the...
View Article