I have a couple of databases that it's user's passwords have been changed and i plan on changing them back to their old passwords so im wondering, if i retrieve a database a backup from ovh does that affect the user credentials or just the tables?
If you restore your backup (the ones automatically made each day by OVH), it will only restore your tables and relations, not the users.
If you want to double check this, you can download your backup files and check its content. You should not see any CREATE USER instruction inside this backup file.
Related
By mistakenly i have delete few record from SQL database on azure, it is possible to recover from there, as azure take auto back of database, so its possible to recover.
Azure SQL Database has this amazing built-in feature to restore the database at any point of time to undo the unwanted changes made in the past or get the database back after mistakenly deleted.
The Restore option is available in Overview menu bar.
Fill the required details as shown in below image and click on Review + create option to restore the database.
Brief background info
We´re moving a database from Windows Server 2012 to 2016 in a critical production environment and are experiencing problems where the database on the new server gets set to Restricted user after the restore is done.
This is the order things are done:
2012 db is manually set to restricted user
Backup is made from 2012 db
2016 db is restored using backup in step 2
2016 db is unwillingly set to restricted user
The reason that we set the 2012 db in restricted user in the first place is to force logged in users to a stand-by environment while the 2016 db is being set-up.
The team that is doing this backup and restore claims that the database state is included in the backup as well and that that's the reason the new database get's set into restricted user as soon as the restore is done.
The new database being set to restricted user is not a huge problem since it's possible to manually change it back to multi user, but since this environment is of such critical nature, we don't want to risk having our users on the backup system any longer then necessary
So here's the actuall question:
When restoring a database from a backup, is the database state included in the backup and brought to the newly restored database? And if so, is it possible to exclude this?
Thanks in advance! :)
The RESTORE documentation states:
During a restore, most of the database options that are settable using
ALTER DATABASE are reset to the values in force at the time of the end
of backup.
So if the source database is in RESTRICTED_USER, the database will be set to that mode during the restore. You can, however, specify the WITH RESTRICTED_USER option during the restore to set the restored database to RESTRICTED_USER if the source database was backed up with a different option.
But there is no RESTORE option to specify WITH MULTI_USER so you'll need to execute ALTER DATABASE after the RESTORE to change the option.
I have developed an database application with Delphi XE2 using an Access DB, now the problem is that I never added any backup and restore function into the application. The database will take a long time to get big, as it will only record about 30 records per day. So what I want to know is how to I write a function in Delphi that for example duplicates the database to a specific location, selected by the user. And also how to restore a backup from a location selected by the user.
To backup and resstore an access db you must copy the .accdb (or .mdb for older versions) file to the location which you want. Just be ensure of close the existing connections to the db. To copy the file you can use the TFile.Copy method.
I'm trying to backup a live database to my computer and I can't find the option to do it. I'm connecting to it using Microsoft SQL Server Management Studio 2008 R2. I'm a MySQL monkey, so I'm used to being able to backup to .sql files and move them around.
Anyone have any idea how I can create a file backup of the database? I've found the backup option which only backs up on the server, or the export, which seems to only allow a single table, or code an SQL query, which I'm not too sure on, short of putting in something like SHOW TABLES;
Anyone have any ideas? I'm limited to readonly access for various reasons, nothing bad, promise!
You will only be able to backup the database to a location the service account for SQL has access to. If you have access to a central share on the server/network that you can access and the service can, you might backup to that location and then browse from your computer to pull it down.
If you are just wanting the database structure you could script the database out to a file. This would let you save it locally. If you also want the data though doing a full backup is the quickest way I know of.
EDIT
I would use the T-SQL BACKUP comand and include WITH COPY_ONLY to backup the database, since you stated this is a "live" database. If a scheduled job is performing backups against the database and you break in to do an additional one you will effect the backup recovery chain of the database. Using the COPY_ONLY will allow you to get a backup of the database without requiring it in the event of a recovery need.
You can also create sql dumps with Management Studio.
Right-click the database and select Tasks - Generate Scripts. This will open a wizard that allows you to select what the dump should include (e.g. tables, indices, views, ...).
Make sure you set "Script Data" to true if you want your dump to include inserts.
You can enter a valid UNC path in the Backup option.
Is there any way (3rd party product or other method) to do a partial restore to ms crm?
Say a user accidentially deleted an account. Is there anyway to restore just that single account and corresponding notes, activities etc?
We limit users' permissions but inevitably they will have permission to delete some things and will want to get that item from a backup.
Right now the only method I can think of is to restore the .bak file to another db and write a bunch of code using the sdk to re-create the items. Are there any other options?
Red Gate has a tool which will let you restore just certain objects from a database.
Idera has this new virtual database tool where you basically mount the backup as a SQL Server database.
Full disclosure - I haven't used either for this kind of thing - I've always either used audit trails or restored the database and extracted the data manually.
You are correct in that you can only restore to a different database and work from there.
You could then use something like Red Gate data compare to extract the desired rows (14 day trial, but it's worth it's weight in SO Rep anyway)
To be honest, I'd go with
Right now the only method I can think of is to restore the .bak file to another db and write a bunch of code using the sdk to re-create the items.
After all, 'Its the only way to be sure....', not to mention the (extremely) vague chance of another record being created with the same GUID, which would cause assorted 'bad stuff' to happen.
Yes, a small number, but still more than 0...