How to roll back delete operation sql server? [closed] - sql-server

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.

Related

Most straightforward way to consolidate data from multiple different RDBMS systems into a queryable database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have few tables that I have to sync between 3 different RDBMS systems (PostgreSQL databases, a SQL Server and a Firebird Database).
Currently I simply connect to my Firebird database and pull the few relevant tables to my PostgreSQL database, but as databases change, new tables require querying and with the addition of a SQL Server database to the mix I feel this solution is ill fitting.
I've done some research on BI tools , but I still need to query data from this data source and show them inside a Windows Forms application.
PS: it's not a migration and I only need to query the data from these "satellite" databases
Using PostgreSQL as your hub, you can use Foreign Data Wrappers to reach out to the other two databases whenever a query wants their data. Then it will always be up to date, but performance might suffer compared to actually importing the data. For reaching SQL Server, you can use tds_fdw, and for firebird you can use firebird_fdw. I have never used either one of these, so this is just a starting point.
You could probably pick SQL Server as your hub and accomplish the same thing, it calls them "linked servers" rather than Foreign Data Wrappers, see for example.

how to import mssql database in Mysql [duplicate]

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.

SSIS, Change Tracking, and Snapshot Isolation [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm currently using SQL Server 2008 R2 Change Tracking (not Change Data Capture) and SSIS to extract incremental changes from several source databases.
Until now, I'd been using restored backups to do this so I didn't need to worry about Snapshot Isolation. However, I now need to point these packages at the production databases.
I know that setting the Snapshot Isolation Level on for the tracked databases is recommended to ensure consistency of the ETL extracts. I'm reluctant to do this because of possible degradation in performance.
Since I'm extracting late at night, is there some reason I can't use the following process?
Create a database snapshot for temporary use.
Get the Change Tracking Current Version of the Production Database.
Compare it with the previous successful run version.
Extract from the Database Snapshot instead of the Production Database.
After successful load, drop the Database Snapshot.
We're using 2008 R2 Enterprise Edition. is there any downside to this? Am I missing something?

Restore same database multiple times [closed]

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.

Keep Publication while migrating database in SQL Server 2008 R2 [closed]

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 large database with merge-replication on it that needs to be moved to a different server. There is one publisher, but there are close to 200 subscribers, so I don't want to recreate them all manually.
Is there a way to make this move so that I don't have to recreate the publication and subscribers. I read this link, but I wasn't sure if that's what I'm looking for.
If you need more details, let me know. Thanks!
Hopefully, you can find the original "setup subscriber" script. And piggy back on the msdn article below to "variable up" your existing script.
If not, you could create the scripts manually. Not ideal, but better than 200 manual setups through the GUI.
Here is a link to kinda what I'm suggesting: (the msdn link below).
http://msdn.microsoft.com/en-us/library/ms147302.aspx
-- This script uses sqlcmd scripting variables. They are in the form
-- $(MyVariable). For information about how to use scripting variables
-- on the command line and in SQL Server Management Studio, see the
-- "Executing Replication Scripts" section in the topic
-- "Programming Replication Using System Stored Procedures".
So you get 1 subscriber working correctly, then you can command line call the scripts and just pass in the other 199 config values (servername/database name, etc).
I would NEVER rely on manual steps to reproduce replication. You'll never "from memory" get the same result twice. There are just too many options, IMHO, and too many "fat finger" mistakes to be made.
EDIT:
http://msdn.microsoft.com/en-us/library/ms152483.aspx
Maybe that can help.
You're looking for a "is there a way to 'script out' publication setup"? (and then subscriber).
If so, you'll have your pre-sql-cmd starting point. Then sqlcmd up the variables.
And you'll know how to get perfect and exact subscribers in the process.

Resources