Dropping database on another SQL Server instance

Kishore Karuppanasamy 1 Reputation point

In the process of automating DB restores on AlwaysOn enabled environment, we are in need to drop the DBs (which are sometimes struck in restoring state) in the secondary servers. I am using the linked server configured between the nodes to drop the DBs on secondary server before adding the restored Dbs back in to AlwaysOn AG.

Is there an other way I can drop DBs on another SQL server instance without using linked server?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
8,500 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 67,721 Reputation points Microsoft MVP

    Yes, by running a Powershell script or similar from outside SQL Server. For admin things that span servers, Powershell is often a better option.