I would like to ask question about connection managers OLE DB Provider. Accidentally i have two copies of OLE DB Provider (Copy1 and Copy2) on my computer. Copy2 is not registered on Server, but if i want to use Copy1 username and password is gray / non editable.
Why? In users DSN i have both – DB DB2COPY1 and DB2COPY2
How can i enable COPY1 to be edited (username and password) ?
Prints from Visual studio 2015
If I click on Data Links i see this error
Thanks
Answer found! :) maybe it will be helpful for someone. First copy was just IBM Server Client Version, Second copy was Server Runtime Client.
So i unistalled both, then install Server Runtime Client as First copy and it works
Related
I have developed a c# windows application which uses SQL server 2012 database in Visual Studio 2015 which is running well on my pc.
I am to install this application on a number of computers without SQL server installed on it, but when I run the application, its gives me database connection error.
My question is, how can I create the setup file to be able to run the app on those clients pc without installing SQL server on all those computers. Please I need your help.
Thank you.
Am Emmanuel.
Use an Azure database and have the clients connect to that.
Have a look at https://azure.microsoft.com/en-us/services/sql-database/
Alter your application connection string and make sure you keep the connection string secret.
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin#myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;
An important fact is that the clients need to allow communication via port 1433.
If this is not an option create an API application and query the database via that.
If you need a private database per client you can use a database file and connect to the file
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15
Update based on reply
You can create a pop-up on the application allowing the users to add valid settings and credentials when your appsettings.json is blank or "a test connect" to the database fails.
Is it possible to connect to a SQL Server LocalDB using JDBC? It appears that (as of Dec 2011) it was not possible.
Do you know of a workaround or change in status?
Yes, it is possible.
The connection string for a LocalDB instance using jTDS looks like this:
jdbc:jtds:sqlserver://./DatabaseName;instance=LOCALDB#88893A09;namedPipe=true
This works as of jTDS 1.3.2. You can download a release here:
https://github.com/milesibastos/jTDS/releases/download/v1.3.2/jtds-1.3.2-dist.zip
To find the named pipe for your desired LocalDB, run
SqlLocalDb info NameOfTheLocalDBInstance
which will give you something like np:\\.\pipe\LOCALDB#88893A09\tsql\query
It's probably best to connect with a specific username/password, so create a login and user for your database in that LocalDB instance as well (if you haven't already):
sqlcmd -S np:\\.\pipe\LOCALDB#88893A09\tsql\query
CREATE LOGIN dbuser WITH PASSWORD = 'dbpassword'
GO
CREATE USER dbuser
GO
ALTER AUTHORIZATION ON DATABASE::DatabaseName TO dbuser
GO
Is it possible to connect to a SQL Server LocalDB using JDBC?
Not with Microsoft's JDBC Driver.
The jTDS JDBC driver supports named pipes.
Executing SqlLocalDB.exe info MyInstance will get you (along with other info) the instance pipe name such as "np:\.\pipe\LOCALDB#F365A78E\tsql\query".
Do you know of a workaround or change in status?
Possible workarounds are using alternative JDBC drivers or switching to SQL Server 2012 Express instead of LocalDB.
Details:
The Microsoft JDBC Driver is not compatible with LocalDB.
"Unfortunately, the Microsoft JDBC Driver does not support connecting to LocalDB. This happens because LocalDB only supports Named Pipes connections and our current JDBC implementation does not support Named Pipes. One possible work around for your developers is to download and install SQL Express, which and enable its TCP/IP support."
Luiz Fernando Santos (MSFT) July 06, 2012
"Unfortunately JDBC driver doesn't support LocalDB at this moment and there is no easy workaround. The team is aware of this missing feature, but filing a connect item is always helpful for DCR tracking and prioritization."
Krzysztof Kozielczyk - MSFT 22 Dec 2011
"Do you use SQL Server Express today for local development? Are you working on Windows or another platform? It would be great to hear more about how you would like to use LocalDB with your Java app."
Shamitha Reddy, Program Manager Microsoft JDBC Driver for SQL Server, Microsoft JDBC Driver Product Team 13 Apr 2012
I did my research today to setup connection using jTDS and named pipes.
The state at today is: IMPOSSIBLE!
There is not possible to build connect string to localDB using jTDS due to its pipe name limitations. See open issue here: http://sourceforge.net/p/jtds/bugs/716/
As mentioned localDB does not supports other connection but namedPipes, so it looks like mission impossible so far...
rgds
Edit:
As mentioned in comment there is patch in issue linked above and you can use this to fix the problem. Sorry I can not check this for myself.
To Know LocalDb & Instance :
Right click on LocalDb in Object explorer
Select Properties
click on view connection properties
you will get all information about local and webserver details
When I install SQL Server 2008 R2, the Database Engine Services feature don't install due to the error "The Trust Relationship between the primary domain and the trusted domain failed."
For context, I'm trying to get into ASP.NET MVC3 and when I try to add/browse a database in Visual Studio 2010, I get errors saying that it can't connect to the SQL Express database, Error 40. When I run the SQL Server Configuration Manager, and select the SQL Server Services, I get "The remote procedure call failed [0x800706be]"
I did some research, regarding this error 40; I've tried, to run Server Configuration Manager as a Administrator, change the TCP/IP settings in Client Protocols to Enabled, and it still didn't work. I uninstalled SQL Server 2008 R2 and reinstalled it and found that the Database Engine Services and SQL Server Replication failed to install, with the error message "The Trust Relationship between the primary domain and the trusted domain failed."
Any ideas?
Delete EVERYTHING.
This is dedicated to anyone who thought like me and thought you could get rid of one or two things, and reinstall. Anything with SQL Server, delete it. Make that Add/Remove Programs as clean as possible before reinstalling the server.
Also, be sure to have administrative rights/run as Admin turned on. Otherwise you may have a SQLEXPRESS server running, but you can't access it (or because of my work computer) delete it due to a user rights issue that goes beyond the scope of Stack Overflow. :)
In that case, you should be able to install a new instance (I.E. SQLEXPRESS1). Just be sure to check your data connection strings. :)
I am using Visual Studio 2010/c# and created an application where I am trying to access as a data source,a database which I created in SQLSERVER Express (via management studio).
I have several instances from previous installs which I remove -
SQL COnfiguration manager just shows 1 instance SQLEXPRESS which got installed as a named instance "mymachine/sqlexpress".
Named pipes, TCP/IP and remote clients are all enabled.
I am running under windows 7 64 bit and both the dev environment and sql are in the same PC.
When I try and configure the connection I go to the physical path where the file resides, add it but the test connection button fails with the msg failed to generate a user instance of sql server, only an integrated connection can generate an user instance
The solutions I found don't seem to apply.
User Instance is already enabled (set to 1) and I could not find any path to remove "old instances" there is only 1 path leading to the currently installed Instance.
Help would be appreciated
Using Visual Studio SQL Server database through IIS7,
they use default asp.net database.
Following might help,
Open IIS manager.
create a new application pool instead of using default application pool and keep your database in that.
Go to sql configuration manager > go to properties.
Select local system instead of built in system.
In the default browser option, Delete all the other files and paste your .asmx file.
See in actions. If anything is disabled, enable it.
Hope it helps. :)
I have two computers with two (ostensibly) identical installations of SQL Server Express 2008 R2, both running Windows 7 64-bit. On one computer (call it "red"), I can execute the following mathematica code to open a connection to the database and read data
Needs["DatabaseLink`"]
conn = OpenSQLConnection[
JDBC[
"Microsoft SQL Server(jTDS)",
"localhost"],
"Instance" -> "SQLExpress"]
I have the jTDS driver for sql server installed in c:\windows\system32\ntlmauth.dll. I copied the dll from the working machine "red" to the non-working machine "black."
I used the SQL-Server import and export tool to transfer a very simple database from "red" to "black" and verified that the database is accessible by running LinqPad on "black" and reading data. All good.
Now, I try to run the Mathematica code above on "black" and I get an undiagnosable error message, namely:
JDBC::error: "!(TraditionalForm`\"Network error IOException: Connection refused: connect\") "
I just know this is going to be one of those nightmarish permission issues with the localservice account or the network-service account. I do not have Sql-Server Management Studio on machine "black" and I was unable to find the appropriate version of SSMS to install for SQL Server 2008 R2 Express (the SSMS Express 2008 version does not install, citing "known compatibility issues.") I don't really miss SSMS since LinqPad works fine for my development tasks.
I do not know how to diagnose or workaround or proceed in any way -- I'm completely blocked and would be very grateful for advice or guidance.
Somewhat guessing here, but I'd try
conn = OpenSQLConnection[
JDBC[
"Microsoft SQL Server(jTDS)",
"localhost:1433;instance=SQLExpress"]]
I'm pretty sure OpenSQLConnection[] doesn't take an "Instance" option. It might work if passed like this:
conn = OpenSQLConnection[
JDBC[
"Microsoft SQL Server(jTDS)",
"localhost:1433"], "Properties"->{"instance"->"SQLExpress"}]
Connection Error while connecting to SQL Server. It is not an authentication error.
It is just that may be your SQL Server is not configured to accept request through
through the transport protocol that you are using. Open SQL Server Surface Configuration
Manager and allow to accept connection from all ways provided.