I've managed to connect my SQL Server 2005 in Windows 64 bit server with ORACLE database. (Thanks to Mr. Jeyong Park :http://knol.google.com/k/jeyong-park/accessing-oracle-data-source-from-64bit/3vywlm4f31xae/12)
The problem is :
In SSIS when I used Oracle as a OLE DB Data Source and previewed the data, it works, however, when I run the Package, the OLE DB Data Source task failed with the message :
[OLE DB Source [10882]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager "PROD_cm" failed with error code 0xC0202009.
There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Since I can preview the data, I think there's no problem with the connection.
Please help...
When I encountered this problem a year ago with SQL Server 2008 on Windows Server 2003 64-bit the issue was caused by incorrect drivers. What is the version of the Oracle database to which you are connecting? If you are connecting to a 8g or 9i Oracle server, then you need to use the 9i Oracle drivers. If you are connecting to a 10g or better server, then you can use the 11i drivers.
Have you tried running the SSIS package while logged into the server as the SQL Server Agent service account or have you only tested this on your workstation? If it works on your workstation and doesn't work while logged into the server as the service account, then this screams driver issue to me.
Another possible problem is that you tnsnames.ora file may not be correctly setup. The file contents should be something like the below code for the 9.2 drivers. Please note you need to replace , , and with appropriate values.
# tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
<SERVER_NAME> =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP_ADDRESS>)(PORT = <PORT_NUMBER>))
)
(CONNECT_DATA =
(SID = <SERVER_NAME>
(SERVER = DEDICATED)
)
)
One more possible solution. If you can get the linked server connection working and cannot get the data flow to work for some reason, then you could execute a linked server query to pull down the data. I remember doing this for about 6 months when we couldn't get the MYSQL drivers to work with the CTP of SQL Server 2008. Eventually we found the right solution, but this helped us through the short-run period to get up and running.
One of The following should work:
Check the tnsnames.ora file - It should have the connection details to the Oracle DB hat you are trying to connect through your package.
Check if the Oracle DB you are trying to connect to is working. I wasted around two days finding a root cause of the error and later came to know that the Oracle DB was shut down.
Check that the passowrds are intact in the configuration manager/Connection string.
If you have been working for long on the package try closing and opening it again. The
Related
the cmd execution of registerRExt.exe
I am trying to install RRE(Revolution R Enterprise) v7.5 with RR0 3.2.2(Revolution R Open) on a SQL Server 2016 RC0 default instance. All the steps shown in the https://msdn.microsoft.com/en-us/library/mt590808.aspx have been completed and the error occurs in the Post installation Server configuration scripts. The script has also been replaced by the updated script for RC0 shown on the msdn site but still I get the same error on running the registerRExt.exe file.
The site shows while installing the instance the account name for Server Database engine has to be MSSQLSERVER, however this had also resulted in an error stating wait on database recovery handle failed which was sorted by changing the account name of Database engine to NT AUTHORITY/SYSTEM(I provided this info as it can also be the cause of the problem) . Now I need to sort the user pool failure. Any help would be appreciated..thanks in advance
SQL 2016 RC1 was just released https://blogs.technet.microsoft.com/dataplatforminsider/2016/03/18/sql-server-2016-release-candidate-1-now-available/.
SQL RC1 has a newer version 8.0.1 version of RRE. I suggest your try to install it and reply to this thread again if you hit the same failure. https://msdn.microsoft.com/library/mt590809.aspx has the details on where to find Microsoft R Open 8.0.1 and Revolution R Enterprise 8.0.1.
If the issue persists RevoScaleR\rxLibs\x64\registerrext.log would have more details on the exact failure - do share that.
I was able to sort out the issue..It was because I was installing the SQL server on domain controller and ignored the warning while install, but then changing some rules and demoting it from Server Manager worked and the install was successful.
However I do know there may be some better solution to that as all the other user accounts got reset in the process.
I try to connect a PostgreSQL to SQL Server 2012 server as linked server
I found some advices on different forum and follow it. But I'm stuck with an authentication problem.
I explain:
On the SQL Server, I have install the ODBC driver for PostgreSQL (psqlodbc_09_02_0100-x64). I created a system DSN to a specific database on the PostgreSQL. This DSN work correctly.
Using SSMS, I run this command to add the linked server:
EXEC master.dbo.sp_addlinkedserver
#server = N'lnk_test',
#srvproduct=N'PostgreSQL Unicode(x64)',
#provider=N'MSDASQL',
#provstr=N'Driver=PostgreSQL Unicode(x64);uid=postgres;Server=test1;database=accueil;pwd=MyPassword;SSLmode=disable;PORT=5432'
EXEC master.dbo.sp_addlinkedsrvlogin
#rmtsrvname=N'lnk_test',
#useself=N'True',
#locallogin=NULL,
#rmtuser=NULL,
#rmtpassword=NULL
After running, I have a new Linked Server called "lnk_test". When I receive the following error message:
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "pgTest1_accueil".
OLE DB provider "MSDASQL" for linked server "pgTest1_accueil" returned message "[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed".
OLE DB provider "MSDASQL" for linked server "pgTest1_accueil" returned message "FATAL: authentification par mot de passe échouée pour l'utilisateur « postgres »". (Microsoft SQL Server, Error: 7303)
The error message is in french, the traduction is: "authentication by password failed for user "postgres". I find the same error message in the log of the PostgreSQL server.
Is someone have an idea for resolving this problem?
Thanks in advance.
Jerome
[Update 2/08/2013]
I complete this post with the result of a test I realize today.
WHen using a packet sniffer, I check the packets sended when testing the connection through the ODBS Data Source Administrator (64-bit) and through the Linked Server under SSMS.
The data are the same between the 2 system for:
Opening the connection to the PostgreSQL
Sending the connection string (all parameters are the same)
the response of PostgreSQL asking for password (only different is the salt value, but it's normal)
the password are sended in the same way (crypted with MD5)
But after, the response of the server differ:
For the ODBC Data Source, all works correctly. I receive the authentication and can send test query.
For SSMS, I receive an error message (as describe upper).
Ok, I found the solution.
In the pg_hba.conf file, I change the method for sending passwords from MD5 to trust. After reloading the server, my linked server connection works.
the entry is now:
Type Database User Address Method
host all all x.x.x.x/x trust
In hope that help others peoples.
I think I found the answer; I was still getting the error with a recent version of the ODBC driver and Postgres 10.x.
The connection will work when tested in the Windows ODBC diaglog, but will fail in SQL Server. When setting the password for the remote user, place the password in curly braces.
{password}
This will keep the ODBC connection string from getting screwed up if you have certain symbols in your user's password.
I am currently reading through a book about MVVM and I need to use the Northwind database for the next section. Unfortunately, when I try to add Northwind to my project, I get the following error:
"An error occurred while connecting to the database. The database might be unavailable. An exception of type 'Microsoft.Data.ConnectionUI.SqlDatabaseFileUpgradeRequiredException' occurred. The error message is: 'This database file is not compatible with the current instance of SQL Server.'"
I haven't installed an SQL Server, just Visual Studio 2012. The book instructs me to add the .MDF file to the project, set it as an Entity Data Model, and then to generate from database. It's on the next screen where I get the error. I use NORTHWND.MDF as the data connection and the entity connection string is as follows:
metadata=res:///Model1.csdl|res:///Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=(LocalDB)\v11.0;attachdbfilename=|DataDirectory|\NORTHWND.MDF;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"
In the book, this reads:
metadata=res:///Model1.csdl|res:///Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated Security=True;UserInstance=True"
I have tried using both data sources and neither work.
Also of note, the sample code that goes along with the book doesn't work either. It compiles and launches, but in the server explorer, NORTHWND.MDF has an 'x' in the icon and upon launch none of the data is there.
When I attempt to upgrade the database, I get an error saying:
"Database '...\NORTHWND.MDF' cannot be upgraded because its non-release version (539) is not supported by this version of SQL Server. You cannot open a database that is incompatible with this version of sqlservr.exe. You must re-create the database..."
If anybody could give me any tips on how to get this working, I would certainly appreciate it.
my simple way:
go to VisualStadio 2012
In Server Explorer Windows
open Data Connections
Right click on ASPNETDB.MDF
click on Modify Connection...
a new windows open for you ... you just click OK
if other windows open for you click Yes
FINISH ( be Happy ) :D
If we are trying to attach .mdf file in SQL Express mode in our development project and while adding .mdf file in App_Data folder we are getting exception like below :
"The database file is not compatible with the current instance of sql server...."
Then we can go to Server explorer window → go to Data connections → go to "your database" → right click on Modify connection → check the Data sources and Database file name, then use windows Authentication and press OK.
It works for me.
one way to potentially fix it is, install Sql Server 2012 Express and use database connection to sql server. Do not use local database. That might work. Just a suggestion.
Also as an extra note, you might want to download SQL Server 2012 Management Studio (I believe it comes with the above download as a component that you have select). With Management Studio Installed, you can test the database connectivity separately, create tables, run queries etc. This will make troubleshooting a lot easier.
Visual Studio doesn't install any database server by default so you can't connect to one. The MDF file is just the file where SQL Server stores its data, it's not a standalone database.
You have to install some version of SQL Server 2012 Express for both connection strings to work.
The first connection string uses the LocalDB feature which is essentially a minimal installation of SQL Server 2012 Exrpess (~ 35 ΜΒ). You can only connect to LocalDB from your machine which makes it useful only for development purposes.
The second connection string connects to an actual instance of SQL Server Express, called SQLExpress, installed on your local machine. The second connection string attaches the MDF file to the server as a User Instance, which means that the file is released when you stop using it.
The SQL Server Express downloads range from 130 MB to 1.3 GB depending on which version you download (minimal to full with advanced services).
Northwind database is not readily compatible with 2012, the compatible version of Northwind database for sql server 2012 can be downloaded from the below link, and after downloading .mdf file we can easily attach it with sql server 2012. I have found the following and it helped me, hope it will help you. How to Attach Northwind Database in Sql Server 2012
First go to data connection as on pic:1
2.Then browser your mdf file press ok and it will automatically convert the database.
picture:01
picture:02
Modify connection may solves the problem, but I am not sure whether the type of this database file is changed.
I have found a way to solve this problem if you have installed the database Server corresponding to the database file. You just need to change the default database Server of your visual studio.
On the menu, choose Tools-> Options -> Database tools, then on the data connections enter the SQL server Instance name corresponding to your database file which you have installed,then press Ok.
Next step is also important, it is necessary to click 'refresh' or delete the database filename in Data Connection and reopen the file, the file will be added to Data Connection again and open successfully.
This is what worked for me:
On the Add Connection dialog box, click Advanced.
Scroll down to the bottom and look for a field called Data Source.
Change it from (localdb)\MSSQLlocalDB to .\SQLEXPRESS.
Quick question: How do I get some kind of database to use to test my SQL syntax and create basic data.
I have Sqlite Code which I'll soon put on a server. I have SQL Server 2008 installed with visual studio 2010. I tried connecting to the database and had no luck.
I also tried using an .mdf file instead thinking it's a file and I won't have connectivity issues. Wrong, I still couldn't connect and I used this site to help me (i'm aware its 2005)
In that case I used:
var conn = new SqlConnection(#"Server=.\SQLExpress;AttachDbFilename=C:\dev\src\test\SQL_DB_VS_Test\test.mdf;Database=dbo;Trusted_Connection=Yes;");
exception
Unable to open the physical file "C:\dev\src\test\SQL_DB_VS_Test\test.mdf".
Operating system error 5: "5(Access is denied.)".
Cannot attach the file 'C:\dev\src\test\SQL_DB_VS_Test\test.mdf' as database 'dbo'.
With trusted = no I get Login failed for user ''. (What user am I suppose to set?). I created the .mdf with Visual Studio somehow.
What if you try this connection string:
var conn = new SqlConnection(#"Server=.\SQLExpress;
AttachDbFilename=C:\dev\src\test\SQL_DB_VS_Test\test.mdf;
Database=test;Integrated Security=SSPI;");
I don't think it's a good idea to call your database "dbo" (that's a SQL Server keyword - I wouldn't use it for my own purposes!), and also I believe you need to use Integrated Security=SSPI; to define Windows authentication - Trusted_Connection is not used for SQL Server connection strings, AFAIK.
Have you tried using SSMS to access your local instance? It's helpful for getting connected and getting everything setup. Also, I think the default install of Sql Express with VS only support trusted connections.
After creating the mdf file with visual studios right click the mdf and select properties. In it you'll see a row called Connection String. Copy/paste it into your app and it should connect. The key part is User Instance=True
I have this problem which I am trying to debug for a lot of time.
The setup is like this:
i. The application is a Windows application developed using VS2005, .net 2.0.
ii. I use the Cyrstal reports component Crystal Report Viewer and dynamically display various reports in the same form.
iii. The db is SQLSERVER Express 2005 and situated on a different machine.
When I run the application on the db server, I am able to view the report. However, when I run the application on a different machine which is connected to the above dbServer, I get an error. ( I dont get this error on my dev setup)
Source: CrystakReprotViewer.CS:SendDBLogonForReport() Details:Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
SQL State: 08001
Native Error:
Error in File C:\DOCUME~1\admin\LOCALS~1\Temp\ActionPoints {52820D22-199C-4D46-A76B-70A55D9F54D5}.rpt:
Unable to connect: incorrect log on parameters. at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable)
at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)
at Trivalve.UI.Client.Reports.CrystalViewer.CrystalReportViewer.SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument) in D:\Ramjee\Work\Projects\Trivalve\Trivalve\src\tfssetup\2008\Trivalve_2008\Trivalve\Reports\CrystalViewer\CrystalReportViewer.cs:line 127 rptcontrollers.dll SetTableLocation
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Thanks,
Ramjee
Use datasource=servername or ip address\instance name if available,port number
Default port number is 1433 or 1434
My problem was solved with this. Posting for the use of others.
If this is a standard installation of SQL Server Express, bear in mind that the only connection method installed by default is shared memory, and is only available on the server -- you would need to enable another connection protocol such as Named pipes or TCP/IP. To turn networking on, Use SQL Server Configuration Manager to enable relevant protocols and start SQL Browser.
It's telling you exactly what's wrong.
Details:Logon failed.
Great, we can't logon.
(Invalid Instance()).]Invalid
connection.
Okay. I bet we have "localhost" as part of the instance name in my connection string. Since I'm no longer on the "localhost", this obviously won't work. Let's try there first. Then perhaps it's the credentials that I'm using to query my database. Usually what I do is create a RO user that can only do selects on my db and use that for CR. If none of these are getting me close, let's try making sure that remote connections are enabled for SQLEXPRESS
Unable to connect: incorrect log on
parameters.
Ok it's definitely a connection issue.