scheduled web synchronization with MS Sql Server 2005 - sql-server

I have settled a web synchronization between SQLSERVER 2005 as publisher and SQLEXPRESS as suscriber. Web synchro has to be launched manually through IE interface (menu tools/synchronize) and to be selected among available synchronizations.
Everything is working fine except that I did not find a way to automate the synchro, which I still have to launch manually. Any idea?
I have no idea if this synchro can be launched from SQLEXPRESS by running a specific T-SQL code (in this case my problem could be solved indirectly).

Denny Cherry, a SQL Server MVP, is writing a replacement for SQL Server Agent.
Denny's blog about it
His Standalone SQL Agent project on Codeplex
Using this, you would be able to automatically initiate code on a scheduled basis. But it's either this, or writing your own .NET app to kick off jobs. SQL Server Express Edition doesn't include any kind of automated job scheduling.

I don't really know about SQL Server web synchronization, but as SQL Express don't have an SQL Server Agent, you can write a C# console application that runs with the scheduled tasks.

Related

Deploying Windows application with SQL Server database

I have a WPF project and I will use SQL Server database. The instance of SQL Server IT created for me is SQL Server 13 (2016 standard version) on a remove server. When I’m deploying the application on a client’s computers, what version I need to install there as a prerequisite? Can I deploy SQL Server Express 2016 on a client’s computer and access the remove SQL Server Standard edition? I am looking for a simple solution and for a lighter version I need to install on the user’s computers. I cannot install a full SQL Server on each user.
I have searched the net and a similar question has been asked many times, but I didn’t find a clear answer before. Many people started their SQL Server experience using local type databases, like SQL Server CE or LocalDB. In this case specific DLLs and redistributables must be added with the installation program. It is hard to understand at the beginning, but when an instance of SQL Server is on a remote server, this is a different story. Everything is happening on this remote server. There is no need of any SQL Server instances on a client’s machine. Just a connection string must be added. The adapter or Entity Framework will take care of everything else.

Does having a Microsoft SQL Server 'LocalDB' on your computer use up CPU resources?

I've just installed VS2013 Premium on my Win8.1 and noticed this in my Sql Server Object Explorer ..
Does this mean that I have Sql Server running as a service and therefore consuming CPU, etc?
How can I confirm this please?
UPDATE:
here's a screenshot of my task manager..
Nope, LocalDB instances are started as needed rather than running as a service.
Instead of installing a service and configuring security, they just start up an instance of this new LocalDB runtime as needed.
http://www.mssqltips.com/sqlservertip/2694/getting-started-with-sql-server-2012-express-localdb/
LocalDB is a special instance of SQL Server, so to confirm whether its taking up any resource all you need to do is check if SQLServer is running in Task Manager.

Can a WPF app with .sdf database run on a computer without SQL Server installed

This question may seems a bit silly. The thing is I'm programming a WPF using VS2010, which contains a .sdf database (connection is ADO.NET).
Someone told me that if I use a SQL Server Express database it can be run on any PC even it has no SQL Server installed. But after I tried executing in my virtual machine (win7 & win xp), seems it cannot even start up.
So, can someone brief me, what database do people normally use in developing WPF software? Is it true that my program using a SQL Server database file cannot execute on PC without SQL Server installed?
Much appreciate in advance!
Yes, it can!
SQL Server Compact (that produces and uses .sdf) is the only SQL Server edition that does not require a server to be installed. All its code and logic is contained in the handful of DLL's that you need to include with your application. Just ship your app with those DLL's and you should be fine.
Read more about SQL Server Compact and how to use and deploy it on MSDN.
SQL Server Express (and any of the other editions, like Web, Standard, Developer, Enterprise) on the other hand does require an installation of the SQL Server Express edition - either on that machine, or somewhere in the network where your app runs (remote connections from the network are disabled by default, but can be enabled).

SQL Server Express - jobs and maintenance support?

I have SQL Server 2008 Developer edition installed on my laptop. It has many jobs, and stuff, so I was just wondering, if I install SQL Server 2008 Express edition on my client, would it be able to execute jobs? And if so, does it do it normally like the developer edition or do I have to execute/perform some other action with it.
The main thing is that, in my database, I have this maintenance plan, that does 3 things:-
Takes a full backup every month
Takes a diff. backup every 15 days
Takes a log backup every 15 days.
Rebuilds all indices every 2 months.
So, mainly I am concerned with this, my developer edition can do this, but if I install express edition on client, would it be able to do it to or not? If so, do I have to configure something special?
One more thing, if my database (the one, that has this maintenance plan I wrote in above paragraph) is myData.mdf, and lets say in visual studio I create a setup project for my application, and bootstrap SQL Server Express with it (by clicking Download prerequisites from the same location as my application in Prerequisites Dialog Box) and assuming that my myData.mdf was in Data folder in my application, and is outputted with the project each time. Would these jobs/maintainence plans persist in my database, like all tables and stored procedures, or would they be removed?
Take a look to this article http://msdn.microsoft.com/en-us/library/ms365248(v=sql.100).aspx
In the Section:
SQL Server Features that Are Not Supported in SQL Server Express
It says:
"SQL Server Agent and SQL Server Agent Service"
There are some alternatives that you can use to do backups. For example: http://sqlbackupandftp.com/. They offer a free version with some limitations.
If you want to use Windows Scheduled Tasks and SQL Script, take a look to this: How can I schedule a daily backup with SQL Server Express?
Express Edition doesn't do it, but it would be trivial to write some scripts to do those tasks and have the Windows Task Scheduler run them for you.
As far as the second part goes, the easiest way to find out would probably be just to try loading it into SQL Express and see what happens.
Take a look at Ola Hallengren's solution at http://ola.hallengren.com
It can be used with the windows task scheduler as in his FAQ - "You can use cmd files and Windows Scheduled Tasks instead" at http://ola.hallengren.com/frequently-asked-questions.html

How to go about creating a SQL Server Agent clone / customization (NOT another SQL Server Express Agent question)

I'm managing a web app featuring countless ETL (Extract, Transform & Load) processes feeding a datawarehouse (using SSIS dtsx packages + *.sql files).
At the moment, everything is governed by several SQL Agent processes monitoring "scheduling queue" tables.
I'm trying to figure out a way to develop a scheduler or scheduling "framework" of some sort that needs to do a subset of what SQL Server Agent does (executing dtsx packages, executing SQL) but with a configuration UI based on ASP.NET, as users need to be able to create & modify schedules, manually launch processes and monitor custom logs.
Configuration info, activity, execution logs, schedules, jobs, job steps and everything else needed that I'm missing should be persisted to DB.
I'm guessing a Windows Service would be flexible but development costs might skyrocket.
I appreciate any sort of input, particularly some clues on SQL Server Agent's internal workflow. I DID try searching for info, but it being PROPRIETARY software, I found zilch.
(maybe I should specify I'm more than familiar with SQL Server and C# based .NET development, I just have no idea where to start from..)
The SQL server agent database is called 'msdb'. You can attach profiler to msdb and create some scheduled jobs to see how it works.
The gist of the answer is one should use SQL Server Service Broker, coupled with SQL Server Service Broker External Activator from the Feature Pack

Resources