English 中文(简体)
如何从表格中收回旧数据
原标题:How to recover the old data from table
  • 时间:2010-01-11 13:48:18
  •  标签:
  • sql

我在2008年的一份表格中做了更新发言,其中用一些错误的数据更新了表格。

我没有获得亚洲开发银行的支持。

它有一些重要日期有待更新。

是否有任何途径可以从表格中收回旧数据。

增 编

国民账户体系

问题回答

除非你想要使用商业标识读物,并试图通过该日子,否则基本不会。 数据库的任何备份都无法恢复,离开了城镇情况——虽然情况艰难,但不应发生。

安德鲁基本上称呼。 我只想补充你们可以考虑的以下几个想法:

  1. Are there any reports or printouts lying around? Perhaps you can reconstruct the data from there.
  2. Was this data entered via a web application? If so, there is a remote chance you can find the original data in the web server logs, depending upon how the app was constructed, etc.
  3. Does this app interface (pass data to) any other applications? They may have a buffered copy of data...
  4. Can the data be derived from any other existing data? Is there an audit log table, or another date in your schema based on this one, from which you can reconstruct the original date?

<><>Edit>:

一些评论者提到,这是检验你更新/编辑发言之前的良好想法。 为了成为习惯,如果你的方法容易的话,它会有所帮助。 我通常创建我的<条码>DELETE。

--delete --select * 
from [User]
where UserID=27

为了测试你的询问,从<条码>到<条码/代码>开始,选择进行。 然后,如果你对过滤标准感到满意,则从<代码>delete开始,重点说明所有事项。 在<代码>delete前面的两张 da子,这样,如果电 que偶发生,它只会由于无效的yn子而坠毁。

您可使用<代码>UPDATE说明的类似构件,尽管这并不完全干净。

服务器为每次转运保存记录。 因此,你可以从原木中收回经过修改的数据,而无需备份。

Select [PAGE ID],[Slot ID],[AllocUnitId],[Transaction ID]
,[RowLog Contents 0], [RowLog Contents 1],[RowLog Contents 3],[RowLog Contents 4]
,[Log Record]
FROM    sys.fn_dblog(NULL, NULL)  
WHERE
AllocUnitId IN 
(Select [Allocation_unit_id] from sys.allocation_units allocunits
INNER JOIN sys.partitions partitions ON (allocunits.type IN (1, 3)  
AND partitions.hobt_id = allocunits.container_id) OR (allocunits.type = 2 
AND partitions.partition_id = allocunits.container_id)  
Where object_id=object_ID(   +  dbo.student  +   ))
AND Operation in ( LOP_MODIFY_ROW , LOP_MODIFY_COLUMNS ) 
And [Context] IN   ( LCX_HEAP , LCX_CLUSTERED )

Here is the artcile, that explains step by step, how to do it. http://raresql.com/2012/02/01/how-to-recover-modified-records-from-sql-server-part-1/

Imran

感谢所有答复。

问题实际上偶然——我错过,无法选择更新说明中的条件。 页: 1

这是一项快速的5分钟的任务——Like刚刚改变了对一个客户数据进行测试的日期,而我们却不认为得到支持。

当然,你是真的。 这是一个教训。

现在,我会仔细撰写“我的更新声明”或“测试我的最新声明”

再次感谢花费你的时间,给人留下一些深刻的见解,而忽视了这一问题,因为唯一的答案是“无”。

增 编

国民账户体系

人民民主党在主要声明之前,甚至在声明未使用时,就得回来,这样会带来思想的和平。

特别是在恢复Red Gate目标级的情况下,现在可以恢复个人桌子/排,然后提交后备文件。

好uck,我建议找到其他地方的旧复制件(DEV/QA)......

是否有可能对人民民主党的声明进行倒退?

晚一个但希望有用......

如果数据库完全采用回收方式,那么所有交易都登录在交易记录中,可以检索。 问题在于,由于这不是交易记录的主要目的,因此这一问题没有得到本土支持。

备选办法如下:

  • Commercial tools such as Apex Log (more expensive, more options) or Quest Toad (less expensive, less options for this purpose main focus is on SQL Server management)
  • 正如用户1059637所指出的,试图做这一分析。 这种做法的问题在于,它不能再读交易记录备份,而且更令人迷惑。

    从时间和美元来看,你的数据有多少价值。





相关问题
SQL SubQuery getting particular column

I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...

难以执行 REGEXP_SUBSTR

I m 查询Oracle 10g。 我有两张表格(样本数据见下文)。 i m 试图提取一些领域

SQL Query Shortcuts

What are some cool SQL shorthands that you know of? For example, something I learned today is you can specify to group by an index: SELECT col1, col2 FROM table GROUP BY 2 This will group by col2

PHP array callback functions for cleaning output

I have an array of output from a database. I am wondering what the cleanest way to filter the values is example array Array ( [0] => Array ( [title] => title 1 ...

OracleParameter and DBNull.Value

we have a table in an Oracle Database which contains a column with the type Char(3 Byte). Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn t work: OracleCommand ...

Running numbers in SQL

I have a SQL-statement like this: SELECT name FROM users WHERE deleted = 0; How can i create a result set with a running number in the first row? So the result would look like this: 1 Name_1 2 ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签