I want to connect to a SQL Server database from Netsuite and then sync data to Netsuite.
Is there any way I can do it?
Here is how you can do the ODBC connection between NetSuite and your SQL server.You can do it similarly with any other SQL Server. However,Syncing the data back would require a web-service.
A linked server needs to be setup using the MS Management Studio. Below are the steps:
(MSDASQL has to be downloaded and installed piror to following the steps below if not yet preinstalled with Microsoft SQL Server Management Studio.)
Open MS SQL Management Studio and go to Server Objects > Linked Servers > Providers menu tree. Right click the MSDASQL and set these options:
Dynamic parameter
Nested Queries
Allow inprocess
Supports 'Like' operator
Right click on Linked Servers, select New Linked Server and on the General tab, set the following:
Linked Server: NETSUITE
Provider: Microsoft OLE DB Provider for ODBC Drivers
Product Name: NetSuite.com
Data Source: NetSuite.com //Copy the DSN name from ODBC Data Source
Provider String: DSN=NetSuite.com
On the Security tab, select *be made using this security context, and enter Login email and password
Try to execute SQL to test the connection
Select * from [Linked Server].[Company Name].Administrator.Accounts
Note:
This procedure is also applicable to MS SQL Server 2008.
[Company Name] is the one found at Setup > Company > Company Information > Company Name
The following table lists tasks for an ODBC driver to connect to Connect Service; however, some of these tasks are optional to complete(refer suite Answer Id: 38942)
Task
Description
Set up an environment and verify installation prerequisites.
For both Windows and Linux, see Prerequisites to verify the installation prerequisites.
Download and install the driver.
For Windows, see Downloading and Installing the ODBC Driver for Windows.For Linux, see Downloading and Installing the ODBC Driver for Linux.
Set up the ODBC connection.
For Windows, see Configuring the ODBC Data Source on Windows.For Linux, see Configuring the ODBC Data Source on Linux.
Optionally, upgrade from a previous version.
For both Windows and Linux, see Upgrading an ODBC Driver to upgrade a previous installation.
Optionally, enable authentication with server certificates.
For both Windows and Linux, see Authentication Using Server Certificates for ODBC to add increased encryption to secure the data connection.
Related
I'm attempting to follow the guide here which shows how to link an azure cosmos-db as a linked server via ODBC. I have created the ODBC links to the remote cosmos-db in both x64 and x86 flavours. These appear to connect without issue when checking from within the ODBC Admin console and I can even see the data when setting up a schema, however I am unable to create a working linked server as I get the following error when testing the connection ..
"[microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
I Believe this is maybe because I have SQL Express installed and the "Providers" folder is missing from the "Linked Server" folder. I am therefore assuming that I do not have the necessary providers installed on the SQL Server Instance running locally.
I have attempted to install both the OLE DB Driver and the ODBC Driver, however these have not helped.
I searched through all threads on the web available, but none could help me.
I am trying to connect to SQL Server engine from SQL Developer. In order to do that I enabled Named Pipes and TCP/IP from SQL Configuration Manager.
Then I tried different drivers:
I tried Microsoft JDBC driver for SQL Server - I cannot choose in connection manager SQL Server database type, so it does not work..
I tried jTDS driver instead, and it worked - I can choose SQL Server database type, but then all I get is an error informing that it cannot connect to Microsoft SQL Server on localhost (I tried localhost, name of my computer, none of which worked).
Is there anything more I can do?
EDIT
This is what I have so far:
SECOND EDIT
I had more problems:
With error saying
Status: Failur-I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property
Using windows authentication, I still got asked for username and password.
(All details and solutions in my answer below)
We only support the jTDS driver for SQL Server and Sybase ASE connections, so that's the way to go.
After that, it's up to you to get a correct connection string to your SQL Server system.
Make sure you have the right port in addition to your 'localhost' network location for your SQL Server instance.
This is using version 19.1 of SQL Developer to connect to a SQL2012 instance overseas..
Actually there were more problems, which I'll post here along with solutions:
In order to ba able to connect SQL Server database type from SQL developer it is needed to install jTDS driver, as already mentioned. Other types are not supported by SQL Developer.
Next thing was to configure with SQL Configuration Manager (the easiest way IMO) SQL Server to listen on IP port 1433, not dynamic, as was previously set. In order to do that in configuration manager I had to go to SQL Server Network Configuration and make appropriate changes. More here.
Next I had problem:
Status: Failur-I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property
Which was the fault of missing file, solution was placing file ntlmauth.dll to the /jdk/bin in SQL Developer directory.
I chose Windows authentication, which apparently is not supported by jTDS, so I needed to create user in SQL Server, which I use to connect SQL Server from SQL Developer.
After all that, I had it working.
I have a Toshiba laptop with Windows 7 on which I have installed SQL Server 2014 for my database and use Microsoft Access 2016 to manage the data in a user-friendly way.
Everything worked perfectly fine till I tried to connect to the database from another PC on the same network, also with Windows 7.
I am able to connect to the database from the second PC using Microsoft SQL Server Management Studio and SQL Server Native Client 11.0, logging in as sa using SQL Server authentication.
However, when I open the Microsoft Access database file from the second PC, a window pops up, saying that:
See this image.
And when I press OK a second window pops:
See this image.
I have configured the database to use a specific TCP/IP = 1433
Also made new inbound rules in windows firewall for all SQL Server services.
Please note that there is no domain involved here. I don't have a Windows server and the SQL Server is installed on PC #1.
If you require more information, please tell me, I'll be happy to provide
Hope someone will be able to help!
try to use LINKSERVER
Using SQL Server Management Studio
To create a linked server to another instance of SQL Server Using SQL Server Management Studio
In SQL Server Management Studio, open Object Explorer, expand Server Objects, right-click Linked Servers, and then click New Linked Server.
On the General page, in the Linked server box, type the name of the instance of SQL Server that you area linking to.
SQL Server
Identify the linked server as an instance of Microsoft SQL Server. If you use this method of defining a SQL Server linked server, the name specified in Linked server must be the network name of the server. Also, any tables retrieved from the server are from the default database defined for the login on the linked server.
Other data source
Specify an OLE DB server type other than SQL Server. Clicking this option activates the options below it.
Provider
Select an OLE DB data source from the list box. The OLE DB provider is registered with the given PROGID in the registry.
Product name
Type the product name of the OLE DB data source to add as a linked server.
Data source
Type the name of the data source as interpreted by the OLE DB provider. If you are connecting to an instance of SQL Server, provide the instance name.
Provider string
Type the unique programmatic identifier (PROGID) of the OLE DB provider that corresponds to the data source. For examples of valid provider strings, see sp_addlinkedserver (Transact-SQL).
Location
Type the location of the database as interpreted by the OLE DB provider.
Catalog
Type the name of the catalog to use when making a connection to the OLE DB provider.
http://www.quackit.com/sql_server/sql_server_2014/tutorial/linked_servers.cfm
So I have created a datasource (MS SQL SERVER 2008) with JDBC settings using console of OBIEE 11g.
Settings
I have used “Database Type: MS SQL Server” and “Database Driver: Other”, the URL and driver class will be as follows,
jdbc:weblogic:sqlserver://IP:1433
weblogic.jdbc.sqlserver.SQLServerDriver
This connection tested fine.
I want to use this datasource in my rpd. But since my obiee is installed in linux, i can not open my repository online. Therefore, I have to create a DSN in my windows system using Datasources (ODBC). Name of DSN in my windows and DS at EM is same. So when I deploy this RPD, it deploys fine. But if i create analysis based on this, it expects an ODBC driver to be installed and throws error, Datasource name not found and no default driver specified. Which seems logical because I created the datasource in ODBC at my windows system and rpd read those settings and expects odbc. I want to use the datasource created in EM. If thats not possible, how can i resolve odbc error.
When completing an Analysis, OBI will use a connection pool to connect to the database. This connection pool will connect from your OBI server, so you need to make sure the server is capable of making the ODBC connection too and that you've set up the connection pool properly.
On your Windows machine, where you're editing the RPD, the DSN connection will only be used for the purpose of importing database objects to the physical layer of the repository – it has nothing to do with how the BI server connects to the database at runtime.
I am trying to run openrowset from MS SQL Server on an Oracle server.
When i execute the following command:
select * from
OPENROWSET('OraOLEDB.Oracle','srv';'user';'pass',
'select * from table')
the following error occurs
Msg 7302, Level 16, State 1, Line 1
Cannot create an instance of OLE DB provider "OraOLEDB.Oracle" for linked server "(null)".
Can anyone tell me how I can use openrowset with OraOLEDB.Oracle?
I am using 64 bit version of MS SQL Server and Oracle OLEDB driver.
Edit
I have tried this on two machines running Windows 7 x64 & Windows Server 2008 x64 with MS SQL Server 2008 x64. Both showed the same error message.
In SQL Server Enterprise Manager, open \Server Objects\Linked Servers\Providers, right click on the OraOLEDB.Oracle provider, select properties and check the "Allow inprocess" option. Recreate your linked server and test again.
You can also execute the following query if you don't have access to SQL Server Management Studio :
EXEC master.dbo.sp_MSset_oledb_prop N'OraOLEDB.Oracle', N'AllowInProcess', 1
Ran into this issue where the linked server would work for users who were local admins on the server, but not for anyone else. After many hours of messing around, I managed to fix the problem using the following steps:
Run (CTRL + R) “dcomcnfg”. Navigate to “Component Services -> Computers -> My Computer -> DCOM Config”.
Open the properties page of “MSDAINITIALIZE”.
Copy the “Application ID” on the properties page.
Close out of “dcomcnfg”.
Run “regedit”. Navigate to “HKEY_CLASSES_ROOT\AppID{???}” with the ??? representing the application ID you copied in step #3.
Right click the “{???}” folder and select “Permissions”
Add the local administrators group to the permissions, grant them full control.
Close out of “regedit”.
Reboot the server.
Run “dcomconfig”. Navigate to “Component Services -> Computers -> My Computer -> DCOM Config”.
Open the properties page of “MSDAINITIALIZE”.
On the “Security” tab, select “Customize” under “Launch and Activation Permissions”, then click the “Edit” button.
Add “Authenticated Users” and grant them all 4 launch and activation permissions.
Close out of “dcomcnfg”.
Find the Oracle install root directory. “E:\Oracle” in my case.
Edit the security properties of the Oracle root directory. Add “Authenticated Users” and grant them “Read & Execute”, “List folder contents” and “Read” permissions. Apply the new permissions.
Click the “Advanced Permissions” button, then click “Change Permissions”. Select “Replace all child object permissions with inheritable permissions from this object”. Apply the new permissions.
Find the “OraOLEDB.Oracle” provider in SQL Server. Make sure the “Allow Inprocess” parameter is checked.
Reboot the server.
When connecting to SQL Server with Windows Authentication (as opposed to a local SQL Server account), attempting to use a linked server may result in the error message:
Cannot create an instance of OLE DB provider "(OLEDB provider name)"...
The most direct answer to this problem is provided by Microsoft KB 2647989, because "Security settings for the MSDAINITIALIZE DCOM class are incorrect."
The solution is to fix the security settings for MSDAINITIALIZE. In Windows Vista and later, the class is owned by TrustedInstaller, so the ownership of MSDAINITIALIZE must be changed before the security can be adjusted. The KB above has detailed instructions for doing so.
This MSDN blog post describes the reason:
MSDAINITIALIZE is a COM class that is provided by OLE DB. This class can parse OLE DB connection strings and load/initialize the provider based on property values in the connection string. MSDAINITILIAZE is initiated by users connected to SQL Server. If Windows Authentication is used to connect to SQL Server, then the provider is initialized under the logged in user account. If the logged in user is a SQL login, then provider is initialized under SQL Server service account. Based on the type of login used, permissions on MSDAINITIALIZE have to be provided accordingly.
The issue dates back at least to SQL Server 2000; KB 280106 from Microsoft describes the error (see "Message 3") and has the suggested fix of setting the In Process flag for the OLEDB provider.
While setting In Process can solve the immediate problem, it may not be what you want. According to Microsoft,
Instantiating the provider outside the SQL Server process protects the SQL Server process
from errors in the provider. When the provider is instantiated outside the SQL Server process,
updates or inserts referencing long columns (text, ntext, or image) are not allowed.
-- Linked Server Properties doc for SQL Server 2008 R2.
The better answer is to go with the Microsoft guidance and adjust the MSDAINITIALIZE security.
For error 7302 in particular, I discovered, in my registry, when looking for OraOLEDB.Oracle that the InprocServer32 location was wrong.
If that's the case, or you can't find that string in the registry, then you'll have to install or re-register the component.
I had to delete the key from the GUID level, and then find the ProgID (OraOLEDB.Oracle) key, and delete that too. (The ProgID links to the CLSID as a pair).
Then I re-registered OraOLEDB.Oracle by calling regsvr32.exe on ORAOLEDB*.dll.
Just re-registering alone didn't solve the problem, I had to delete the registry keys to make it point to the correct location. Alternatively, hack the InprocServer32 location.
Now I have error 7308, about single threaded apartments; rolling on!
Received this same error on SQL Server 2017 trying to link to Oracle 12c. We were able to use Oracle's SQL Developer to connect to the source database, but the linked server kept throwing the 7302 error.
In the end, we stopped all SQL Services, then re-installed the ODAC components. Started the SQL Services back up and voila!
Aside from other great responses, I just had to give NTFS permissions to the Oracle installation folder.
(I gave read access)
Similar situation for following configuration:
Windows Server 2012 R2 Standard
MS SQL server 2008 (tested also SQL 2012)
Oracle 10g client (OracleDB v8.1.7)
MSDAORA provider
Error ID: 7302
My solution:
Install 32bit MS SQL Server (64bit MSDAORA doesn't exist)
Install 32bit Oracle 10g 10.2.0.5 patch (set W7 compatibility on setup.exe)
Restart SQL services
Check Allow in process in MSDAORA provider
Test linked oracle server connection
Just enable option "Allow in process" on the properties of the OraOLEDB.oracle provider as below
[open server objects > Linked Severs > providers] 1 [right click on
OraOLEDB.oracle > properties ] 2 then choose optaion "Allow in
process" and click ok