+393713742262
+393713742262
info@sestech.it
Lun - Ven (09 am to 18 pm)
Sab-Dom Chiuso
By Assistenza Informatica Firenze/Gennaio 24, 2012/Comments are closed
In Sql Server, di default, possono effettuare i BACKUP dei database solo gli utenti che appartengono al gruppo db_backupoperator. Di contro possono effettuare ripristini di backup solo gli utenti che appartengono al gruppo sysadmin.
NOTE da Microsoft :
BACKUP
BACKUP DATABASE and BACKUP LOG permissions default to members of the sysadmin fixed server role and the db_owner and db_backupoperator fixed database roles
RESTORE
If the database being restored does not exist, the user must have CREATE DATABASE permissions to be able to execute RESTORE. If the database exists, RESTORE permissions default to members of the sysadmin and dbcreator fixed server roles and the owner (dbo) of the database (for the FROM DATABASE_SNAPSHOT option, the database always exists). RESTORE permissions are given to roles in which membership information is always readily available to the server. Because fixed database role membership can be checked only when the database is accessible and undamaged, which is not always the case when RESTORE is executed, members of the db_owner fixed database role do not have RESTORE permissions.
Ad ogni modo c’è un modo per fornire a gli utenti la possibilità di fare backup senza dover necessariamente assegnare l’utente al gruppo sysadmin.
Impostare l’utente come segue :
Server Level Permissions (nella sezione Security > Login > proprietà sull’utente):
*dbcreator
*public
Database Level Permissions (nella sezione Database > Nome del DB > Security > User > Utente Scelto):
*db_backupoperator
*db_denydatareader
*public
in questo modo l’utente potrà effettuare attività di BACKUP.
Per il ripristino è un pò diverso in quanto l’utente dovrà utilizzare la RIGA di COMANDO per effettuare un Ripristino, altrimenti il sistema risponderà con l’errore :
RESTORE non è in grado di elaborare il database ‘ARCHIVIODB’ perché è in uso dalla sessione corrente.
Quindi è necessario “passare” per il database MASTER con questo comando:
(esempio)
USE master;
GO
RESTORE DATABASE TEST2
FROM DISK = N’E:ftpcartellaDb6722′
WITH
FILE = 1,
NOUNLOAD,
REPLACE,
STATS = 10
GO
+390557476766 Siamo a vostra diposizione per qualunque richiesta o informazione sui nostri corsi o servizi. Lasciateci un messaggio. Vi risponderemo al più presto.
Il nostro gruppo si occupa da anni di offrire servizi professionali di recupero dati, assistenza tecnica informatica, riparazioni server, consulenza per soluzioni di CyberSecurity
Copyright © 2024 | Sestech Di Anna Sestini - P.Iva 07089510486 - PEC : Anna.Sestini@ Pec.It
+393713742262