Wednesday, March 7, 2012

Compact Edition not in Data Source List

After I installed the SQL Server Compact Edition, I start a new VS 2005 Basic project. When I try to create a new connection I do not see the Compact Edition in the list of data sources.

I have installed previously SQL Server CE, Everywhere, Mobile, 2005 Mobile but I uninstalled them all.

Can anyone give me an idea why I can't see the Compact Edition as a data source?

Thanks.

Hello

From what you'r saying maybe you need to re-install the SQL Server CE.
I have the same problem but it's because I'm using VB.NET Express Edition.

see ya

Compact Edition DVD Standalone

Is it possible to run SQL Server Compact Edition as a standalone application from a DVD?

i.e. it would not leave anything installed on the users computer after the DVD was ejected.

Hi:

For what it's worth, I am attempting the same thing: developing a product catalog that will enable users to browse products and configure order for printing. As my product is using Framework 2, I will simply have an autorun install the program since I have to check for the existence of the framework anyway.

Please post back your findings.

|||If both .Net CF2 and SQL Server 2005 are installed on the target system, you should be able to deploy the DLLs for SQL CE on the DVD.|||I do not believe there is a dependancy on SQL Server/.NET CF2 for a runtime SQL Server CE application - believe that there is only a dependency on VB6 runtime/.Net 1/1.1 runtime of .Net2.0 runtime (according the language the app has been written in. Plus of course the SQL CE Dlls on the DVD|||Make connection string like this:

"Data Source=".\MyDatabase.sdf";Password="MyPassword";mode="Read Only";SSCE:Temp File Directory = "C:\";"

This will use temporary database on c: disk if there's need to write temp data for queries.

On DVD/CD include these files in root:
Microsoft.SqlServerCe.Client.dll
sqlceca30.dll
sqlcecompact30.dll
sqlceer30EN.dll
sqlceme30.dll
sqlceoledb30.dll
sqlceqp30.dll
sqlcese30.dll
System.Data.SqlServerCe.dll

Now, this works for me, but I have requirement, not to write to C:, but to users temp folder.
Does somebody know how to change connection string to write into temp folder?

Compact Database Error Code: 0

I am currently working in VB.NET with SQL Mobile 2005. I am trying to compact a database, .sdf, using the SqlCeEngine Object compact(connectionstring). When I use this code to compact a small database, only about 300KB, it returns okay however when I try to compact a larger database, about 9MB, it returns with a SQL Error Code: 0, "The operation completed successfully" however with no compacted database. The code works however it only seems to work for smaller databases. Does anyone have any ideas on how to correct this error or tell me why it returns with that type of error.

Snuggs

I am able to compact the database of size nearly 21 MB in our lab. Is it possible for you to share the repro for us to diagnose.

Thanks,

LaxmI NRO, MSFT, SQL Mobile, Microsoft Corporation

|||What do I need to do in order to give you the repro, do you mean just an actual copy of the database itself or something else?|||

Yes actual copy of the database itself. Before sharing it to me, can you check whether the DB is in correct state. compact.exe /verify would let you know if there any bad pages in the DB.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The DB is in the correct state. Do you have a direct email address that I can send this to you because this will not let me send this as an attachment.|||Please send it to l-a-x-m-i-n-r-o-A-T-m-i-c-r-o-s-o-f-t-D-O-T-c-o-m Please also paste this question link in the mail for the context. Thanks, Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation|||

Hi Snuggs,

As per our conversation I could see that you have opened a bug here in Product Feedback center. http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=d0f14331-1b05-418a-9a11-2378457e4eb8

And as mentioned we could not repro. We are able to compact the DB very easily with a sample C# program mentioned in the above URL.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

Compact Database Error Code: 0

I am currently working in VB.NET with SQL Mobile 2005. I am trying to compact a database, .sdf, using the SqlCeEngine Object compact(connectionstring). When I use this code to compact a small database, only about 300KB, it returns okay however when I try to compact a larger database, about 9MB, it returns with a SQL Error Code: 0, "The operation completed successfully" however with no compacted database. The code works however it only seems to work for smaller databases. Does anyone have any ideas on how to correct this error or tell me why it returns with that type of error.

Snuggs

I am able to compact the database of size nearly 21 MB in our lab. Is it possible for you to share the repro for us to diagnose.

Thanks,

LaxmI NRO, MSFT, SQL Mobile, Microsoft Corporation

|||What do I need to do in order to give you the repro, do you mean just an actual copy of the database itself or something else?|||

Yes actual copy of the database itself. Before sharing it to me, can you check whether the DB is in correct state. compact.exe /verify would let you know if there any bad pages in the DB.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

|||The DB is in the correct state. Do you have a direct email address that I can send this to you because this will not let me send this as an attachment.|||Please send it to l-a-x-m-i-n-r-o-A-T-m-i-c-r-o-s-o-f-t-D-O-T-c-o-m Please also paste this question link in the mail for the context. Thanks, Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation|||

Hi Snuggs,

As per our conversation I could see that you have opened a bug here in Product Feedback center. http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=d0f14331-1b05-418a-9a11-2378457e4eb8

And as mentioned we could not repro. We are able to compact the DB very easily with a sample C# program mentioned in the above URL.

Thanks,

Laxmi NRO, MSFT, SQL Mobile, Microsoft Corporation

Compact Database

Is there a stored procedure that allow the compact database programmatically
in SQL Server?"Claudio Di Flumeri" <claudioNOSPAM@.mtgc.net> wrote in message
news:c0conk$15i74v$1@.ID-198343.news.uni-berlin.de...
> Is there a stored procedure that allow the compact database
programmatically
> in SQL Server?

Check documentation for
DBCC SHRINKDATABASE|||"Claudio Di Flumeri" <claudioNOSPAM@.mtgc.net> wrote in message news:<c0conk$15i74v$1@.ID-198343.news.uni-berlin.de>...
> Is there a stored procedure that allow the compact database programmatically
> in SQL Server?

I believe compacting is an Access concept - it doesn't exist in MSSQL.
If you want to check the integrity of a database, then you can look at
DBCC CHECKDB; if you want to physically reduce the size of a database,
then DBCC SHRINKDATABASE and DBCC SHRINKFILE would help.

Simon

Compact and Repair in an adp

Hi,

I just deleted about 1 million records from a SQL Server 2000 database. I
access it using Access 2000.

I have Compact and Repair available in the adp under Tools. Should I do that
from Access? Will it not mess anything up?

Thanks!

J~JA wrote:

Quote:

Originally Posted by

I just deleted about 1 million records from a SQL Server 2000 database. I
access it using Access 2000.
>
I have Compact and Repair available in the adp under Tools. Should I do that
from Access? Will it not mess anything up?


No idea. You can definitely use Query Analyzer to run a
DBCC SHRINKDATABASE command.

If you expect the database to grow back to its previous size and
stay there, then you shouldn't shrink it. If you expect it to
stay at its reduced size, then you should.|||JA (jarmour@.kc.rr.com) writes:

Quote:

Originally Posted by

I just deleted about 1 million records from a SQL Server 2000 database. I
access it using Access 2000.
>
I have Compact and Repair available in the adp under Tools. Should I do
that from Access? Will it not mess anything up?


To me that sounds like tools for the local Access database.

In any case, one million rows is not that much, unless the rows are
extremely wide.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

compact and repair database

I'm an Access man moving towards SQL Server and I'm interested in knowing if there is a utility for my SQL Server version 7 database that is similar to Access' Compact and Repair utility? I'd like a recommendation from a guru on what Prevenatative Maintenance measures I should be running daily/weekly/monthly etc...

Thanks in advance.
dogSQL Server used to need a lot of "care and feeding" on a regular basis. In version 2000, it comes with maintenance plan wizards that will provide a wizard interface to create and schedule maintenance jobs that handle 99% of the needs of any database, and all of the needs of 99% of the databases that I've seen.

After you run up your box and have Windoze and SQL running happily, you should visit the maintenance wizard soon.

At your convenience, you should read up on the whole suite of DBCC commands in SQL Books Online. You'll probably know which ones you need long before you need them, if you ever need them!

As an observation, you write like you are fairly comfortable with programming, databases, etc. If so, you probably want to find a place like this to post questions, since you'll get answers that make sense to you relatively quickly from folks that have done all of this a time or two!

-PatP|||SQL Server used to need a lot of "care and feeding" on a regular basis. In version 2000, it comes with maintenance plan wizards that will provide a wizard interface to create and schedule maintenance jobs that handle 99% of the needs of any database, and all of the needs of 99% of the databases that I've seen.

A note about the maintenance plan wizard: I've had a maintenance plan created for about 2 months now but I don't think its doing anything. I've been in to look at the settings 3 or 4 times now and all looks well but I notice that its not backing up to the directory I specified and I suspect its not doing any of the integrity and reindexing procedures either. After defining it, is there another step I have to take to get the maintenance plan running? I'm finishing up development and users are starting to input data, so its moving to the front burner.|||? Did you schedule it? That's an area you have to fill out in there. Also, look at your jobs in Enterprise Manager. When you create a Maintenance plan, it creates a job to run the on a scheduled basis. Make sure the jobs are enable. Then, look at the properties of them to make sure they have a valid schedule.