Showing posts with label devices. Show all posts
Showing posts with label devices. Show all posts

Monday, March 12, 2012

Help w/SQL Mobile to SQL Compact Edition

Hello

We currently use SQL Mobile and SQL Server 2005. We depend heavily on merge replication for data to the field handheld devices.

We are going to be starting some new projects and I was wondering about moving to SQL Compact Edition as the first step to migrating all of our applications.

I am concerned, however, about the server side and replication. If we simply deploy SQL Compact Edition will there need to be any changes to the server for replication?

Thanks,

- will

Yes, that should be the case. SQL CE is basiclay just a newer version of SQL Mobile.

|||

Are you saying that there isn't anything on the server that I need to do...or that I will need to install and test the newer versions of the server tools?

|||The server tools have been update slightly, so you should use these. Download from: http://www.microsoft.com/downloads/details.aspx?FamilyID=4e45f676-e69a-4f7f-a016-c1585acf4310&displaylang=en

Help w/SQL Mobile to SQL Compact Edition

Hello

We currently use SQL Mobile and SQL Server 2005. We depend heavily on merge replication for data to the field handheld devices.

We are going to be starting some new projects and I was wondering about moving to SQL Compact Edition as the first step to migrating all of our applications.

I am concerned, however, about the server side and replication. If we simply deploy SQL Compact Edition will there need to be any changes to the server for replication?

Thanks,

- will

Yes, that should be the case. SQL CE is basiclay just a newer version of SQL Mobile.

|||

Are you saying that there isn't anything on the server that I need to do...or that I will need to install and test the newer versions of the server tools?

|||The server tools have been update slightly, so you should use these. Download from: http://www.microsoft.com/downloads/details.aspx?FamilyID=4e45f676-e69a-4f7f-a016-c1585acf4310&displaylang=en

Friday, February 24, 2012

Help scripting backup devices

Hi guys

I am relatively new to SQL Server admin and I have been handed a task of creating backup devices for a particular SQL Server which has 204 databases.

Rather than go through and create Full, Incramental and Transaction Log backup devices for each database is ther anyway of doing the following

Create a script to go through and for each database name in 'sysdatabases'

create a folder e.g \sqldata\backup\%databasename%

and within each folder create a backup device called

%databasename%_full
%databasename%_inc
%databasename%_log

Also all these databases are running in 'Simple' recovery mode so obviously I need to change this to 'Full' to enable incramental and log backups - is this possible using the same script.

Hope someone can help as the thought of doing all of this individually for each database scares me silly!!! :)

Thanks in advance for any help

Hanleynot sure if this is an option but could you create a database maintenance plan inwhich the option 'All databases' is set and does the backup?|||I could do that but I need to create the backup devices first, that is my problem, I need to automate the creation of 3 backup devices for each database (240 of them)

:)|||This is 100% untested, but it should give you an idea or two:DECLARE @.cDb sysname

DECLARE zDb CURSOR FOR SELECT
sd.name
FROM master.dbo.sysdatabases AS sd

OPEN zDb
FETCH zDb INTO @.cDb

WHILE 0 = @.@.fetch_status
BEGIN
EXECUTE ('EXECUTE master.dbo.xp_cmdshell ''mkdir z:\sqldata\backup\'
+ @.cDb + '''')

EXECUTE ('EXECUTE sp_adddumpdevice ''disk'', '''
+ @.cDb + '_full'', ''z:\sqldata\backup\' + @.cDb + '_full.dmp''')
EXECUTE ('EXECUTE sp_adddumpdevice ''disk'', '''
+ @.cDb + '_inc'', ''z:\sqldata\backup\' + @.cDb + '_inc.dmp''')
EXECUTE ('EXECUTE sp_adddumpdevice ''disk'', '''
+ @.cDb + '_log'', ''z:\sqldata\backup\' + @.cDb + '_log.dmp''')

EXECUTE ('ALTER DATABASE ' + @.cDb + ' SET RECOVERY FULL')

FETCH zDb INTO @.cDb
END

CLOSE zDb
DEALLOCATE zDb-PatP|||Pat P

Thanks very much for that

I'll give it a try on Monday

Much appreciated

:)|||Pat P

Script was successful, exactly what I was looking for.

Many thanks

Hanley

:) :)