Difference between different datasources - sql-server

Him
Please explain what is the difference between different datasources for SQL (shown in the pic.)
I mean difference between Microsoft SQL Server and Microsoft SQL Server Database File

Connecting to Microsoft SQL Server means that you are establishing a network connection to a SQL Server -- the database engine is running either on your machine or remotely and you are using the SQL Server as a service and are connecting to it. That server has the data and you just use a protocol to request operations to be performed.
Connecting using a Microsoft SQL Server database file (MDF) means that you want to use a database file and have a running SQL Server engine running locally use that MDF file. So, if you have SQL Express on your machine, when you create a connection to a MDF file, you're essentially using the SQLExpress engine on your machine to serve up that MDF file (and the database contents) to you.
I admit I almost always connect to a SQL Server, as I'm not guaranteed to have the MDF file available in all environments. Plus, I usually don't install SQL Express.
That's how I understand the difference. Hope this helps!

Maybe the "Microsoft SQL Server Database File" option refers to manually using SQL Server's files (*.MDF), whereas the Microsoft SQL Server refers to connecting to a full-blown SQL Server ?

Related

vb.net connect to MDF file without SQL Server installation

can vb.net connect to MDF file without SQL Server installation
I want to install this application to client machine without installing sql server
I am fairly certain that the closest you can get to what are asking for is to use LocalDB -- which is available as an install option with SQL Server Express installation media.
LocalDB by itself should be sufficient to allow your app to connect to and query the MDF file.
LocalDB represents the lightest, most-minimal install that you could choose for your scenario.
The docs describe what I am talking about in this way:
LocalDB installation copies a minimal set of files necessary to start
the SQL Server Database Engine. Once LocalDB is installed, you can
initiate a connection using a special connection string.
When connecting, the necessary SQL Server infrastructure is automatically
created and started, enabling the application to use the database
without complex configuration tasks. Developer Tools can provide
developers with a SQL Server Database Engine that lets them write and
test Transact-SQL code without having to manage a full server instance
of SQL Server.

SQL Server Databases missing after installing SQL Server Express

I installed SQL Server 2017 Express as a named Instance alongside my default instance. After rebooting once - both were showing but the I could not connect to SQL Server Express remotely. I then followed the instructions to enable IP on SQL Express using configuration manager and rebooted. Now I can connect remotely but my default instance is showing NO databases!
Also in configuration manager, SQL Server Services does not show any of my instances so that I can check they are running (this was the care even prior to enabling the IP address on the protocol, and when I knew it definitely was running as I could connect to it)
--
Update:
I discovered if I launch SQL Server Configuration Manager 2016 rather than "SQL Server Configuration Manager" I can see all my servers.
SQL Server 2016 appears to be running as is SQL Server Express. There is also a "MSSQLServer" that is stopped - think this may be SQL Server 2012. Not sure at this stage which one had the databases.
Ok so for anyone in a similar situation / panic. Do the following.
Look to see what other SQL Server configuration mangers are showing up. If you have installed multiple versions over the years chances are you'll see more than one.
Try using one of the later ones. You can see the file path too if you need it here.
If you manage to see a list of your database servers, check which are enabled and disabled. I had to disable SQL Server (SQLExpress) first before I could enable SQL Server (MSSQLServer), which in my case referred to SQL Server 2012.
If you want to have SQL Server Express running as a named server running alongside your default server, make sure you assign it a different port number (e.g. 1435) in the SQL Server Network Configuration>Protocols for SQL Express>TCP/IPALL section in SQL Server configuration manager.

SQL Server 2008 R2 Db on SharedDrive

I have SQL Server 2008 R2 installed on my local machine. Is it possible to create a database on a shared drive (network drive) so that all my teammates should be able to read data from the SQL Server database?
When I try to create a new database, it shows only my C: drive and not the network drive.
Any help is appreciated.
Thanks
SQL Server takes out exclusive locks on the database files, thus you wouldn't be able to "share" it in real time with other teammates if they are trying to mount the database as well.
What you need to do is setup an environment for SQL Server and give your teammates access to connect to that instance of SQL Server. Do not attempt to use multiple instances of SQL Server with a single database (unless it is copied from a gold database build to each client).

confusion about SQL Server Express and localdb

I need to deploy a WCF service with a database on client machines. I am confused about SQL Server Express. I need to verify all of the following.
When attaching database files in the App_Data folder, do I still need to install SQL Server Express engine (Windows service) on client machines?
There is a flavor called SQL Server Express LocalDb. That one does not need an engine (Windows service)? But I think it need a prerequisite installation of LocalDb.
Localdb is introduced with SQL Server 2012. There is NO localdb for SQL Server 2008. Correct? I could not find 2008 version on MS site.
Do I still need to install SQL Server Express engine (A win Service)
on client machines?
Yes, they need it installed for your application to query the database. Can't really get around it.
There is a flavor called SQL Express localDb. That one does not need
an engine (win service)? but I think it need a perquisite installation
of localdb.
Yes, you'd still need to install LocalDB on the client machine. It's pretty hassle-free to do, but I think it's overkill unless you really need the full features of a SQL Server instance for your webservice.
Instead of LocalDB I'd strongly recommend using SQL Server Compact Edition - it performs the role you're thinking of (your WCF Service can simply connect directly to the database file on your client machines without installing SQL Server, and is lightweight), but doesn't need to be installed (it's simply included as a DLL with your WCF application):
Unlike other editions of Microsoft SQL Server, SQL CE runs
in-process with the application which is hosting it.
In Microsoft's own words on the differences between LocalDB and SQLCE:
LocalDB and SQL Server Compact?
Small and simple database, lightweight installation, connecting to a
database file -- this will sound familiar to any developer using SQL
Server Compact. The similarities are not accidental, as our goal for
LocalDB was to be as easy to use as SQL Server Compact (while being as
powerful and compatible with full SQL Server as SQL Express).
There are significant differences between LocalDB and SQL Server
Compact:
Execution mode: SQL Server Compact is an in-proc DLL, while LocalDB runs as a separate process.
SQL Server CE is kind of like an updated version of MS Access, the file goes with the application which can "just connect" to the database file without involving any database server installation, and its syntax/features are very close to SQL Server standard.

SQL Server Express usage with Pentaho (or any non-microsoft product)

I'm trying to connect a local SQL Server database to an ETL utility called Pentaho. Pentaho very easily connects to full versions of SQL server without issue.
I've set mixed mode authentication and created a sql server account for the sql server express instance that can be used to login through SSMS.
When I try to log in via Pentaho, I get errors about it not knowing what the server is, or the server not responding. I've tried {localhost, myip, localhost\SQLEXPRESS, myip\SQLEXPRESS, just SQLEXPRESS} as the server name (and SQLEXPRESS is the instance name).
I know I've had trouble connecting other programs to SQLEXPRESS databases in the past. Can someone tell me why it acts different than when using a full install of SQL Server and how I can get around these differences?
If SQL Server Express is on a different server, have you enabled TCP/IP protocol?

Resources