This is a theory based question. If you have two DC's running Windows 2016 or 2019 and need to restore the contents of the Sysvol folder. Can you restore the contains via a normal files and folders restore then force a replication???
Related
I am trying to access the backup files folder in order to restore the worldwideimporters bak file on my version of MS SQL Server, but I cannot.
In this image, there's supposed to be a folder named "MS SQL14.MSSQL Server" that contains the backup folders where I need to put the bak file in, but it's not there.
No MS SQL14.MSSQL Server folder no backup folder
I'm expecting the MS SQL14.MSSQL Server folder to be there, and the backup folder to be in it.
On a 64 bits windows its location is:
C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER
Note: You don't need to put a .bak file to the backup folder in order to be able to restore it.
I have SQL Server 2012 (64-bit) (MSSQL11)
running on Windows 2012 R2 (64-bit) (NT 6.3)
with .NET framework 4.0.
It has a database called db_X and since this is a live production database it is always running and stopping it is not an option.
This is the only SQL Server database server that I practically have.
I want to take a backup (i.e. a full backup) of db_X (which I know how to do) and restore that backup (that .bak file) under a different name (say db_Y) in the same SQL Server database server.
I created a new database called db_Y, then right clicked db_Y then went to Tasks --> Restore --> Database...
Then I gave the path to that .bak file (as source) and tried to restore it by giving db_Y as destination (with the option - overwrite the existing database i.e. WITH REPLACE)
But this is not working. It is giving an error.
It says restore of database db_Y failed. System.Data.SqlClient.SqlError: The file C:...\db_X1.mdf cannot be overwritten. It is being used by database db_X. Microsoft.SqlServer.SmoExtended.
But I still believe that this can be done using the Management Studio. Or at least using a script. (as this is a common requirement.)
Why is it trying to restore on db_X, when I have clearly given db_Y as my destination? Isn't this a bit scary as db_X is my live database (because I might lose some data)?
How is it possible to (have a copy of an existing and running database under a different name in SQL Server or in other words) restore a backup of an existing and running database with a different name in SQL Server 2012?
I am grateful if someone could kindly explain how this can be done using the Management Studio or at least using a script.
When you are restoring the database, you need to rename the database to something other than the name of the original:
And then click the Files section and makes sure the file names are different than the original database:
I'm trying to restore a db from Microsoft (AdventureWorks2012). However, when I try to restore the .bak file, it seems like SSMS doesn't recognize it and I get an error:
No backup set selected to be restored
I gave full permissions to the folder which contains the .bak file.
Steps I've taken to restore the .bak file:
Right click on DB -> Restore DB -> From device (selected the .bak file location) -> To Database (selected the DB destination)
Here is a screenshot:
That is the error message that typically coincides with trying to restore a backup from a newer version on an older version. And it looks like you have sql server 10.5 in your screen which is 2008r2. And you are trying to restore AW2012. That will never work. You can't restore a newer version to an older version.
Previously, I had downloaded SQL Server 2008 R2 Express with Advanced Service (so that it includes SQL Server Management Studio). Now I want to uninstall this application. When I attempted to perform this, I received the following error:
SQL Server 2008 R2 SP1 Database Engine Shared
The feature you are trying to use is on a network resource that is unavailable.
Click OK to try again, or enter an alternate path to a folder containing the installation package 'sql_engine_core_shared.msi' in the box below.
The sql_engine_core_shared.msi cannot be found anywhere on my machine. Does anyone have any suggestions? Have done a lot of searching with no success. TIA.
This is the original exe that I had downloaded, and when it starts it unpacks a bunch of files into a GUID-named folder on the C drive:
SQLEXPRADV_x64_ENU.exe
At some point later this file is deleted, which is why I could no longer find the required MSI file. So all I did to resolve the issue was start that exe, then copy all the files in that directory to a different location so they don't get deleted. Then, when I run the installer, and that dialog comes up I pointed the directory to my backup location and the uninstall completed successfully, e.g.,
C:\MySqlServerInstallBackup\1033_enu_lp\x64\setup
HTH.
I am trying to attach a SQL server 2000 MDF and LDF which were created on a different machine and attach them to a SQL Server 2008 R2 on different machine. The SQL server files at the original machine were located at:
C:\DB\SqlServerDataBase.mdf
D:\Logs\SqlServerDatabase.ldf
The 2008 Sql Server machine also contains the same file structure and I place the MDF and LDF files in their appropriate folders:
C:\DB\SqlServerDataBase.mdf
D:\Logs\SqlServerDatabase.ldf
When using the SQL Server Management studio Attach Database option, I point to the MDF file however the log file is automatically is pointed to C:\DB\SqlServerDatabase.ldf instead of D:\Logs\SqlServerDatabase.ldf and subsequently the attach fails since it can not find the log file.
Interesting thing is if I use :
EXEC sp_attach_db #dbname =N'SqlServerDataBase',
#filename1=N'C:\DB\SqlServerDataBase.mdf',
#filename2=N'D:\Logs\SqlServerDatabase.ldf';
The database is restored and pointing to the correct paths for both MDF and LDF.
Thanks
When you're using the GUI (SQL Server Management Studio) and you select Attach Database and go pick a .mdf file, by default SQL Server Mgmt Studio will use the path that the database log file was originally stored on - since that's the only information it has.
But you can and you must change that to match your current setup - just type in the proper path (or select it from the path selector popup when you click on [...] if you prefer that)
Once you've typed in the correct paths, click [OK] and your database will be attached as requested.