Tag: Script Library

sqldatabaseownership

Error Msg 15138 The Database Principal Owns a Schema in the Database, and Cannot be Dropped

You’re cleaning up some old usernames in a database. The users are no longer needed so you want to drop them and maybe even the server login. You issue the standard DROP USER username; command in the query editor and it immediately comes back with Msg 15138, Level 16, State 1, Line 1 The database…
Read more

SQL Server sysadmin has the keys to the kingdom

Who Has sysadmin Access to your SQL Servers?

Phishing attacks account for more than 80% of all security incidents according to this CSO article Top cybersecurity facts, figures and statistics. And the resulting data breaches cost an average of $3.92 million. With security incidents and data breaches making the news daily, it’s important to secure your networks, including your SQL Servers. That’s not…
Read more

The SQL Server Database Engine

What SQL Server Version Am I Running?

One of the first things we look at when doing a SQL Server Assessment (Health Check) is the SQL Server version and patch level. We don’t stop there, of course. We check a ton of other things that can affect the SQL Server’s performance, its security, and its reliability. But we start with the version…
Read more

sql server reporting services report

What SSRS Reports Does a User Subscribe to?

If your company uses SQL Server Reporting Services as part of it reporting infrastructure, you’ve probably been asked “What SSRS reports does this user subscribe to?” Often that’s due to a job or role change in the company. Sally is leaving the department and Jonathan is taking over her responsibilities. All of Sally’s reports now…
Read more

SQL Server Configuration settings

Webinar: Is Your SQL Server Healthy?

SQL Server. Many business depend on it. But how can you tell if your SQL Server is healthy? It’s not always obvious. SQL Server can be pretty forgiving in many ways, until it’s not. And that can put your performance and even your data at risk. The right configuration settings are critical. Unfortunately, it’s easy…
Read more

SQL Server disk IO traffic jam

Identifying SQL Server Disk Latency

When SQL Server is not as fast as users think it ought to be, how can you tell where the slowdown is? Where’s the performance bottleneck? Where’s the traffic jam? Is it waiting on CPU? Does it needs memory? What about the disks? Could SQL Server be slow because of disk latency? Could be. But…
Read more

waiting for sql server

How Much Longer Will CHECKDB Take?

You’ve manually started DBCC CHECKDB to verify the integrity of a database. It churns. And churns. You check the Messages tab on Management Studio. Nothing. So, you start to wonder: Just how much longer will CHECKDB take to complete? A couple of minutes? A couple of hours? Who knows? How long will DBCC CHECKDB take?…
Read more

SQL Server Security

What Takes Precedent db_datareader (GRANT) or db_denydatareader (DENY)?

If a user is a member of db_datareader, which grants access to a table, and db_denydatareader, which denies access to a table, which role will take precedent? That’s the question someone on LinkedIn recently posted in the SQL Server Administrators group recently. Here’s a link to the question. The LinkedIn poster essentially wanted to know…
Read more

disaster recovery in SQL Server

Where to Start with Disaster Recovery in SQL Server

Backup and restore? Log shipping? Maybe Failover Clustered Instances or Availability Groups can be used? Oh, what about Azure or another cloud provider? Some data centers offer “push button DR,” will that work? There are so many options. Where should we start with Disaster Recovery for our SQL Server? The point of Disaster Recovery Disasters…
Read more

Testing sql server backup files before you need them

How to Test SQL Server Backups Using dbatools

The call comes in. “Something’s happened. We need to restore the production database. Can you do it? And how long will it take?” No DBA wants to receive that call but, frankly, answering those calls and the ensuing questions are part of a DBA’s job. And there’s no better way to know that you can,…
Read more