Oracle: Resolve ORA-00257 – Connect AS SYSDBA only until resolved

Recently, one of the Oracle users complained that the database was unusable and received the error below I looked at the space situation and it looked good (PowerShell command is from the dbatools module¬†and allows you to get this server space info. from your own host) Next, I looked at the alert log and saw … Continue reading Oracle: Resolve ORA-00257 – Connect AS SYSDBA only until resolved

Advertisements

SQL Server: DROP All But A Few Tables With PowerShell (or DROP ALL)

Recently, I received a request to backup a dozen tables or so tables out of 12 thousand tables. I had to retain all the indexes, statistics etc. The goal was to hand this over to the vendor for analysis as a database backup. I could have copied the selected tables over to a new database … Continue reading SQL Server: DROP All But A Few Tables With PowerShell (or DROP ALL)

SSAS: Automate SSAS Backups With PowerShell

I was looking for a solution to automate SSAS backups using PowerShell. By "automate", I mean the following: Backup one or more SSAS databases in an SSAS instance to a network location Automatically cleanup backups that are older than [x] days Schedule the backups via SQL Server Agent with minimal overhead Backup multiple host instances/databases … Continue reading SSAS: Automate SSAS Backups With PowerShell

PowerShell: SQL Server Services Startup Mode Change

This is one of those extremely simple posts where everyone who does PowerShell knows how ridiculously simple it is to do and you will too today. You will look like a magician to the uninitiated. Today, I had about 5 hosts running 4 instances of SQL Server each and I had to Stop all SQL … Continue reading PowerShell: SQL Server Services Startup Mode Change

SQL Server: Compare Database Tables/Indexes/Views/SP’s etc. For Differences Across Instances

There are a bunch of tools in the market to do the database comparisons for differences but if you want to do it for free (and programmatically)¬† at a basic level, you could use the method outlined below. For me, this came about as a result of an user asking "So, what is different between … Continue reading SQL Server: Compare Database Tables/Indexes/Views/SP’s etc. For Differences Across Instances