How to create Link server to connect Oracle database? - sql

I just used this command to install OraOLEDB.Oracle
install.bat all c:\oracle odac
I've tested .udl file it's working fine!!! But when I test link sever I'm getting error.
SQL SERVER Information as below
Microsoft SQL Server 2014 - 12.0.2000.8 (Intel X86)
Feb 20 2014 19:20:46
Copyright (c) Microsoft Corporation
Express Edition on Windows NT 6.3 <X64> (Build 15063: ) (WOW64)
Oracle information
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
PL/SQL Release 12.1.0.2.0 - Production
"CORE 12.1.0.2.0 Production"
TNS for 64-bit Windows: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production
OS information
window 10
64 Bit
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or
batch. (Microsoft.SqlServer.ConnectionInfo)
The OLE DB provider "MSDAORA" for linked server SQL2ORACLE reported an
error. The provider did not give any information about the error.
Cannot initialize the data source object of OLE DB provider "MSDAORA"
for linked server SQL2ORACLE. (Microsoft SQL Server, Error: 7399)

Right click on the provider (MSDAORA in your case) and click on Properties. This will open the providers properties. Ensure that "Allow inprocess" is checked.

Related

the backend version is not supported to design database diagrams

When i wanna create new table in ssms 2016 or ssms 2014 give me an error
The backend version is not supported to design database diagrams
Version is
Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64) Aug 22 2017 17:04:49 Copyright (C) 2017 Microsoft Corporation Enterprise Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: )
There is one point here
I connect to another server from my local computer

Can't Connect to SQL*Plus using SID

I executed the following query to find the SID of the database that I was connected to as system:
SQL> select sys_context('userenv','instance_name') from dual;
SYS_CONTEXT('USERENV','INSTANCE_NAME')
--------------------------------------------------------------
orcl
I then try connecting to system with the following command:
C:\>sqlplus system/system#orcl
SQL*Plus: Release 12.2.0.1.0 Production on Wed Aug 8 23:53:02 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
What can I do to connect to the database as system while specifying the SID?
Using a SID, you say? Expand the connect string a little bit. Here's how:
I'll use TNSPING to find information I need:
M:\>tnsping orcl
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 09-KOL-2018 07:13:18
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\0_Oracle_library\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=db_kc11g) (PORT=1521)) (CONNECT_DATA= (SID=kc11g)))
OK (20 msec)
Now, connect:
M:\>sqlplus scott/tiger#(description=(address=(protocol=tcp)(host=db_kc11g)(port=1521))(connect_data=(sid=kc11g)))
SQL*Plus: Release 11.2.0.1.0 Production on ╚et Kol 9 07:14:05 2018
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
Or, shorter:
M:\>sqlplus scott/tiger#db_kc11g:1521/kc11g
SQL*Plus: Release 11.2.0.1.0 Production on ╚et Kol 9 07:16:59 2018
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>

SQL Server 2012 not reinstalling

I have uninstalled everything from control panel with sql server 2012
It can never get past the first window of installation which has product key, license terms, product updates, install Setup files. after it has has installed Setup files the next window does not appear.
my summary file looks like this:
Overall summary:
Final result: Passed
Exit code (Decimal): 0
Start time: 2018-03-07 17:22:30
End time: 2018-03-07 17:22:52
Requested action: RunRules
Machine Properties:
Machine name: DESKTOP-US6DHAO
Machine processor count: 4
OS version: Future Windows Version
OS service pack:
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature Language Edition Version Clustered
SQL Server 2012 SQLEXPRESS MSSQL11.SQLEXPRESS Database Engine Services 1033 Express Edition 11.0.2100.60 No
SQL Server 2012 SQLEXPRESS MSSQL11.SQLEXPRESS SQL Server Replication 1033 Express Edition 11.0.2100.60 No
SQL Server 2012 SQLEXPRESS MSSQL11.SQLEXPRESS Full-Text and Semantic Extractions for Search 1033 Express Edition 11.0.2100.60 No
SQL Server 2012 SQLEXPRESS MSRS11.SQLEXPRESS Reporting Services - Native 1033 Express Edition 11.0.2100.60 No
SQL Server 2012 Management Tools - Basic 1033 Express Edition 11.0.2100.60 No
SQL Server 2012 Management Tools - Complete 1033 Express Edition 11.0.2100.60 No
SQL Server 2012 Client Tools Connectivity 1033 Express Edition 11.0.2100.60 No
SQL Server 2012 Client Tools Backwards Compatibility 1033 Express Edition 11.0.2100.60 No
SQL Server 2012 Client Tools SDK 1033 Express Edition 11.0.2100.60 No
Package properties:
Description: Microsoft SQL Server 2012
ProductName: SQL Server 2012
Type: RTM
Version: 11
SPLevel: 0
Installation location: C:\Users\RedRam\Downloads\SQLFULL_x64_ENU\x64\setup\
Installation edition: Evaluation
User Input Settings:
ACTION: RunRules
CONFIGURATIONFILE:
ENU: true
FEATURES:
HELP: false
INDICATEPROGRESS: false
INSTANCENAME: <empty>
PID: *****
QUIET: false
QUIETSIMPLE: false
RULES: SCCCheckRules
UIMODE: Normal
X86: false
Configuration file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20180307_172224\ConfigurationFile.ini
Rules with failures:
Global rules:
There are no scenario-specific rules.
Rules report file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20180307_172224\SystemConfigurationCheck_Report.htm
Any Hints thank you
You might have to check the APPDATA folder for the remaining files of SQL Server. These needs to be deleted as well.

SQL Server 2016 - Dynamic Data Masking (DDM)

Does anyone know if DDM has to be enabled before it can be used (and if so how), or are there only certain versions of SQL Server 2016 that have this functionality as trying to run:
ALTER Table Employee
ALTER COLUMN NAME ADD MASKED WITH (FUNCTION='DEFAULT()')
results in the following error:
Msg 534, Level 15, State 100, Line 4 'ADD MASKED' failed because it is
not supported in the edition of this SQL Server instance
'DELL-001\SQLEXPRESS01'. See books online for more details on feature
support in different SQL Server editions.
The version of SQL I have installed is:
Microsoft SQL Server 2016 (RTM-GDR) (KB3194716) - 13.0.1722.0 (X64)
Sep 26 2016 13:17:23 Copyright (c) Microsoft Corporation Express
Edition (64-bit) on Windows 10 Home 6.3 (Build 14393: )
Thanks!
This wasn't available in any edition lower than standard when SQL Server 2016 was released.
However recently SP1 was released which does enhance the functionality of lower versions quite considerably.
So you just need to install SP1.
Image Source

The 32-bit OLE DB provider "Microsoft.ACE.OLEDB.12.0" cannot be loaded in-process on a 64-bit SQL Server

I have the following code in a SQL Server database, recently we had migrated this database from a Server which is SQL Server 2008 R2 to another server which is SQL Server 2014.
IF EXISTS (SELECT 1 FROM sys.servers WHERE name = 'Excel_File_Src')
EXEC sp_dropserver 'Excel_File_Src', 'droplogins'
EXEC sp_addlinkedserver 'Excel_File_Src',
#srvproduct = 'ACE 12.0',
#provider = 'Microsoft.ACE.OLEDB.12.0',
#datasrc = 'E:\UCB_Data.xlsx' ,
#provstr = 'Excel 8.0;'
EXEC sp_addlinkedsrvlogin 'Excel_File_Src', 'false'
EXEC SP_TABLES_EX 'Excel_File_Src'
New SQL Server version is:
Microsoft SQL Server 2014 - Microsoft Corporation Developer Edition (64-bit) on Windows
It is used to run perfectly on old server, but after moving it to new server we getting below error.
The 32-bit OLE DB provider "Microsoft.ACE.OLEDB.12.0" cannot be loaded in-process on a 64-bit SQL Server.
Firstly the message is telling you the office bits you have installed on the box are the 32bit version. You need the 64 bit version. Secondly, make sure you aren't running the "Developer" edition in production because you aren't allowed - see EULA.
You Could Download Both x64 and x86 and run these commands to install them without conflicting with one another:
"C:\AccessDatabaseEngine_x64.exe" /passive for 64-bit installation.
or
"C:\AccessDatabaseEngine.exe" /passive for 32-bit installation.
Source: "Microsoft.ACE.OLEDB.12.0" cannot be loaded in-process on a 64-bit SQL Server
Isn't the error self explanatory which saying that 32bit driver can't be used with 64 bit installation. You need a 64-bit driver to solve this issue.