I need dockerized database that supports T-SQL and some other things of SQL Server. Of course, there is a container with SQL Server but it takes too much space. So I try to put SQL Server LocalDB (about 200mb) in a docker container.
It has silent mode of installation and can be easily installed. But the problem is how to access it from outside the container? (I need to access it from my local PC too) Is there any solution for this case? For now I have only one idea to implement some service for communication between SQL Server LocalDB and external connections then expose it near the db in the same container. Could you guys please advise something?
Localdb only allows named pipes connections from the machine it is running on. You can use SQL Server Express, 400 MB, which allows TCP connections
Related
Everything was working fine until I made a few changes (including installing VS 2022), and I can't figure out which change caused the problems.
I connect an access front end to a local SQL server through ODBC. I do this on a number of computers (then sync the databases through azure). Some are regular SQL Express instances, and some are LocalDB.
The computer that stopped working is one that uses LocalDB. The entire instance got corrupted. After I was able to delete the instance and recreate it. I can now connect through Azure Data Studio, and Visual Studio, etc. I just can't connect through ODBC. I've tried all of the different drivers including SQL Server Native Client 11.0, ODBC Driver 17 for SQL Server, and more. None of them work.
What does work, is if I use the named pipe url directly in the server section of the ODBC setup. So instead of putting (localdb)\MSSQLLocalDB I put np:\.\pipe\LOCALDB#D26172B4\tsql\query. That does work, but the instance id in that URL changes every time the instance starts. So every time the computer restarts we need to create a new ODBC connection. That is not a maintainable solution.
we are developing a web application that use SQL Server 2016 (Express) as a database engine.
We have noticed that the queries we make from application side take 20-30ms (average) when SQL Server is installed locally while, if installed on a remote machine, it take 400-500ms. We tried different versions of JDBC (now version 7.2.2) but the timing is the same. Both PC are connected on same switch.
The connection string we use is:
jdbc:sqlserver://${database.address};SelectMethod=cursor;database=${database.name};useUnicode=true;characterEncoding=UTF-8;charactetrResultSets=UTF-8
We tried to delete SelectMethod=cursor; and the timing improve but not significantly.
It is not a DNS problem because as address we use the IP.
Can someone tell me how to solve the problem?
We have an application called IpSwitch Whatsup and it's installed in a machine that I can connect to remotely as administrator. This is all in our intranet.
We need to connect to the sql server database being used by IpSwitch Whatsup, but this particular machine doesn't have sql server installed. On the other hand, in sql server configuration manager there is indeed a sql server installation for whatsup (the entry says SQL Server (WHATSUP)).
So, two questions:
How does one go about in connecting to this database? I'm pretty sure I know the name of the database and I already know the server name and instance, so I would like to connect to this DB from a sql server installation in another machine.
How does one configure a sql server installation to receive remote connections if it doesn't have sql server installed?
Thanks.
For the first question, you just type in (or browse) the appropriate instance name and authentication options using SSMS - which is the GUI tool used to manage sql server instances. Note - the term "sql server installation" can mean different things so it is not a useful reference.
As for the second question, review the information here. Note that any task you do in SSMS can be done via tsql - you can see the appropriate commands using the script button in the SSMS dialog windows.
And you can also (and probably should based on these questions) install SSMS on the same machine as your server instance so you can do "anything" "anywhere". Now would probably be a good time to review your disaster recovery options (and start backing up your databases regularly).
Dear StackOverflow readers i would like your kind attention towards my one of the problem:
I have a Visual Foxpro application, in which i am accessing a remote SQL Server's Stored Procedure. Everything is working fine when I am installing the SQL Express 2008 in my Client Machine along with the FoxPro Application.
But when I am not installing the SQL Server On client Machine along with the visual FroxPro Application then I am getting a error " SQL Connect Error", Cannot Make Connection.
Is their any way that i don't have to install the whole SQL Express on client machine and i can only install the required libraries.
Regards
ProgChd
You should not have to install SQL Express itself, but at least ensure that you have the ODBC / OleDB providers for SQL Express. These can use SQL-Server connection which are somewhat common to already be on the machine.
As for your connection string, are you connecting via the fully qualified \server\database hosting information?
Just for grins, you could go through the machine's
Control Panel
Administrative Tools
Data Sources ODBC
and try to manually create an ODBC connection to the SQLExpress server you are trying to do via your VFP application. If you can't connect through that, then neither will VFP. Take the VFP app out of the equation and just test for the connection.
I have two issues both related to (I believe) my SQL Server setup. I have installed SQL Server (the full thing) from MSDN downloads of the x64 version on my Vista 64 Home Premium box. After running into multiple issues I finally got it working. This is a new box so I ported over a database that I need to work on from another server. That also worked fine. My first issue however came when I tried to open a database in SQL Server Management Studio:
"Unable to find the requested .Net Framework Data Provider. It may not be installed. (System.Data)"
The box itself isn't new and definitely has .NET installed (version 3 I believe). I found that someone posted this as a bug but as the team (SQL Server team) could not reproduce it, they removed it. I've tried installing the recommended SP3 patch to no avail. It's only when I try to open a table for viewing the data (right-click and "Open Table"). I can even execute queries and retrieve results (from inside management studio). I'll follow pretty much any suggestion to try and get this working.
My second issue is that I cannot connect to the server. I thought I could just work around it (with queries), but I did not find that it added any ODBC connections on the box, just the drivers. Management Studio can access the DB just fine, but the machine itself doesn't appear to recognize that anything is running on it, at least on the default port (1433) and no, I do not have a named instance. When trying to manually add the server to the DSN or any datasources it cannot find the SQL server (under Control Panel > Administrative Tools > Data Sources (ODBC). Under SQL Server Management Studio it appears as a registered database server (I think this is because it connects on port 1434 from what I hear? not sure). This is my primary problem, and even if I can't open the tables (the first issue) I absolutely NEED to be able to set it up so that I can connect to it. The language source I am connecting from is ColdFusion which is set up as a stand-alone server (IIS not installed, not using it right now).
As for connecting to it, make sure all the services are running. SQL Server Agent in particular.
Also, check in the SQL Server 2005 Surface Area configuration for Services and Connections. Check under "Remote Connections" to see if "local and remote" connections are on. It might be set to "local only".
CF versions 6+ do not use the OS's ODBC connections. They use JDBC over IP to connect. You need to make sure you have allowed TCP/IP connections to the DB using the SQL Server Configuration Studio. Then, use the Data Sources page in the CF Administrator page (usually localhost:port/cfide/administrator, replacing "port" with the port you're using for the CF built-in server).
Why though, would it default to this
and why would this be an issue with my
own machine (local testing)?
SQL Server 2005 is meant to be more secure by default, so not all the protocols are opened up by default.
Sql Server Agent doesn't have anything
to do with remote connections, but I
seemed to recall there being an issue
with doing discovery on the network if
the Agent wasn't started
Maybe you're thinking of the SQL Browser with named instances.
Did you try this process?
http://oakleafblog.blogspot.com/2007/03/orcas-march-ctp-on-vista-database.html