Oracle SQL Developer connection to Microsoft SQL Server - sql-server

I have been trying without any success to get the latest version of Oracle SQL Developer (4.0.2) to connect to Microsoft SQL server using Windows authentication. I have downloaded and copied the ntmlauth.dll (and also JtdsXA.dll) file from jtds-1.3.1-dist to every location I can think of that developer would be looking for it but when I try and set up a new connection via the SQLServer tab clicking on the "Use Windows Authentication" option, all I get is the message "Status: Failure -I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property." I can however connect to the database using Toad for SQL Server or SSMS without any problems, but would prefer if possible to use SQL Developer.

Just copy ..\jtds-1.3.1-dist\x64\SSO\ntlmauth.dll to -> ..\sqldeveloper\jdk\jre\bin folder for x64 systems. Copy-paste similar folder contents for x86 systems as well.

I had the exact same problem. I eventually got it to work by placing the ntlmauth.dll in the jdk\jre\bin folder under the sql-developer directory itself. For some reason sql-developer ships with its own jdk, which I found by browsing around. I spent hours trying to figure out why the placement of the aforementioned DLL in the various system level jre directories (i.e. C:\Program Files\Java\jre7\bin) didn't work.
If anyone here knows why placement of ntlmauth.dll in the sql-developer\jdk\jre\bin folder worked while placement in the system level jre folders did not I would be interested.
My OS = Windows 2007 64-bit
jtds = jtds-1.2.7

The reason is pretty simple; SQLDEVELOPER doesn't know about the system level jre that was installed. Oracle bundles SQLDEVELOPER with and without JAVA. If you downloaded the one without java then when you first start the app you will be prompted for the location of the java_home. If you install the SQLDEVELOPER version that already has java installed then it just works -- no prompt. In your case, you installed the version with java already packaged with the app.
So the root of the question then is the system level jre is not used by SQLDEVELOPER (in your particular installation) so the ntlmauth.dll that you placed in that directory is never used.

After adding jTDS drivers (jtds-1.3.1) to Oracle SQL Developer (Tools->Preferences->Database->Third Party JDBC Drivers), I located the SQL Developer's ide.conf file and added the following lines:
#jTDS
Add64VMOption -Djava.library.path=../../drivers/jtds-1.3.1-dist/x64/SSO
Add32VMOption -Djava.library.path=../../drivers/jtds-1.3.1-dist/x86/SSO
This adds to JVM Library Path the location of ntlmauth.dll library

Related

I Cannot Install SQL Server 2019 Express. It gets stuck on Offline Installation of Microsoft Machine Learning Server Components

I'm trying to install SQL Server 2019 Express on my laptop. I initially click on custom to start and everything seems to go smooth up to the point where it's at the Offline Installation of Microsoft Machine Learning Server Components section.
When I get there I get a screenshot that looks like this:
From this point on I cannot figure out what to do next. I tried creating a directory, downloading all of the files listed to that directory, and enter that directory in the Install Path line. But when I do that the Next button still is disabled.
So what is the next step?
Thanks for any help
Download the 4 cab files below (same links in your screenshot):
SRO_3.5.2.125_1033.cab
SRS_9.4.7.25_1033.cab
SPO_4.5.12.120_1033.cab
SPS_9.4.7.25_1033.cab
then, create a new folder MLMcServer in your C: drive C:\MLMcServer.
Put the 4 files there without extracting them
Finally, return to the installation dialog and browse to the location of the created folder C:\MLMcServer
You, No need the Machine Learning Services – Offline. you can untick Machine Learning Services in the feature session. Otherwise, you need that. You have to download the correct files that match the version of SQL you're installing. The files you're using from that link provided will not work since it is an older version and you are installing 2019, have you tried: learn.microsoft.com/en-us/sql/advanced-analytics/install/sql-ml-component-install-without-internet-access?view=sql-server-ver15 Those are the current files for 2019 RTM.
Anyone using a SQL Server installer in another language should know that downloading the files and placing them in a folder for the installer to detect will not work. What worked for me is to use the English installer.
If you want you can use the SQL Server installer in another language, but uncheck the features of Microsoft Machine Learning Server; When you have finished installing the SQL Server instance and the other features, you must now run the installer in English, select that you want to add features to an existing instance, mark the missing features of Microsoft Machine Learning Server and go through the steps of downloading the files and place them in a folder, select the folder where the four files are and the Next button will work correctly.
Downloading the .cab files, does not work.
Downloading the .iso files, does not work.
Only solution is moving the client to mySQL, where they should have been all along.
Not being lead around the nose by Microsoft.

JTDS driver not working for Sql Server 2008R2 and Denali Native SSPI library not loaded. Check the java.library.path system property

I am trying to connect Sql Server Data Base using windows authentication from my application using JTDS driver but i got following error
SSO Failed: Native SSPI library not
loaded. Check the java.library.path
system property.
Following are the scenarios where i tried to resolve but still something is missing..
i have added ntlmauth.dll in system directory and it works fine for Sql server 2005.
But the same thing i tried for Sql Server 2008 R2 and Denali but it gives me the same error as i mentioned above
Also i considered bit i mean i copied ntlmauth.dll from x64\SSO\ path in system directory.
I an confused why this is not working for Sql Server 2008 R2 and Denali.
Try by placing the ntlmauth.dll file in the bin folder of your Java Runtime Environment (e.g. C:\Program Files\Java\jre7\bin).
Be sure to match the "bitness" (32 bit or 64 bit) of the DLL with the JVM bitness.
I ran into the same issue using SQL Server Express 2008 R2 and this MSDN SQL Server Forum Article recommended this resolution, which worked for me.
Apart from putting it into your JRE directly, you can also just specify the java.library.path as such:
-Djava.library.path=C:\jtds-1.3.1-dist\x64\SSO
The above directory would then contain the ntlmauth.dll file
In addition to DeChrist's response, I had to add the same dll file in the bin folder of C:\Program Files\Java\jdk1.8.0_91\jre\bin also. In that case, it worked for me.

Embedding SQL Server into a .NET application

Hey, I've just finished writing a VB.NET application. Now I want to package the executable and the database ofcourse into a single installer file. I tried using QSetup, InstallShield to make SQL Server embedded into the setup file, and finally after hours of try&fail I have no idea. Anyone?
You can do a rightmouse on the properties of your Visual Studio Setup Project, and then there is this button 'Prerequisites'. There you can tick 'SQL Server Express ...' Or the 'SQL Server Compact 3.5'
link to image
You're probably best off just to set the connection file directly to the mdf, and attach it when the program is run. This is easier as it doesn't require a custom setup script to install the database to the database directory itself.
Note: Consider using the Compact Version, it's smaller, people don't like a full blown engine on their computer :)
InstallShield has a concept called Setup Prerequisites where you can teach it how to install additional packages along with your own. In older versions this would happen before calling your MSI. In newer versions you can have a "Feature" prerequisite where the prereq can associated to a feature and only installed if that feature is selected to be installed and after it's been selected but still before the main activity of your MSI occurs during the install execute sequence.
InstallShield also has a pattern for executing SQL scripts against your database instance so that you can then load your database into your newly installed instance.
All of this is quite powerful but it does take a bit of digging to learn.
As far as I know, anything but the SQL Server Compact Edition (SQL Server CE) cannot be embedded into your setup, really. Microsoft doesn't want that - you need to have SQL Server Express installed separately - any other edition can't even be shipped with your software (the client must have a license and installation separately).
You can indeed distribute SQL server with your custom application:
http://msdn.microsoft.com/en-us/library/bb264562(SQL.90).aspx

SQL Server Compact error: Unable to load DLL 'sqlceme35.dll'. The specified module could not be found

I'm developing a Windows Forms application using Visual Studio 2008 C# that uses an SQL Server Compact 3.5 database on the client. The client will most likely be 32 bit Windows XP or Windows Vista machines. I'm using a standard Windows Installer project that creates an MSI file and setup.exe to install the application on a client machine. I'm new to SQL Server Compact, so I haven't had to distribute a client database like this before now. When I run the setup.exe (on new Windows XP 32 bit with SP2 and Internet Explorer 7) it installs fine, but when I run the application I get this error:
Unable to load DLL 'sqlceme35.dll'. The specified module could not be found
I spent a few hours searching for this error already, but all I could find were issues relating to installing on 64 bit Windows and none relating to normal 32 bit that I'm using.
The install application copies the all the dependent files that it found into the specified install directory, including the System.Data.SqlServerCe.dll file (assembly version 3.5.1.0). The database file is in a directory called 'data' off the application directory, and the connection string for it is
<add name="Tickets.ieOutlet.Properties.Settings.TicketsLocalConnectionString" connectionString="Data Source=|DataDirectory|\data\TicketsLocal.sdf" providerName="Microsoft.SqlServerCe.Client.3.5" />
Some questions I have:
Should the application be able to find the DLL file if it's in the same directory, that is, local to the application, or do I need to install it in the GAC? (If so, can I use the Windows Installer to install a DLL file in the GAC?)
Is there anything else I need to distribute with the application in order to use a SQL Server Compact database?
There are other DLL files also, such as MS interop for exporting data to Excel on the client. Do these need to be installed in the GAC or will locating them in the application directory suffice?
You don't need it to be in the GAC for SQL Server Compact to run, and it will pick them up from the application directory. There are several ways to deploy an SQL Server Compact project. The two main ways are:
Deploying the SQL Server Compact redistributable installer with your project, but this way is painful and also can be unistalled by the end user, or upgraded by Windows updates and breaking your application.
Including the DLL files in your application folder. Depending on the features of SQL Server Compact you are using (replication or whatever), there is a handful of DLL files to deploy in your application folder.
If you have SQL Server Compact installed on your machine, they are most likely located at "C:\Program Files\Microsoft SQL Server Compact Edition\v3.5". They can be added to the project in Visual Studio and then set their project output type to "copy always". And the main reference to System.Data.SqlServerCe that you have in your project references should have copy local set to true.
sqlceca35.dll
sqlcecompact35.dll
sqlceer35en.dll
sqlceoledb35.dll
sqlceqp35.dll
sqlcese35.dll
If you have these all set, then in your installer project all you have to include is the project output of this project and you're good. In my opinion this is the only way to go. It is a simple deployment, of a couple of files and you are in control of what DLL versions your application uses.
I hope that helps.
I had a similar problem, a Visual Studio 2008 Windows application targeting 32-bit Windows XP and Windows Vista that used SQL Server Compact 3.5 SP1 - that then got this error when installed on 64-bit Windows 7:
Unable to load DLL 'sqlceme35.dll'. The specified module could not be found
I was embedding an MSI for SQL Server Compact into the installer for the application.
Following this rather confused discussion on MSDN revealed that I needed to use the 64-bit MSI for SQL Server Compact on 64-bit machines. D'oh! That is, from page Microsoft SQL Server Compact 3.5 Service Pack 1 and Synchronization Services for ADO.NET version 1.0 Service Pack 1 for Windows Desktop I needed SSCERuntime-ENU-x64.msi rather than SSCERuntime-ENU-x86.msi for 64-bit machines.
How to: Deploy a SQL Server Compact Edition Database with an Application should help, at least with your first two questions.
In general, I think you should not install anything in the GAC for a single application.
The following provide a solution to the problem and an explanation also.
Troubleshooting: Can’t load SQL Server Compact DLL
SqlCeException on application's first use of SQL Server Compact
Laxmi Narsimha Rao Oruganti 's blog
I hope this helps.

How can I install SQL Server Express 2008 with Advanced Services?

Has anyone successfully installed SQL Server Express 2008 with Advanced Services?
I've tried several times and half way through the installation I always get the error:
The downloaded file appears to be corrupt.
I found this thread on MSDN but it seems that no one there could get it to work. They were only successful in installing the 'SQL Server 2008 Express with Tools' (default) option.
I need to have Full-text Search so I need the 'Advanced Services' option. If anyone has successfully installed this then would be they so kind as to share the method used?
My experience in XP Pro SP3 and how I got through it. I went to the download page and clicked on the download link to install any version which downloads a bootstrapper (SQLEXP32_x86_ENU_Bootstraper.exe) which if you select the advanced services edition fails to load the install file (SQLEXPRADV_x86_ENU.exe) . After many headaches,disk cleanup, etc. I tried the link for the specific advanced services edition. This downloads the file (SQLEXPRADV_x86_ENU.exe) itself which can then be run. I had to run it from the command prompt, but that's probably just my persinickety system. At any rate, while there are probably more problems ahead, at least this get the installer running. It comes up with the SQL Server Installation and you have to step through it manually.
BTW I tried to post this to the social.microsoft site but couldn't log in.
Just curious if you've tried re-downloading the file from Microsoft's servers? If I remember right there was a 'blip' where some of the files posted to the servers were, in fact, corrupt.
I agree with Thomas that there are some really funny things going on with XP SP3 and SQL Server 2008 installs, particularly if you use a non-English locale. But the log files in that case should yield problems indicating an MSXML 6 problem (due to the MSXML files becoming protected), not a corrupt download file.
If you download the file again and run it, can you post the contents of the most recent Summary*.txt file you find on your C: drive? Just search for summary*.txt and it should be in a folder like...
%Program Files%\Microsoft SQL Server\Setup Bootstrap\Log\
...(but I forget exactly where Express puts this). This log file may yield better errors than the handful of exceptions the GUI has been coded to handle.
Visit http://forums.extremeoverclocking.com/t303972.html
as of Nov 2009 the SQLEXPRADVx86ENU.exe claims to be 502M on the download page, but downloads as 356M, and does not execute. This happens on both a T1 and a DSL connection, so I'm fairly sure it's not the download failing.
I was able to install the "Runtime with Advanced Services" by using the unpleasantly painful Web Platform Installer.

Resources