- First you need to backup the database and copy it to a place you can upload to Azure from, e.g fraazurreu1.de.db.com
- You then need to log into the Azure portal and go to the storage blob container, e.g devsadbaasdb0002 – sqlbackups, and select upload.
- You now need to log into the Azure Managed instance and make sure that you have credentials set up in order to access the blob container above. CREATE CREDENTIAL [https://devsadbaasdb0002.blob.core.windows.net/sqlbackups]
WITH IDENTITY=’SHARED ACCESS SIGNATURE’,
SECRET = ‘sv=2018-03-28&ss=b&srt=sco&sp=rwdlac&se=2019-02-07T22:35:35Z&st=2019-02- 07T14:35:35Z&spr=https&sig=9lEWSK%2FxFIkMQOjr2qQ38aHOD9LCtuQDqLUN2PX3kOg%3D’
GO - Next restore the database from URL:
restore database HDB_v5 from url=’https://devsadbaasdb0002.blob.core.windows.net/sqlbackups/HDB_v5.bak’
go - Final part would be to sync up any logins.
Creating the Oracle Linked Server
- Install the Oracle client software by running D:\Install-Staging\Oracle-Client-sw-12102\000\DB_106896.msi
- Copy the tnsnames.ora from D:\Install-Staging\Oracle-Client-sw-12102 to C:\APPS\ORACLE\PRODUCT\12.1.0\CLIENT_64\network\admin
- Restart the SQL Server
- Under Server Objects-Linked Servers Expand Providers select properties for OraOLEDB.Oracle and tick Allow inprocess.
- In SQL Server run the following:
sp_addlinkedserver @server = ‘DBIBU’, @srvproduct = ‘Oracle’, @provider = ‘OraOLEDB.Oracle’, @datasrc = ‘DBIBU’
go
EXEC sp_addlinkedsrvlogin ‘DBIBU’, ‘FALSE’, NULL, ‘DBIB_094_USER’, ‘fgrekjt#186’
go - That should be it, you can verify by selecting Test connection or by expanding catalogs and viewing the tables and doing a select from them.