How to Install Oracle on a Mac

Here’s a quick and easy way to install Oracle Database on a Mac.

First up, Oracle isn’t available natively on the Mac. But don’t let that stop you!

If you’re a developer, and you just want to have Oracle Database running on your local machine, there are ways to do it. In fact, Oracle provides us with a virtual appliance precisely for that purpose.

Read more

Fix ‘The application “SQLDeveloper.app” can’t be opened.’

If you just installed SQL Developer on a Mac, but you’re getting an error when trying to launch it, try the steps below to fix it.

The error reads “The application “SQLDeveloper.app” can’t be opened because Apple cannot check it for malicious software“. It also mentions that “This software needs to be updated. Contact the developer for more information“.

Below are the steps I used to overcome this issue, and launch SQL Developer.

Read more

How to do a DELETE Pass-Through Query in SQL Server

In SQL Server, the OPENQUERY rowset function enables you to execute a pass-through query on a linked server.

OPENQUERY is commonly referenced in the FROM clause of a query as if it were a table, but it can also be referenced as the target table of an INSERT, UPDATE, or DELETE statement.

This article presents an example of using OPENQUERY to do an DELETE pass-through query.

Read more

Restore a SQL Server Database (T-SQL)

If you use SQL Server Management Studio (SSMS) or some other GUI to manage your databases, you might be used to backing up and restoring databases using “point and click”.

Usually this involves right-clicking on the database and selecting Restore or similar, then following the prompts (for example, when restoring a database in Azure Data Studio).

But if you ever need to do it with T-SQL, you can use the RESTORE DATABASE statement.

Read more

How to Add AM/PM to a Time or Datetime Value in MariaDB

MariaDB includes many functions that allow you to return time and datetime values in a variety of formats.

Two functions allow you to format the time portion using a 12 hour clock, with the AM/PM designator are DATE_FORMAT() and TIME_FORMAT().

There are many format specifiers that can be used with these functions, but only a couple that return the AM/PM designator.

Read more