Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have my local database called CBS and on the production server there is the same database. Sometimes I want to make a backup on production and want to restore it on my local machine. With SQL Server 2008 I had no problems but now I can't do that.
To restore the production database I changed the destination database from CBS to CBS_PROD. I also changed the file names of the destination database. After restore the CBS_PROD is OK but my former local CBS database is in state "Restoring...".
Please help.
Thanks
Andi
Try Executing this statement
RESTORE DATABASE DataBase_Name
WITH RECOVERY
GO
If you are using SSMS to restore the database make sure you select the following option in "Recovery State" Section.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Currently, we have 12 Azure Sql Databases and typically 1 or more will need to be updated with a SQL query.
Today, I had a request to delete the same records from all 12.
Are there any tools or ways I can do this without having to connect to each one and running the query?
Aaron Bertrand's sp_foreachdb will let you do this by using the #database_list parameter.
Alternatively, there are third party plugins for SQL Server Management Studio that can do this, one which is Devart SQLComplete but only in the premium version (which does have a 30 day free trial)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a SQL Server database with lots of data and an empty MySQL database. Now I want to copy all data of SQL Server database (including the database schema) to the MySQL database.
I thought about using raw SQL dump, but SQL Server's SQL syntax is not same as MySQL.
And I have googled some database migration tool, such as south (only for django), simple-db-migration (only for one type of database, maybe PostreSQL?) and SQLAlchemy (I haven't finished learning it, just feeling it somewhat clunky).
What tool can I use to do this migration?
I'm usually using opendbcopy for these kind of jobs ...
I tried this tool once http://dbconvert.com/convert-mssql-to-mysql-pro.php , but you have to pay for the full version. Of course you can write your own migration script e.g. in PHP. On Windows it will be easy to connect to MSSQL server, from a Linux machine you have to use ODBC and that is sometimes a bit messy to install and configure.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to backup my SQL Server 2008 R2 database. However I am getting the below error, no matter where I try to save the backup.
System.Data.SqlClient.SqlError: The volume on device 'D:\Programfiles\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\dbName.bak'
is not part of a multiple family media set. BACKUP WITH FORMAT can be
used to form a new media set. (Microsoft.SqlServer.Smo).
Can anyone throw light on this?
The only helpful links I could google were following but of little use:
http://social.msdn.microsoft.com/Forums/en-US/sqldisasterrecovery/thread/a1eb2818-2a97-4c52-aa8d-7c224f1ac282
and
http://www.sqlservercentral.com/Forums/Topic279584-24-1.aspx
I wasn't able to reproduce the issue however, here's a workaround for whoever might run into this: use WITH FORMAT clause or Options - Back up to a new media set and erase all existing backup sets option in the GUI.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
In my work I have a BAK file (which I'm working on in SSMS) and the system Admin gave me permissions via my Active directory .
NOw ,
If I'm taking the bak to another place (e.g. home), and I'm adding the sa user (which is me, and I don't have Server Environment in my house) as full controller.
Should I be able to have full control over it (at home )?
If you have a backup file with no encryption, then you can restore it on your local machine as sa. When you do this, though, the database users will be orphaned, and you will have to modify that. No big deal, and as an sa you'll already be mapped to the dbo user, but if you have an application hitting the database using a different database login/user then that will be an issue.
As long as you are administrator on your machine at home you should have full control. The only items you may not be able to get to is if certain columns are encrypted.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have an input page in my C# application whereby my boss can enter sales info.
This page also has a clear button, which clears the contents of the table in the database. This clear button was convenient for testing, however now in hindsight a mistake.
All the records in the table have been deleted. There are no backups either.
Long shot, but is there any way of recovering this data using only SQL Server 2008?
If you still have the transaction logs, there are some tools, but these will cost some ...
See
How to undo a delete operation in SQL Server 2005?
and
https://web.archive.org/web/20080215075500/http://sqlserver2000.databases.aspfaq.com/how-do-i-recover-data-from-sql-server-s-log-files.html
Edit : Looks like Redgate is SQL 2000 only. Which leaves Apex. And if your clear function uses TRUNCATE, you are up the creek.
Edit:( 2008 support)
SQL Data Compare Professional
This version of SQL Data Compare, you can compare a live database with or against backup files and synchronize data and deleted tables with their data contents from the backup file or backup file set to the live database.
Redgate even say this should do the same job, and that is why they have not come with any new version.
Will probably need a backup or transaction log ....
See this subject.