RE: Schedule Backup

RE: Schedule Backup

 

  

How do I schedule a backup, each day the backup should have a different
name .i.e BACKUPYYYYMMDD the backups should be differentiated by date

-----Original Message-----
From: Noble Mudenha
[mailto:mssqldba-ezmlmshield-x4856576.[Email address protected]
Sent: Friday, August 31, 2007 11:27 AM
To: LazyDBA Discussion
Subject: RE: restrict the second user while updating the first user

It looks to me like you want to match the bankslipno to a slipno, why
not
use a primary key that is auto incremented, then pick scope_identity and
maybe a trigger? Once the number of application users increases, you'll
have
more problems with current approach. Or am I lost somewhere?

-----Original Message-----
From: rajesh.kumar
[mailto:mssqldba-ezmlmshield-x171175.[Email address protected]
Sent: Friday, August 31, 2007 11:01
To: LazyDBA Discussion
Subject: restrict the second user while updating the first user

Hi

I wrote a stored procedure to generate slip no automatically. Then
problem
is when multiple users update the same time sp will go for a toss. How I
can
I restrict the second user while updating the first user.

Pls find the attached sp below

CREATE proc CMS_procActionCDSlipVerify
@BankSlipNo Varchar(15)='',
@GeneratedBy Varchar(20)='',
@RowIDs Varchar(500)=''
As
Begin

Set NOCOunt ON

--SET TRANSACTION ISOLATION LEVEL SERIALIZABLE

Begin Tran

Exec('Update CMS_CDSlipEntry
Set BankSlipNo = ''' + @BankSlipNo +
''', SlipNo = (Select Max(IsNull(SlipNo,0)) + 1 From CMS_CDSlipEntry
)
, GeneratedBy = ''' + @GeneratedBy +
''', GeneratedDateTime = GetDate() ' +
' Where RowID In (' + @RowIDs + ')')

if @@Error <> 0
Rollback Tran
Else
Commit Tran

--SET TRANSACTION ISOLATION LEVEL READ COMMITTED

Set NOCOunt OFF

End






---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html





---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


MS Sql Server LazyDBA home page