Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase the size of sql compact 3.5 .sdf file

I'm using Sql Compact3.5 as my DB with C# .NET what is the maximum size of sdf that I can give? Is there any way to programatically increase the maximum size of the sdf file? If so how?

like image 879
Jankhana Avatar asked Mar 09 '10 11:03

Jankhana


People also ask

How do I increase the size of a SQL database?

Expand Databases, right-click the database to increase, and then click Properties. In Database Properties, select the Files page. To increase the size of an existing file, increase the value in the Initial Size (MB) column for the file. You must increase the size of the database by at least 1 megabyte.

What is Microsoft SQL Server 3.5 Compact?

SQL Server Compact 3.5 SP2 is an embedded database that allows developers to build robust applications for Windows desktops and mobile devices. The download contains the files for installing SQL Server Compact 3.5 SP2 and Synchronization Services for ADO.NET version 1.0 SP1 on Windows desktop.

How can I increase the size of my MDF file?

Go to your database properties and change the files setting growth with Autogrowth in percentage or FixedSize(in MB). As well dont forget to select unrestricted file growth.

What is SQL SDF?

A file with . sdf extension contains the Microsoft SQL Server Compact (SQL CE) database which is also known as a compact relational database; produced by Microsoft for the applications made for mobile devices and desktops.


1 Answers

The maximum size of the database is by default 128 MB. Override this by using the following connection string.

Data Source=MyData.sdf;Max Database Size=256;Persist Security Info=False;

(from: http://www.connectionstrings.com/sql-server-2005-ce) and (from: http://msdn.microsoft.com/...)

The absolute maximum size of the database is 4gb.

like image 187
Benny Jobigan Avatar answered Sep 27 '22 23:09

Benny Jobigan