Showing posts with label perform. Show all posts
Showing posts with label perform. Show all posts

Tuesday, March 27, 2012

Error executing Backup

Hello,
I've configure "HP Omniback" to perform backups on=20
databases servers under the account "omni_acc", when i=20
configured this account i assign this account the "System=20
Administrators" Server Role because i can=B4t did backups if=20
the account wasn=B4t assign to this role.
Now i want to give to the omni_acc account other=20
previleges since we have the "db_backupoperator" database=20
role but... i cant do the backups if the user is only=20
assign to this role. Can anybody explain to me this=20
situation?
Is not supposed that a user assign to=20
the "db_backupoperator" database role perform backups and=20
restores to databases?
How can i give permissions to a user to make backups and=20
restores of databases?
Best regards
For RESTORE you cannot use db_backup operator if the database doesn't exist, as ... the database doesn't
exist! In this case, dbcreator server role should do.
Your problem is very likely that HP wrote their software so it requires this permissions. The place to start
is the documentation for the software. If there is no, ask the vendor of the software (HP).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message news:1919d01c44c8f$47eb8c30$a501280a@.phx.gbl...
Hello,
I've configure "HP Omniback" to perform backups on
databases servers under the account "omni_acc", when i
configured this account i assign this account the "System
Administrators" Server Role because i cant did backups if
the account wasnt assign to this role.
Now i want to give to the omni_acc account other
previleges since we have the "db_backupoperator" database
role but... i cant do the backups if the user is only
assign to this role. Can anybody explain to me this
situation?
Is not supposed that a user assign to
the "db_backupoperator" database role perform backups and
restores to databases?
How can i give permissions to a user to make backups and
restores of databases?
Best regards

Error executing Backup

Hello,
I've configure "HP Omniback" to perform backups on=20
databases servers under the account "omni_acc", when i=20
configured this account i assign this account the "System=20
Administrators" Server Role because i can=B4t did backups if=20
the account wasn=B4t assign to this role.
Now i want to give to the omni_acc account other=20
previleges since we have the "db_backupoperator" database=20
role but... i cant do the backups if the user is only=20
assign to this role. Can anybody explain to me this=20
situation?
Is not supposed that a user assign to=20
the "db_backupoperator" database role perform backups and=20
restores to databases?
How can i give permissions to a user to make backups and=20
restores of databases?
Best regardsFor RESTORE you cannot use db_backup operator if the database doesn't exist,
as ... the database doesn't
exist! In this case, dbcreator server role should do.
Your problem is very likely that HP wrote their software so it requires this
permissions. The place to start
is the documentation for the software. If there is no, ask the vendor of the
software (HP).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message news:1919d01c
44c8f$47eb8c30$a501280a@.phx.gbl...
Hello,
I've configure "HP Omniback" to perform backups on
databases servers under the account "omni_acc", when i
configured this account i assign this account the "System
Administrators" Server Role because i cant did backups if
the account wasnt assign to this role.
Now i want to give to the omni_acc account other
previleges since we have the "db_backupoperator" database
role but... i cant do the backups if the user is only
assign to this role. Can anybody explain to me this
situation?
Is not supposed that a user assign to
the "db_backupoperator" database role perform backups and
restores to databases?
How can i give permissions to a user to make backups and
restores of databases?
Best regards

Error executing Backup

Hello,
I've configure "HP Omniback" to perform backups on databases servers under the account "omni_acc", when i configured this account i assign this account the "System Administrators" Server Role because i can=B4t did backups if the account wasn=B4t assign to this role.
Now i want to give to the omni_acc account other previleges since we have the "db_backupoperator" database role but... i cant do the backups if the user is only assign to this role. Can anybody explain to me this situation?
Is not supposed that a user assign to the "db_backupoperator" database role perform backups and restores to databases?
How can i give permissions to a user to make backups and restores of databases?
Best regardsFor RESTORE you cannot use db_backup operator if the database doesn't exist, as ... the database doesn't
exist! In this case, dbcreator server role should do.
Your problem is very likely that HP wrote their software so it requires this permissions. The place to start
is the documentation for the software. If there is no, ask the vendor of the software (HP).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message news:1919d01c44c8f$47eb8c30$a501280a@.phx.gbl...
Hello,
I've configure "HP Omniback" to perform backups on
databases servers under the account "omni_acc", when i
configured this account i assign this account the "System
Administrators" Server Role because i can´t did backups if
the account wasn´t assign to this role.
Now i want to give to the omni_acc account other
previleges since we have the "db_backupoperator" database
role but... i cant do the backups if the user is only
assign to this role. Can anybody explain to me this
situation?
Is not supposed that a user assign to
the "db_backupoperator" database role perform backups and
restores to databases?
How can i give permissions to a user to make backups and
restores of databases?
Best regards

Sunday, February 26, 2012

Error Condition for Updates

Hi,

I have a series of Updates that I perform on 7 tables. I would like to execute these updates on a nighly basis via a job. I have the update statements lined up in a stored proc.

So I have -

Create Proc Update
AS
SET NOCOUNT ON

DECLARE @.RETURNVALUE int
DECLARE @.ERRORMESSAGETXT varchar(510)
DECLARE @.ERRORNUM int

set @.RETURNVALUE = 0

BEGIN --Start here

Update table1
Update table2
.
.
.
Update table7

SELECT @.ERRORNUM = @.@.ERROR
IF @.ERRORNUM = 0
SELECT @.RETURNVALUE = 0
ELSE
BEGIN
SELECT @.ERRORMESSAGETXT = description FROM [master].[dbo].[sysmessages]
WHERE error = @.@.ERROR
RAISERROR (@.ERRORMESSAGETXT, 16, 1)
SELECT @.RETURNVALUE = 1
END
RETURN @.RETURNVALUE
END -- END HERE

--

Is the error checking at the appropriate place? Should I have error conditions after every update? If yes then what condition do I check for?

Thanks@.@.ERROR only shows the result of the most recent statement. It is cleared for the next statement. Therefor your code is only going to indicate whether an error occured on Update Table7.

You will need to check for an error after each critical step, and then store the results of the error check. You can store it in a single value like:
@.ERROR_MONITOR = @.ERROR_MONITOR + @.@.ERROR
...which will result in a value greater than zero if any errors occured. Or you can store the results of each check separately (@.UPDATETABLE1ERROR, @.UPDATETABLE2ERROR..etc).|||So is this correct. Check the where clause in the ELSE part and the statement after Update Table 7.
----
Update table1
SELECT @.ERRORNUM = @.ERRORNUM + @.@.ERROR
Update table2
SELECT @.ERRORNUM = @.ERRORNUM + @.@.ERROR
.
.
.
Update table7
SELECT @.ERRORNUM = @.ERRORNUM + @.@.ERROR

IF @.ERRORNUM = 0
SELECT @.RETURNVALUE = 0
ELSE
BEGIN
SELECT @.ERRORMESSAGETXT = description FROM [master].[dbo].[sysmessages]
WHERE error = @.@.ERROR (OR is this @.ERRORNUM)
RAISERROR (@.ERRORMESSAGETXT, 16, 1)
SELECT @.RETURNVALUE = 1
END
RETURN @.RETURNVALUE

Let me know.

Thanks|||@.ERRORNUM holds the sum of all the error message IDs, so it can be used to determine whether any error occured but if more than one error occured then it is useless for looking up the error description.

"SELECT @.ERRORMESSAGETXT = description FROM [master].[dbo].[sysmessages] WHERE error = @.@.ERROR "
...will, again, only give you the error message for the last error to occur.

If you want to be able to handle multiple errors, create a varchar variable and append any error text to it after each critical step.

Depending on your process, you may just want to exit the procedure after the first error...|||Don't call your procedure "Update". And I don't think you could actually compile what you posted.

And if you are really interested in capturing all the errors while continuing to do your updates, then you'll need a @.temptable to acquire a value of @.@.error on each update. At the end you would parse a string of all errors by joining this table with sysmessages and scrolling through it while concatenating [description] into a varchar variable.