Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Friday, March 30, 2012

New to SQL 2005 Express

I haven't used this software except locally on my laptop. If you have built a databased web app using this, how do you deploy the db? Does it have to be installed and/or supported on your webhosting service? If so, it seems to be of limited use, if not, very helpful.

Thanks for the help

To deploy the application, the destination will need to have SQL Server Express installed as well. You can read a detailed article about that here:

http://msdn2.microsoft.com/en-us/library/ms165639.aspx

Buck Woody

|||

That's what I was afraid of....doesn't look as this will be the answer. Back to mysql or MS SQl 2000.

Thanks for the reply!!

TLCoop

|||No problem - but MySQL or MS SQL 2000 will have the same issue, won't it?|||

There might be some confusion here. SQL Express is SQL Server 2005. Your hoster will need to support SQL Server 2005, but they don't have to have SQL Express installed. It's the exact same database file because they are the exact same products, just with different feature sets.

If you're hosting company requires that you upload your database using scripts, we are working on a tool to help do that. You can find a CTP of the tool on CodePlex.

Mike

|||

Thanks Mike,

My host doesn't offer mssql 2005 yet. They do have mssql 2000, and maybe(hopefully)some of sqlexpress2005 is backwards compatible. I can always generate scripts and run a query for db population on mssql 2000. I'll take a look at CodePlex.

I appreciate the help!

Terry

|||

Thanks Buck for the reply. My Host doesn't offer MSSQL 2005 nor SQLExpress 2005 support yet. They offer both MySQl and MS SQL 2000 right now, so I'll try and 'script' a db from express 2005. I appreciate the help.

Terry

New to reporting service

I am new to reporting service but has used VS 2005 beta to develop winform app for a long time. I have the following questions:

1. Are the report object and report viewer in VS2005(winform) related to those of SQL server reporting service? If yes, what are the relationship?
2. If I just want to create/view report with report viewer of VS2005 in my app which connect to SQL Server Express, do I need reporting service?
3. I can see there are options to install reporting service while installing SQL Server Express(free of charge), can I develop app for my client which use reporting service with SQL Server Express?

Thank a lot!Any idea?|||

Okay, here we go.

Reporting Services
Reporting Services is a component of SQL Server 2000 and SQL Server 2005. Basically the Reporting Services acts as a Report Repository and supports such features as:
* Server-Side Rendering = The server does the work
* Subscriptions - Reports can be generated at scheduled times and be automatically distributed to email or file shares.
* Report Snapshots - Report output can be rendered and stored on the server, for instance a monthly report can have a monthly snapshot. This way you never to need to print and store common reports, the server has the old copy even if the orginial report data is gone.

ReportViewer Control
Okay, so Reporting Services basically rocks because it solved the majority of your reporting issues and comes free with most versions of SQL Server. Now, in with SQL Server 2005 and Visual Studio 2005 there are 2 new controls that make reporting services even better. There is a Windows forms and asp.net ReportViewer control. The control can work in 2 modes, Remote and Local. In Remote mode it can be used to integrate with Reporting Services as users can view reports stored on the server. In local mode (what you want) it can displayed reports that have been embedded within your application. In this mode Reporting Services is not required, which makes it ideal to use with SQL Express. There are only 2 minor disadvantages to running in local mode. The first is that the client computer has to do all the work and report rendering, but its not bad for smaller applications. The second is that the client must have this ReportViewer pack installed. Basically, it contains all of the rendering pieces needed to render a report on the client machine. The great news is that if you deploy your application using the new ClickOnce, you can automatically deploy the ReportViewerPack (also it is very small like only a couple of MB!).

|||Thanks

New to reporting service

I am new to reporting service but has used VS 2005 beta to develop winform app for a long time. I have the following questions:

1. Are the report object and report viewer in VS2005(winform) related to those of SQL server reporting service? If yes, what are the relationship?
2. If I just want to create/view report with report viewer of VS2005 in my app which connect to SQL Server Express, do I need reporting service?
3. I can see there are options to install reporting service while installing SQL Server Express(free of charge), can I develop app for my client which use reporting service with SQL Server Express?

Thank a lot!

Any idea?|||

Okay, here we go.

Reporting Services
Reporting Services is a component of SQL Server 2000 and SQL Server 2005. Basically the Reporting Services acts as a Report Repository and supports such features as:
* Server-Side Rendering = The server does the work
* Subscriptions - Reports can be generated at scheduled times and be automatically distributed to email or file shares.
* Report Snapshots - Report output can be rendered and stored on the server, for instance a monthly report can have a monthly snapshot. This way you never to need to print and store common reports, the server has the old copy even if the orginial report data is gone.

ReportViewer Control
Okay, so Reporting Services basically rocks because it solved the majority of your reporting issues and comes free with most versions of SQL Server. Now, in with SQL Server 2005 and Visual Studio 2005 there are 2 new controls that make reporting services even better. There is a Windows forms and asp.net ReportViewer control. The control can work in 2 modes, Remote and Local. In Remote mode it can be used to integrate with Reporting Services as users can view reports stored on the server. In local mode (what you want) it can displayed reports that have been embedded within your application. In this mode Reporting Services is not required, which makes it ideal to use with SQL Express. There are only 2 minor disadvantages to running in local mode. The first is that the client computer has to do all the work and report rendering, but its not bad for smaller applications. The second is that the client must have this ReportViewer pack installed. Basically, it contains all of the rendering pieces needed to render a report on the client machine. The great news is that if you deploy your application using the new ClickOnce, you can automatically deploy the ReportViewerPack (also it is very small like only a couple of MB!).

|||Thanks

New to replication, advice needed

hi,
our app works in a multi tier model to provide inet connectivity
now a customer wants to be able to keep working even if the inet is down or
the main server is down
so the obvious solution is to use replication
so:
1) what is the best place to start understanding what is involved
2) all relations are now by the use of integer PK's, some of them are auto
generated, does this has to change?
3) can i have only selected tables replicated?
4) can i have only a subset of rows of a table replicated?
tia!
Marc
1. BOL, www.replicationanswers.com, go for merge replication
2. N
3. Y
4. Y
Hope this will help
-Ravi Lobo
"Marc Antheunis" wrote:

> hi,
> our app works in a multi tier model to provide inet connectivity
> now a customer wants to be able to keep working even if the inet is down or
> the main server is down
> so the obvious solution is to use replication
> so:
> 1) what is the best place to start understanding what is involved
> 2) all relations are now by the use of integer PK's, some of them are auto
> generated, does this has to change?
> 3) can i have only selected tables replicated?
> 4) can i have only a subset of rows of a table replicated?
> tia!
> Marc
>
>
|||1) Well there's my book. Query Replication Tutorials on the web
2) No, not for one way transactional replication. With merge replication DRI
is maintained but another tracking column is added - a guid column.
3) Yes, for transactional replication all tables must have a pk, with merge
they don't require a pk.
4) Yes, as long as there is a criteria to filter it by you can replicate a
subset of rows - this is called horizontal partitioning or horizontal
filtering.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Marc Antheunis" <ask_me@.ask.me> wrote in message
news:uCKSLCKJFHA.2956@.TK2MSFTNGP12.phx.gbl...
> hi,
> our app works in a multi tier model to provide inet connectivity
> now a customer wants to be able to keep working even if the inet is down
or
> the main server is down
> so the obvious solution is to use replication
> so:
> 1) what is the best place to start understanding what is involved
> 2) all relations are now by the use of integer PK's, some of them are auto
> generated, does this has to change?
> 3) can i have only selected tables replicated?
> 4) can i have only a subset of rows of a table replicated?
> tia!
> Marc
>
|||Hi Hilary!
i just phoned the biggest IT related book store in belgium but they don't
sell your book
awaiting an answer from them if it is availabel in belgium
i'll try to collect some ideas and post some to the point questions
thx
marc
"Hilary Cotter" <hilary.cotter@.gmail.com> schreef in bericht
news:eXyQEfLJFHA.3928@.TK2MSFTNGP09.phx.gbl...
> 1) Well there's my book. Query Replication Tutorials on the web
> 2) No, not for one way transactional replication. With merge replication
> DRI
> is maintained but another tracking column is added - a guid column.
> 3) Yes, for transactional replication all tables must have a pk, with
> merge
> they don't require a pk.
> 4) Yes, as long as there is a criteria to filter it by you can replicate a
> subset of rows - this is called horizontal partitioning or horizontal
> filtering.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Marc Antheunis" <ask_me@.ask.me> wrote in message
> news:uCKSLCKJFHA.2956@.TK2MSFTNGP12.phx.gbl...
> or
>
|||You can get it from Amazon.com or you can order it by following this link:
http://www.nwsu.com/0974973602.html
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Marc Antheunis" <ask_me@.ask.me> wrote in message
news:uCCa01LJFHA.1860@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> Hi Hilary!
> i just phoned the biggest IT related book store in belgium but they don't
> sell your book
> awaiting an answer from them if it is availabel in belgium
> i'll try to collect some ideas and post some to the point questions
> thx
> marc
>
> "Hilary Cotter" <hilary.cotter@.gmail.com> schreef in bericht
> news:eXyQEfLJFHA.3928@.TK2MSFTNGP09.phx.gbl...
a[vbcol=seagreen]
down
>

Wednesday, March 28, 2012

New to MSDE (but not SQL)

All,
looking to distribute MSDE with my ASP.NET app... looking for two pieces:
1) Is there a way to install MSDE with a DB already attached? I want to
install MSDE and then attach a DB, but attaching has to come after a
reboot(to start after services restart), and I would rather do it all at the
same time...
2) Good Freeware/Almost-freeware MSDE manager I can redistribute with my app
for the client
MTIA
wardeaux
> 2) Good Freeware/Almost-freeware MSDE manager I can redistribute with my
app
> for the client
http://www.aspfaq.com/2442
http://www.aspfaq.com/
(Reverse address to reply.)
|||1) Nope. You don't have to reboot the computer when you install MSDE though,
strictly speaking.
2) SQL Server Web Data Administrator:
http://www.microsoft.com/downloads/d...displaylang=en
Jacco Schalkwijk
SQL Server MVP
"Wardeaux" <wardeaux@.bellsouth.net> wrote in message
news:e10zJ72jEHA.3196@.TK2MSFTNGP10.phx.gbl...
> All,
> looking to distribute MSDE with my ASP.NET app... looking for two pieces:
> 1) Is there a way to install MSDE with a DB already attached? I want to
> install MSDE and then attach a DB, but attaching has to come after a
> reboot(to start after services restart), and I would rather do it all at
> the
> same time...
> 2) Good Freeware/Almost-freeware MSDE manager I can redistribute with my
> app
> for the client
> MTIA
> wardeaux
>
|||You don't necessarily need to reboot after installing. To start MSDE after
installing, just run "net start mssql$instancename" (if installing as a
named instance) or use scm.exe. You may want to start SQL Server Agent
also.
Distribute your database's .mdf and .ldf files and attach them using
osql.exe to execute the sp_attach_db stored procedure.
"Wardeaux" <wardeaux@.bellsouth.net> wrote in message
news:e10zJ72jEHA.3196@.TK2MSFTNGP10.phx.gbl...
> All,
> looking to distribute MSDE with my ASP.NET app... looking for two
pieces:
> 1) Is there a way to install MSDE with a DB already attached? I want to
> install MSDE and then attach a DB, but attaching has to come after a
> reboot(to start after services restart), and I would rather do it all at
the
> same time...
> 2) Good Freeware/Almost-freeware MSDE manager I can redistribute with my
app
> for the client
> MTIA
> wardeaux
>
sql

Friday, March 9, 2012

New Log or append?

I'm backing into the DBA position from being an app / web designer. Using SQL 2005 and hating wizards, I'm trying to code a BACKUP LOG query to run every 15 minutes and create a separate date-time-stamped TRN. I have several questions starting with - should I be doing this? Is it better to create separate LOGs or append to one? Isn't it true that the only time I'll need the LOGs is when I have a crash and that then I'll need to RESTORE in date-time-order?

I'm doing a FULL backup every 6 hours and intend on automating deleting the TRNs on a successful completion of the BAK.

The following code runs fine and creates a date-time-stamped TRN but doesn't do what I want, as it overwrites the first TRN, so how do I create, say, four JOBSTEPs and get a JOBSTEP @.COMMAND to run the SETs?

USE msdb

IFEXISTS(SELECTNameFROM sysjobs WHEREName='jobDBBackupWedb_1Log')

EXECsp_delete_job @.job_name ='jobDBBackupWedb_1Log'

GO

DECLARE @.now char(14)-- current date in the form of yyyymmddhhmmss

DECLARE @.dbName sysname-- database name to include date-time-stamp

DECLARE @.Cmd nvarchar(260)-- variable used to build JobStep command

SET @.now =REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR(50),GETDATE(), 120),'-',''),' ',''),':','')

SET @.dbName ='Wedb_1_'+ @.now +'_.trn'

SET @.Cmd ='BACKUP LOG Wedb_1 TO DISK = '+CHAR(39)+'\\SERVER1\D$\SQLDatabases\Backup\WebEoc\'+ @.dbName +CHAR(39)

EXECsp_add_job

@.Job_Name ='jobDBBackupWedb_1Log',

@.Description ='Run Wedb_1 DB Backup Transaction Log Every 15 Minutes',

@.Category_Name ='Database Maintenance'

EXECsp_add_jobstep

@.Job_Name ='jobDBBackupWedb_1Log',

@.step_name ='DB_Backup_Log',

@.step_id = 1,

@.Database_Name ='Master',

@.subsystem ='TSQL',

@.command = @.Cmd

/*

Start time for the Transaction Log backups is seven and one half minutes after midnight

to not conflict with the Full database backups run every 6 hours starting at midnight.

The Transaction Log backups are to be run every fifteen minutes.

*/

EXECsp_Add_JobSchedule

@.Job_Name ='jobDBBackupWedb_1Log',

@.Name ='schedDB_BackupLog',

@.Freq_Type = 4,-- Daily

@.Freq_Interval = 1,-- Each day

@.Freq_Subday_Type = 0x4,-- Interval in minutes

@.Freq_Subday_Interval = 15,-- Every fifteen minutes

@.Active_Start_Time = 000730 -- Start Time is seven and one half minutes after midnight

--@.Active_End_Time = 235959 -- End Time is next midnight

EXECsp_Add_JobServer

@.Job_Name ='jobDBBackupWedb_1Log'

GO

My opinion, I'd create DB Maint Plans to do database and trans log backups, and not write my own, unless there is some real good reason to. Main plans aren't perfect, but still better then trying to reproduce the same end result. One of the points of backing up the trans log is for disaster recovery. You could backup your trans log every 30 minutes, then copy/move those backups off to a different server/tape, etc... So, I wouldn't stack them on one file, becuase you need to move them continually to a different box, or yea, backup cross server, ehhhh.... I prefer local backups and then copying them somewhere else, like with RoboCopy. The times you nee the trans logs are for recovery, or to do log shipping to a different server (similar concept to database mirroring, but still more in use then mirroring is I think). If doing a full backup every 6 hours, same thing, back it up and move it off somewhere safe, not leave that on teh same drives as your database files! I'd still leave the old TRN files on teh other location, there COULD be a case where you need to go back 9 hours, then you'd have the old trans and backups to get there, I wouldnt delete the TRN files every 6 hours as you said.

Bruce

|||

Thanks ... but ...

I'm backing up to a separate / different network drive on a different / separate server that my network admin has established as a SANs - Storage Area Network - drive. That SANs drive is data specific and is being snap-shot-backed-up every 5 minutes. Then it goes to tape every night at 11:00 PM.

The nature of the DB is that the WebEoc is for running the SEOC - State Emergency Operations Center - during hurricanes, earthquakes, etc.

|||

I think that the problem with your original script is that you are creating the backup command when you create the job rather than dynamically creating and executing the command when executing the job.

Try the re-worked version below.

Chris

Code Snippet

USE msdb

IF EXISTS ( SELECT Name
FROM sysjobs
WHERE Name = 'jobDBBackupWedb_1Log' )
EXEC sp_delete_job @.job_name = 'jobDBBackupWedb_1Log'

GO

DECLARE @.cmd NVARCHAR(3201)

SET @.cmd = N'DECLARE @.sql VARCHAR(8000)

DECLARE @.now char(14)
-- current date in the form of yyyymmddhhmmss

DECLARE @.dbName sysname
-- database name to include date-time-stamp

SET @.now = REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR(50), GETDATE(), 120), ''-'',
''''), '' '', ''''), '':'', '''')

SET @.dbName = ''Wedb_1_'' + @.now + ''_.trn''

SET @.sql = ''BACKUP LOG Wedb_1 TO DISK = '' + CHAR(39)
+ ''\\SERVER1\D$\SQLDatabases\Backup\WebEoc\'' + @.dbName + CHAR(39)

EXEC(@.sql)'
EXEC sp_add_job @.Job_Name = 'jobDBBackupWedb_1Log',
@.Description = 'Run Wedb_1 DB Backup Transaction Log Every 15 Minutes',
@.Category_Name = 'Database Maintenance'

EXEC sp_add_jobstep @.Job_Name = 'jobDBBackupWedb_1Log',
@.step_name = 'DB_Backup_Log', @.step_id = 1, @.Database_Name = 'Master',
@.subsystem = 'TSQL', @.command = @.Cmd

/*

Start time for the Transaction Log backups is seven and one half minutes after midnight

to not conflict with the Full database backups run every 6 hours starting at midnight.

The Transaction Log backups are to be run every fifteen minutes.

*/

EXEC sp_Add_JobSchedule @.Job_Name = 'jobDBBackupWedb_1Log',
@.Name = 'schedDB_BackupLog', @.Freq_Type = 4, -- Daily
@.Freq_Interval = 1, -- Each day
@.Freq_Subday_Type = 0x4, -- Interval in minutes
@.Freq_Subday_Interval = 15, -- Every fifteen minutes
@.Active_Start_Time = 000730
-- Start Time is seven and one half minutes after midnight

--@.Active_End_Time = 235959 -- End Time is next midnight

EXEC sp_Add_JobServer @.Job_Name = 'jobDBBackupWedb_1Log'

GO

|||

Chris,

Thank you very kindly! I take your comment about run-time, create/execute; that was spot on. Thanks for the code change - works like a charm ...

... but, I've looked and not found an answer, what is the "N" doing for me in SET @.cmd = N'DECLARE ... ?

Is it declaring that what follows is all an NVARCHAR string?