SQL Server 2008 :: Restore / Backup Minimal Permissions
Nov 3, 2010
We use Netbackup for our SQL servers to backup and restore databases. I would like the service account used by Netbackup to have as limited permissions as possible. The account should be able to backup and restore a db without being able to read any of the content. Right now the account jobs fail if the service account is not in the sysadmin role.
I removed the account from sysadmin and limited it to dbcreator and public but the job fail.
How to setup an account so that people who know the service account password can't log in with that account and read db information?
View 9 Replies
ADVERTISEMENT
Jan 30, 2015
I have a backup that comes to me nightly in the format of XXXX_YY_MM_DD.bak where the date is incremented each night the previous night backup is deleted when the next days is added so in general . I have only one in that folder. I wanted to setup a restore to run nightly
RESTORE DATABASE [XXXData] FROM DISK = 'C:folderExtractedDataapp_XXX_backup_15_01_28.bak' --location of .bak file
WITH REPLACE
I would like to do something like
RESTORE DATABASE [XXXData] FROM DISK = 'C:folderExtractedDataapp_XXX_backup*.bak' --location of .bak file
WITH REPLACE
While I'm asking.. In case there is an older one left behind(which shouldn't happen) I saw something about "LATESTFULL" but think its a redgate command?
View 5 Replies
View Related
Aug 5, 2015
SQL Transaction replication, specifically SQL backup and restore Transaction replication. So Scenario,
S1 = Primary Server 1
R1 = T - Replication Server 1
R2 = T - Replication Server 2
So we have S1 replicating to R1, and we want to build another subscriber which is R2.
Can I take the Replicated Database from R1, backup it up, then restore it to R2, and create the publication/subscription?
Will that work? if not, is there an easier way to avoid the snapshot? the reason i ask this is because we do have replication snapshot, but takes long. One of my Colleagues stated he tried this, however replication made duplicate rows on R2, which is why he had to use replication snapshot.
View 0 Replies
View Related
Oct 12, 2015
I have a process that restores a production DB, overwriting the existing copy each night. I'd like to keep the solution "up" for as long as possible. And this'll be more important if I want to update it in the day (where there are more queries) too. The nature of queries thrown at the system is that there are about 20 per hour, it's underpinning a reporting system, it's not an OLTP system.
It seems to me I could restore the fresh DB copy into a holding DB, then rename it to the production DB name at the end of the process. The rename process should be pretty much instant.
But I need to think about detecting and waiting for queries to complete on the prod DB, before removing/demoting it (actually, I though to rename it, then reusing it as the next copy to update).
View 5 Replies
View Related
Feb 25, 2015
We have a 1TB Database. Our backup strategy looks like this.
Weekly Full backups - Saturday 10pm. (Takes anywhere between 5 - 9 hours)
twice Nightly Diffs (8:30p and 2:30am - Mid week this takes roughly 1.5 hours)
Hourly Log backups starting at 4:00am until 11pm.
I have an issue where I need to restore to 3:00 today. If my (2:30a)Diff is still running at that recovery point.
I am getting an error when trying to restore Full/2:30a Diff/4a Log with a stopat 3:00a.
Error telling me my log backup is incorrectly formed.
Can I, in fact, restore to this point at all? Do I need to go back to my previous Diff (8:30p) and restore the logs, if so, which ones?
My nighttime Diff ran from 8:30 - 10p.
I have logs at 9p, 10p, 11p, 4a
View 8 Replies
View Related
Apr 29, 2015
What I want to do is :
- restore a backup of a 3rd party database onto one of our servers
- this has no users that I can use
- there is some ETL processing so we're using Control-M to manage the process
- create a database user and grant it db_reader.
I'd like to do this without granting any users elevated privileges if possible.
What I've done so far is grant the Control-M user (this is a domain user) dbcreator rights and made it owner of our copy of the database that is being refreshed.
The refresh is completing, but Control-M is not able to log onto the database to create the user.
What is the best way to accomplish this task without granting the control-m user sysadmin rights?
Would I be able to do it if I used a SQL Agent job for the restore and user creation?
View 1 Replies
View Related
Apr 4, 2015
I am working towards automating the process of testing our backups. For the meantime, I do it all manually - I copy the backup files (full + transaction logs) to our test server and then run the restore script. Once database restored I run the DBCC CheckDB. The results of checkdb I manually upload to our Sharepoint portal as proof that the backup file is intact with no errors.
here are some ideas I have but have not yet tested:
Create a maintenance plan with each 3 jobs:
--> Powershell script to copy the files from Prod server to Test server - add this scrip to Job1
--> Powershell script to restore databases files - add this script to Job2
--> Run the DBCC in powershell (yet to find if possible in PS) - add this script to Job3
I would like to use seperate jobs as to get a report on the duration and status of each job
Would also like to get the results of the DBCC Checkdb as proof that no errors were found for upload to our Sharepoint portal. Dont know if possible via the job.
View 8 Replies
View Related
Apr 10, 2000
On a member server, Server1, (not part of any domain) I've backed up my SQL 7 db to a local disk using a temporary device.
I go to a second member server on the same network, Server2, and try to do a restore from that file.
Fom ISQL, I get the error message that the device is offline.
The SQL server error log on Server 2 states that the file failed to open
with operating system error 1326 (logon failure: unknown user or bad password.)
I've tried taking ownership from server 2 but that does nothing. I'd like to copy the entire file to server 2 except that server 2 does not have enough disk
space for both it and the database it would recreate simultaneously.
I am signed on as administrator on both boxes.
Any thoughts?
View 2 Replies
View Related
Jan 20, 2008
I have finally gotten a setup to work, but I suspect there are improvements I should make to the permissions. Here's the setup:
I am accessing two databases, (aspnetdb and my own database called custom) on a local SQL 2005 server.
In SQL Server Management Studio (SMS) I created logins at the level of the SQL instance for two users ( "NT AUTHORITYNETWORK SERVICE" and "viewer"). Then I select each user, and set the properties to access the Server Roles section. There I found each was given the public server role. Now here's where I set the permission to sysadmin. This setting allows my application to work, but I'm sure there are less permissive approaches I should take. However, I just can't seem to find a simple and direct explanation of the procedure to set more appropriate permissions. The "NT AUTHORITYNETWORK SERVICE" accesses aspnetdb in order to create users and membership settings. The "viewer" login accesses the database called custom, and it reads and alters this database. The application (which is name viewer) performs these operations using a connection string like this:
Data Source=STORE;Initial Catalog=custom;Persist Security Info=True; User ID=viewer; password=xxxxx;
What is the recommended way to set the minimal permissions for these logins on these databases?
View 7 Replies
View Related
Aug 3, 2015
Need to restore database,here's the scenario:
Data got deleted on Friday evening, need to have database restored to FRiday afternoon and also some data has been entered on Monday, which needs to be there.
View 8 Replies
View Related
Feb 18, 2015
SQL Server 2008 r2 - 6 GB memory...I attempted a backup on a 500GB database but it was taking way too long. I checked the resources on the box and saw the CPU at 100%. I checked the SQL Server activity log and saw a hung query (user was not even logged on) that had multiple threads so I killed it and now the CPU utilization is back to normal.
Trouble is, now all of the threads in the activity monitor for the backup show 'suspended' and the backup appears to be not doing anything.
View 3 Replies
View Related
Mar 13, 2015
I've written a custom script to delete backup files from location. But unable to modify now to count the number of files are deleted. How to modify the script...
/* Script to delete older than N days backup from a specific directory */
USE [db_admin]
GO
IF OBJECT_ID('usp_DeleteBackup', 'P') IS NOT NULL
DROP PROC usp_DeleteBackup
GO
[Code] .....
View 2 Replies
View Related
Mar 24, 2015
I have existing domain users with SQL logins and having different set of permissions, we are migrating to new domain, and we have new user ID's with new domain. Is there any way through query I can create an user and copy the permissions.
View 0 Replies
View Related
May 4, 2015
Is there anyway to find the permissions assigned to user. What level of access the user has in each db and the tables & is he able to see jobs. Each object and permissions
View 6 Replies
View Related
Feb 19, 2015
I have a database which contains a stored procedure. The stored procedure contains an update script to a different database. The user group have access to the database that stores the stored procedure but do not have update rights to the database that contains the data that is being updated.
Therefore, every time the user group executes the stored procedure it fails because the security permissions do not propagate to the next database.
Is there anything I can do to get around this without grant dbo permissions to the whole user group.
View 2 Replies
View Related
Sep 5, 2006
Hi There
The backup database permission seems to only be at a database level , grant backup database and db_backupoperator role only exist at a database level.
However i want to permission to a user to backup any database, and he must not be a sysadmin. I cannot find a server level role that can backup databases.
How can i do this? There are alot of database so granting the permission for every database seems a waste of time, also one would have to remember every time a new database is created to grant this permission.
There must be a way to do this at a server level?
Thanx
View 1 Replies
View Related
Mar 6, 2013
The developers in our shop have a need to explicitly grant view definition permissions to themselves on stored procedures they create in their development databases. They have dbo level permissions in these databases and although they can explicitly grant view definition permissions to other developers in the same database, they are unable to do so for themselves. When they attempt this, it appears that they are successful but when they check the stored procedure afterwards the permission is not there for themselves.
While this does not cause an issue in development, the intention is for these view definition permissions to be carried forward to the test and production databases where they only have datareader permissions.
When these stored procedures are scripted out by the dba to move to Test and Production the view definition permissions are not scripted out for the developer in question.
Is there a way that a developer with dbo rights in a database can explicitly grant themselves view definition permissions on a stored procedure they create as dbo?
View 9 Replies
View Related
Aug 15, 2012
I have a new problem with doing a restore of a number of databases using powershell. The script I'm using is based mainly on this one (Part 2 in particular): [URL] .....
The problem I'm having is around the RedgateGetDatabaseName function. My hunch is that its down to the different version of red gate and how sqlbackup works. Basically when the call is made to the function it is returning both the Database Name and the number of row's that the SQL command in the function has ran. I've tried to include a SET NOCOUNT ON at the start of the SQL command in the function but its still returning the now count.
View 5 Replies
View Related
Feb 17, 2015
I have a database used in SSRS in which I get a backup daily and restore it to database "DATA"
The issue I come across is SSRS has a datareader user(ssrsuser) for access to the "report store" web where users get reports
access gets erased on each restore. Can I add something to my job to restore this user after each restore or keep the settings?
declare @Bakpath varchar(80)
set @bakpath = 'C:EDataExtractedDataextract.bak'
Use Master
Alter Database [Data]
SET SINGLE_USER With ROLLBACK IMMEDIATE
RESTORE DATABASE [Data] FROM DISK = @bakpath --location of .bak file
WITH REPLACE
GO
View 5 Replies
View Related
Aug 18, 2015
I have a client that has POS software called Restaurant Pro Express (RPE) from www.pcamerica.com
Their old POS computer had a hardware failure, but I was able to attach the hard-drive to another computer and recover the data. RPE uses a MSSQL database system. However, my client doesn't seem to make backups very often - the last one is dated January 5, 2015.
I was able to copy the C:Program FilesMicrosoft SQL Server folder over which contained the instance as well as all the data files - and has up-to-date information. The instance in the recovered Microsoft SQL Server folder was called MSSQL.1. I installed the RPE software on their new computer, and it too now has an instance called MSSQL10_50.PCAMERICA. The new computer is using MSSQL 2008 R2, while I believe the old computer would have been using MSSQL 2005.
View 4 Replies
View Related
Sep 1, 2015
Can I use a full and differential backup to restore to a point of time?
Or I have to use full and transaction log backups in order to do a point of time restore?
I found today when I tried to restore a db from another database at the point of time for example 3:10 pm,
SSMS automatically select the full backup + the transaction backup that is done at 3:00 pm, but not select full + the differential backup I did at 3:12pm.
So I lost those records entered after 3:00pm.
I supposed it should use the differential backup and restore to 3:10. but it didn't.
View 8 Replies
View Related
Oct 23, 2015
I make two full backups on Oct 1 and Oct 10. I want to restore the server to a state in Oct 5. So I just do as follows:
1.Perform a transaction log backup on the server on Oct 23. I have never backup transaction log in the past.
2. Restore the server with Oct 1 full backup with NORECOVERY option.
3.Try to restore to the point at Oct 5 12:00, with the transaction log.
But the restore fails and SQL Server said the transaction log does not contain the point. The point is too early. Why? Also my .LDF file is about 13G, but the transaction log backup is only 200MB. Why?
View 4 Replies
View Related
Dec 27, 2007
Hi all,
I am new to Sql server backup and restore.
I have an sql server database in my office and I have successfully copied the whole database to my pc at home. For this purpose I used complete database backup.
Now what I want to do is delete all the data from office database(this can be done manually also) and copy daily data to my pc at home.So that only one day data will reside in my office compuer.
I tried this with completed database backup/restore again. But the old data in my home pc got lost. And when I tried the same with differetial backup, it gave an error message lile "the restore process was not stared with NORECOVER or STAND BY option".
Please suggest me how can I do daily backup from office computer and restore the data to my home PC so that the daily data gets appended to the existing database in my home PC.
Thank you in advance.
View 3 Replies
View Related
Jul 23, 2005
I have SQL Server desktop installed on my laptop. I have a database onthese that i created. but when i try to back it up to disk, i have nochoices available to select either disk or tape. i still try to clickon the 'add' button to select a file and it fails.i checked the settings and have the sys admin permission level as it's astandalone on my laptop. any suggestions???tiawoody
View 1 Replies
View Related
Jul 23, 2005
Hi there,I've been sent a backup file from a SQL Server 2000 DB and triedrestoring into a blank DB (with the same name) on my SQL Server 2K,only it errors, see below:(I've separated each line with a return, to make it more readable)2005-07-08 11:08:23.93 spid51 BackupIoRequest::WaitForIoCompletion:read failure on backup device 'C:file location to backup'. Operatingsystem error 87(The parameter is incorrect.).2005-07-08 11:08:23.94 spid51 Internal I/O request 0x03BDFCEC: Op:Read, pBuffer: 0x03BDF800, Size: 512, Position: 5136, UMS: Internal:0x103, InternalHigh: 0x0, Offset: 0x1410, OffsetHigh: 0x0, m_buf:0x03BDF800, m_len: 512, m_actualBytes: 0, m_errcode: 87, BackupFile:C:file location to backup2005-07-08 11:08:23.94 spid51 The backup data in 'C:file locationto backup' is incorrectly formatted. Backups cannot be appended, butexisting backup sets may still be usable.2005-07-08 11:08:23.94 spid51 Starting up database 'databizDB'.2005-07-08 11:08:24.02 spid51 Bypassing recovery for database'databizDB' because it is marked IN LOAD.2005-07-08 11:08:24.16 spid51 BackupMedium::ReportIoError: readfailure on backup device 'C:file location to backup'. Operating systemerror 87(The parameter is incorrect.).2005-07-08 11:08:24.16 spid51 Internal I/O request 0x42FC5530: Op:Read, pBuffer: 0x03980000, Size: 512, Position: 5648, UMS: Internal:0x103, InternalHigh: 0x0, Offset: 0x1610, OffsetHigh: 0x0, m_buf:0x03980000, m_len: 512, m_actualBytes: 0, m_errcode: 87, BackupFile:C:file location to backupIt may be something simple as I've never really got that involved withthis side of it before. Hopefully someone out there can shed some lighton it, please?This may be normal, but I had to backup the blank DB locally firstbefore it would let me select a file to restore, so I could change thelocation.Cheers,Rich.
View 4 Replies
View Related
Sep 15, 2015
UAT environment : SQL Server 2008 R2 SP3 Enterprise Edition
SANDBOX environment : SQL Server 2008 R2 SP3 Standard Edition
I have a database backup (.bak) that was taken from UAT environment that has CDC enabled on some tables. I want to restore that database into my SANDBOX environment which does not support CDC (because of standard edition). The restore process fails due to this incompatibility. Is there any way to restore without CDC (I dont CDC enabled on my SANDBOX; just my data from the backup) ?
View 0 Replies
View Related
Jun 25, 2015
I am looking for a SQL Backup/Restore tools which can restore multiple environments. Here is high level requirements.
1. We have 4 DBs, range from 1 TB - 1.5 TB Each Database. When we restore to QA, DEV, or Staging, we usually restore 4 of them.
2. I am looking for the speed to complete restoring between 1 - 2 hours for 4 DBs.
I am evaluating the Dephix Software but the setup is very complex and its given us a lot of issues with Windows Authentions, and failure in the middle of the backup. I used Guess Software many years ago but can't find it on the web site any more. Speed is very important for us mean complete restoring as fast as possible. We are on SQL 2012 and SQL 2008 R2.We are currently using NETAPP Technology and I have Redgate Backup Tool but I am mainly looking for fast Restore Process.
View 4 Replies
View Related
Mar 28, 2008
Hai friends.....
I am doing project in ASP.NET(vb) my backend is sql server 2000...in my PC..
I have another pc....where sql server 2000 is installed.....
i have nearly 50 tables...in sql server 2000. in my PC..
I want to backup these tables from my pc and another pc...
can u tell me the steps...
I will try immediately....
Ambrose......
View 31 Replies
View Related
Jun 9, 2004
I want to backup an SQL Server database through a client application written in VB 6.0, and not through the Enterprize Manager.
I use the SQLDMO Objects Library to backup the database to the SQL Server machine through my application,
but there are the following problems:
a. The backup can be done only locally to the SQL Server machine. Is there any way to bypass this restriction?
b. To get the Directories Structure of this machine i use the xp_FixedDrives, xp_Subdirs stored procedures.
That's ok for the Backup operation but i do not have a way to view the FILES to perform Restore operation.
Of cource VB function Dir() cannot be used to view files on the server because of access restrictions.
Is there any workaround for that?
View 2 Replies
View Related
Nov 24, 2005
Hello!
I have a bug in SQL Server 2000 that I would like to discuss.
The bug is described briefly on http://support.microsoft.com/kb/821334.
"The potential for inconsistency in the backup history tables backupset and backupmediafamily is resolved. This issue may cause the restore process to point to the wrong backup files."
According to my experiences the bug is extremely serious. SQL Server backup and restore operations are not fully reliable. If you have a disaster situation there is a possibility that you can not perform a restore.
Technically a media_family_id is generated in a backup operation and inserted into msdb.dbo.backupmediafamily. What could happen is that a media_family_id, that already exists in backupmediafamily, is generated.
The bug is fixed from version 8.00.0859, but only if you have an special undocumented trace flag (3003) enabled.
Here is the information that I have got from Microsoft about this trace flag.
"Trace flag 3003 changes how SQL generates media_set_id for new backup files. It will guarantee that new media_set_id values in backupset table are unique when you create a new file with your backup. This is the only place in code where TF 3003 is used so it will not impact your SQL Server operations."
I have a SQL Server with 80 databases. I have a maintenance plan with full backup every 24 hours and log backup every 5 minutes.
The error happened on my server a few times every 24 hours. I believe it's a general problem.
Best regards
Ola Hallengren
View 9 Replies
View Related
Dec 27, 2007
Morning guys,
What is the equivalent to the taskpad on sql server 2005?
I want to be able to see when the last backup and restore was performed via transact sql ......
how would you go about that..... ?
what would I search... ?
View 2 Replies
View Related
Jan 29, 2015
I have TDE backup one serverA but There is no backup of certificates or keys from Server A. And no one knows the password used to create those backups. How do you restore the database XYZ at that time on Server B?
View 9 Replies
View Related
Jul 22, 2013
I have a .bak full database backup from a computer. Now I installed new SQL Server 2005 in another computer and would like to restore the .bak database here. How it can be done?
When I right click database and select restore database, it opens a window where it asks to put "destination for restore". This is a new SQL Server, how can I restore then?
View 3 Replies
View Related