Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have developed a Java program which works with SQL Server as it's database. I have installed SQL Server 2012 Enterprise edition on my Windows and designed the database via SQL Server Management Studio; for example: I have designed its tables, have set a backup schedule and it takes a backup from itself every 24hs once, and other features.

Which version of SQL Server Express should be installed on a user's Windows computer so that not only can my program connect to a local db and work with that, but also the other proscribed database features (like backup schedule) would work?

The database and Java program are going to be on the same computer.


The criteria I have for chosing a database edition are

  1. My database has some tables
  2. The Java program is going to insert, update, delete, select, and add columns to tables
  3. iReport will be used to report on the data, in addition to the Java application
  4. The database file is set so that it can not be deleted
  5. It has a scheduled backup and nothing else
share|improve this question
2  
And here we come to the single most important developer-looking-to-distribute-his-own-product: You have to do full testing, so don't be afraid to set up VMs and install the default Windows Install and see what comes up (in this case, I'm pretty sure .NET now includes a SqlExpress instance on Windows 7 and 8, that you could've connected to in the first place to answer this question). However, as you've also touched on features such as Backup Schedule, or Tasks, then I expect you're going to need more direct help. Cheers. –  jcolebrand Dec 27 '12 at 15:43
    
@jcolebrand You are correct, Visual Studio does in fact come with a SQL Express instance. –  Brandon leach Dec 27 '12 at 16:25
    
Visual Studio does, but what about something more basic. Scratch that, I think you can just grab an installer package from MS for SqlEx if need be. Have to think on it a bit more, but I bet Soheil could read up on those options, maybe look up Visual Studio Express or the like. –  jcolebrand Dec 27 '12 at 16:53
    
Yes you can grab SQL Express as a download from microsoft.com/en-us/download/details.aspx?id=29062 –  Brandon leach Dec 27 '12 at 18:22
    
a redistributable version of SqlExpress fwiw –  jcolebrand Dec 28 '12 at 2:20

3 Answers 3

up vote 7 down vote accepted

Backup are automated via SQL Agent jobs in SQL Server. Since no express edition includes the SQL Server Agent, then you would have to find a way to have your application initiate the backups. Otherwise, you need standard edition.

What other features are you using? Some of them may require enterprise or standard. Personally when I was doing a lot of development, I would try to use an edition that matched what an average target user would have. So If I want them to have SQL Express, then that is what I used for my development.

share|improve this answer
    
let me tell you what is my database: 1. it has some tables ! 2. the java program is going to insert, update, delete,select, add columns to tabels and.... . 3. different reports are going to be made via iReport, i mean other program (iReport) interacts with database and gets the results and makes reports. 4. the database file is set so that it can not be deleted. 5. it has a backup schedule and nothing else....as u see its a really simple database... if you suggest me express edition, please tell me which version of that you mean, as express edition it's self has different editions... –  soheil.mernoosh Dec 27 '12 at 18:04
    
From the sounds of it, you should be ok with the base express install. Keep in mind this will not add any tools such as management studio. If you need those on the users machine, you can install the "with tools" express edition. In your application to perform backups you'll need to create an process by which your application will occasionally initiate a BACKUP DATABASE command against SQL Server to take backups. As for the reports, It looks like iReports will just query against the local database to generate the reports. So you should still be good with a basic version of express. –  Brandon leach Dec 27 '12 at 18:17
    
you mean that my program it's self should ask for backup each for example 2hs once and as i want to use express edition, i can't make a backup schedule, true? –  soheil.mernoosh Dec 27 '12 at 20:19
    
Yes, I was suggesting that. However, Billinkc has a great suggestion to use the Windows Task Scheduler. I would consider that option strongly for the backups as Then the app will not need to make the backup requests. You could have it as a scheduled reoccurring task task without needing to worry about the application running. –  Brandon leach Dec 27 '12 at 20:33
    
yeah, but i think that is complicated to use ! –  soheil.mernoosh Dec 27 '12 at 20:51

Use SQL Server 2012 Express Edition - it will provide all that you need. Best of all - it's FREE. Just note that the maximum database size is 10 GB

Here's the comparison for 2012 versions: Microsoft SQL Server 2012: Choosing the Correct Edition

share|improve this answer
    
Does it provide automated backup scheduling? –  jcolebrand Dec 27 '12 at 15:40
    
No. You would need the sql agent service for that. –  Brandon leach Dec 27 '12 at 15:55
    
PS: I was asking Carol ;-) –  jcolebrand Dec 27 '12 at 16:53
    
The question probably was: which of the various sub-editions (bare-bones, with Advanced Services, with Tools etc.) should be used –  marc_s Dec 27 '12 at 19:06
    
@jcolebrand Yup, I missed that one :( –  Carol Baker West Dec 27 '12 at 21:57

If the automated scheduling is something you were hoping to use, as noted elsewhere that is not a feature of SQL Server Express Edition.

However, Windows Task Scheduler should be a more than serviceable option for you. The base API is not .NET friendly so unless you're familiar with working with COM interfaces, it seems the best approach is to either use the command line options for the scheduler or grab the handy dandy taskscheduler library off codeplex.

share|improve this answer
    
i think if my program asks for backup each time, it would be much easier... –  soheil.mernoosh Dec 27 '12 at 20:23
    
Then you can just issue a BACKUP Database command as you would any other request to sql server. –  Brandon leach Dec 27 '12 at 21:12
    
yeah, it's a new idea, but what if the task schedule was deleted because of any reason? and my program doesnt know what's happend, however no good reason for such happening! now, what is your suggestion, using cmd? –  soheil.mernoosh Dec 27 '12 at 21:21
    
could you please tell me what is TaskRun (the task which is going to be scheduled by windows, backup in our case) ? i mean how to write backup statement in cmd as the task ? –  soheil.mernoosh Dec 27 '12 at 21:38
    
If the backups go to a specific location, you can check for the most recent backup. if its been a while you can readd the task in Task Scheduler –  Brandon leach Dec 27 '12 at 22:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.