Local database with Visual Basic Express 2010 - sql-server

Visual Basic 2010 Express, lets the user to add a Local Database with .sdf extension. These databases needs MICROSOFT SQL Server to be created or they can run in the user's pc without any additional software? What are the limit of these databases unlike an external database?

You need Sql Server Compact Edition. Compact Edition is an in-process/desktop/embedded/file-based database — like Access or sqlite. It's free, and much easier to deploy than a full Sql Server edition.

You will need a installation of Microsoft SQL Server® 2008 Express, which is free to download.
Download can be found at MSDN.
Comparison between Express and compact version can be found here, this also shows the given limits of the express version:
Max 1 CPU/Server
1 GB RAM usage
4 GB DB size
EDIT:
You can find a wider comparison from Enterprise to Express editions here.
EDIT 2:
My mistake. Of course SDF is indeed for Compact version, not for Express.
The compact version is free to download and available at Microsoft here.

Related

MICROSOFT SQL SERVER LICENSE TERMS

I developed software which requires the MSSQL database in the backend. So I need to include the Microsoft sql setup within my application setup file. But when referring the license terms and the Microsoft’s knowledge base article, found conflicts as bellow.
In the license terms under the ‘Scope of License’ there mentioned “You may not publish the software for others to copy”.
But in the knowledge base “https://technet.microsoft.com/en-us/library/dd981032(v=sql.100).aspx” I found “Microsoft SQL Server 2008 Express is a robust, freely distributable relational database management system”.
So by seeing these 2 statements I am confused whether I can include sql server setup in my application or not. Please any help would be appreciated.
Edit:
Sql server used is MSSQL server 2008 (since it supports windows XP)
Redistribution of SQL Server Express is available for free.
Register for SQL Server Express redistribution
SQL Server comes with different editions like Express, Devloper, Standard..etc.
Among all these editions, Express edition is free for learning and developing small applications.
Reference:
http://www.quackit.com/sql_server/sql_server_2008/tutorial/sql_server_editions.cfm
https://msdn.microsoft.com/en-us/library/ms144275(v=sql.100).aspx

Fail restore a SQL Server database .BAK from Enterprise to Express (Error 909)

I need help. I recently download a sample SQL Server database from the internet (link: https://www.microsoft.com/en-us/download/details.aspx?id=18279).
When I tried to restore that database to my computer, the process was failed because my SQL Server is not in the same version with the database came from.
I currently using SQL Server 2014 Express Edition, and the data that I've download was from Enterprise Edition, so some of the features is not available in my current edition.
What should I do to restore that database successfully without installing the Enterprise Edition?
I need a sample of huge database (with millions of rows or more) for educational purpose, and I think this is the proper one.
Or maybe any of you can give me the similar database that compatible with Express Edition.
Thank you.
You can restore as long as the database doesn't have enterprise features and it doesn't exceed max size of express edition.You also have to ensure both are of same version .This can be checked by using
select ##version
if none of the above helps,you can generate scripts and run them

Best suitable SQL server for VB 8 Express Edition?

I am about to start a project on VB.. For that I am using Visual Basics 2008 Express Edition.. So I just wanted to know which is the best suitable SQL Server for the same.
SQL Server 2008 was released alongside VS 2008, so one of its variants would be recommended. The Express Edition will work well. If you want to use User Instances (such as when the database file is stored in an App_Data folder for a website, you need to have Express Edition installed. In addition, if you plan to use any data related projects in an actual production environment, but don't want to spend, it's the only option that's freely available.
Of course, you might want to consider the age of the product. VS 2008 itself is 2 generations behind (at present, Jan 2013), as is SQL Server 2008. You can easily use later editions of both SQL Server and Visual Studio (in there Express Editions), and I'd usually recommend moving up to the latest that's installable on your machine.
If you're wanting to try out all of the SQL Server features, a trial installation or Developer Edition would be recommended - but for the latter, you need an MSDN license, and if you're going that far, you should seriously consider moving up from VS Express.
Microsoft SQL Server 2008 R2 hands down. It's free and you can use stored procedures, functions and such.

Is there a difference between SQL Server Express (2012) and LocalDB?

In his excellent and popular comparision chart, ErikEJ draws a distinction between SQL Server Express 2012, and SQL Server 2012 LocalDB. However, I can't find such a distinction anywhere else in the MSDN documentation ("LocalDB" isn't even mentioned in the official MS SS12 book or on the MSDN SQL Edition comparison page.) This leads me to suspect that Express and LocalDB aren't really two separate products as ErikEJ suggests, but rather just two different terms for the same thing (which would explain why, on this MSDN page, it is called "SQL Server 2012 Express LocalDB").
If there really is a difference between the products, can anyone point me to some official documentation comparing them?
OK, I think I have found the answer to my own question. (It was buried under the tabs on the SS Express product page.)
Here is a summary of the distinctives of LocalDB I found on that page:
LocalDB is a lightweight deployment option for SQL Server Express Edition with fewer prerequisites and quicker installation.
LocalDB has all of the same programmability features as SQL Express, but runs in "user mode"* with applications and not as a service.
LocalDB is not intended for multi-user scenarios or to be used as a server. (If you need to accept remote connections or administer remotely, you need SQL Server Express.)
"Express with Tools" (which includes SS Management Studio Express, Azure, etc) can be used with LocalDB or without. (The same goes for "Express with Advanced Services".)
UPDATE: I just found this useful description in Windows IT Pro (Jul '12, p.23):
LocalDB isn’t SQL Server Express, nor is it SQL Server Compact.
LocalDB uses the same sqlservr.exe engine as the other editions of
SQL Server, but it runs in user mode—not as a service. LocalDB is
used for offline development by tools such as SSDT to ensure that the
code you develop is 100-percent compatible with your production
SQL Server database.
If I am reading this correctly, LocalDB seems to be more like a configuration option of Express than an entirely separate product. So apparently if I download Express (or Express w/ Tools), I will have the option to install the LocalDB version, which is supposedly easier ("zero-configuration") than the full Express. (Update: with VS2012, LocalDB comes installed by default.)
One other important distinction, according to this post, is that "currently Visual Studio 2010 doesn't really work with LocalDB." (We have to use SS Management Studio instead, at least for now.)
*(The concept of "User Mode" or "User Instances" is a key distinctive of LocalDB. In fact, according to this post, "LocalDB can be seen as an upgrade of the User Instances feature of SQL Server Express." For more about User Instances, refer to the MSDN blogpost "What is a RANU?")
UPDATE - Feb 2021
LocalDB is SQL Server Express edition
From official documentation
Express edition is the entry-level, free database and is ideal for
learning and building desktop and small server data-driven
applications. It is the best choice for independent software vendors,
developers, and hobbyists building client applications. If you need
more advanced database features, SQL Server Express can be seamlessly
upgraded to other higher end versions of SQL Server. SQL Server
Express LocalDB is a lightweight version of Express that has all of
its programmability features, runs in user mode and has a fast,
zero-configuration installation and a short list of prerequisites.
The docs provides a very detailed comparison of features between editions.
I use a table from ErikEJ, which shows: the features and differences between SQL CE 3.5, SQL CE 4, Local DB and SQL Server 2012. According to this table the differences between Local DB and SQL Server 2012 are:
Installation size:
SQL Server 2012: 120 MB download size; 300 MB expanded on disk
Local DB: 32 MB download size; 160 MB on disk
Runs as Service
SQL Server 2012: Yes
Local DB: No (runs as process started by app)
FILESTREAM support
SQL Server 2012: Yes
Local DB: No
Subscriber for merge replication
SQL Server 2012: Yes
Local DB: No
Number of concurrent connections
SQL Server 2012: Unlimited
Local DB: Unlimited (but only local)
NB: Sorry this isn't "official documentation", but hope it's useful to the next bod as it answers the underlying query about the differences.
The major difference are Server Express run as a service while LocalDB doesn't need any server or intensive processing to run.

How does the SQL Server that comes with Visual Studio differ from the full one?

How does the SQL Server that comes with Visual Studio differ from the full one?
And will I be able to use it to create a simple database for collecting metrics from a tool that I'm writing?
What's the easiest way of getting a console up where I can type insert/select/create etc?
SQL Express, which comes with Visual Studio, only supports up to 4GB of data, 1GB of RAM, and 1 CPU. It also doesn't include Analysis Services or Integration Services.
However, you can download SQL Server Management Studio (SSMS), which is the "console" you asked for, as a free add-on for SQL Express. You can also download Reporting Services, if you need it.
See:
http://www.microsoft.com/downloads/details.aspx?familyid=08E52AC2-1D62-45F6-9A4A-4B76A8564A2B&displaylang=en
http://www.microsoft.com/downloads/details.aspx?familyid=7522A683-4CB2-454E-B908-E805E9BD4E28&displaylang=en
Otherwise, the relational engine itself is basically identical to the one used in SQL Standard (there are a few additional minor differences). SQL Express is not throttled from a performance perspective.
You'll find the details here at Microsoft SQL Server Editions. The version shipped with Visual Studio is Express under the Free Editions.

Resources