Undo Updated Rows In Sql Server 2005
May 29, 2008
currently i m developing a web application with using sql server 2005
and i was testing yesterday a sql update query with sql server management studio.
in my update query i forgot to put where condition and now all the rows of table are updated. is there any solution to undo this and retrieve all rows back?
Regards Selena
View 6 Replies
ADVERTISEMENT
Jun 4, 2007
Stepping thru the code with the debugger shows the dataset rows being deleted.
After executing the code, and getting to the page presentation. Then I stop the debug and start the
page creation process again ( Page_Load ). The database still has the original deleted dataset rows.
Adding rows works, then updating works fine, but deleting rows, does not seem to work.
The dataset is configured to send the DataSet updates to the database. Use the standard wizard to create the dataSet.
cDependChildTA.Fill(cDependChildDs._ClientDependentChild, UserId); rowCountDb = cDependChildDs._ClientDependentChild.Count; for (row = 0; row < rowCountDb; row++) { dr_dependentChild = cDependChildDs._ClientDependentChild.Rows[0]; dr_dependentChild.Delete(); //cDependChildDs._ClientDependentChild.Rows.RemoveAt(0); //cDependChildDs._ClientDependentChild.Rows.Remove(0); /* update the Client Process Table Adapter*/ // cDependChildTA.Update(cDependChildDs._ClientDependentChild); // cDependChildTA.Update(cDependChildDs._ClientDependentChild); }
/* zero rows in the DataSet at this point */ /* update the Child Table Adapter */ cDependChildTA.Update(cDependChildDs._ClientDependentChild);
View 1 Replies
View Related
Oct 10, 2007
Is there a command that will tell me the number of rows that are updated in a statement. I would like to put this in an Stored Procedure and pass the #rows updated back out.
View 1 Replies
View Related
Jan 30, 2008
Hi,
I was wondering, is it really true that in Sql Server 2005, there is no updated date -property for stored procedures? There is a created date -property, but it's not useful, because stored procedure's get updated often. This is a huge disadvantage for me, and I was really waiting for ms to fix this problem after sql server 2000, but no. Does anyone figured out any solution to this problem?
Br,
Riika
View 6 Replies
View Related
Nov 7, 2013
so i have an update query that is updating 50k rows per batch. my question is how do i campture how long it is taking to update 50k rows per batch.
View 3 Replies
View Related
Apr 28, 2005
I would like to return the the Primary Key of the row altered from this query - what changes do I need to make?
UPDATE Members SET LastLog = @time WHERE UserName=@user AND Password=@pass;
Thanks in advance,
View 6 Replies
View Related
Feb 9, 2005
Can this be done easilly through a stored proc?
View 1 Replies
View Related
Dec 8, 2006
is there a Trigger that monitors updated rows? I would like to run a
insert into sometable (pkcolumnname)
select pkcolumnname from monitoredtable where ????
"i dont know what goes here to only get value of rows that have been updated"
View 1 Replies
View Related
Apr 30, 2006
HI, I am wondering if it is possible to retreive this information without using row count transform. Can I get the # of rows inserted/updated or deleted by destination from the log?
Thank you,
Ccote
View 1 Replies
View Related
May 6, 2008
This was a usual day today in office and i was working on a requirement in which i was needed to fetch the total number of rows effected by an update query, so I asked my best code mate "Google" and to my surprised there was not enough correct answers at least the one i was looking for.There were suggestions that you can use a select statement for the updated rows and make it like a select (count) which works fine, but just looking into the SQL server books online, it shows that there is even a better way to do it.After the update statement in my stored procedure i used "@@ROWCOUNT" with a select statement and it works like a charm.so the little find for my first ever post on asp.net is that there is a better way to find the total updated rows by a query Example: DB: Northwind , Table Employeesupdate employees set extension='1234'select @@ROWCOUNT This will return 9 (default rows in this table) as the rows effectedHope this helps
View 2 Replies
View Related
Nov 29, 2007
Hi,
I am trying to create a SSIS package, which will extract data from a SQL server view and populate the data in our local SQL server database tables. My objective is to get the data from the view such that only inserted and updated rows are fetched from the view.
Note: the view does not expose any updated date type of column thru which I can check. So I guess I have to compare each and every field with my destination table row's fields.
I would appreciate any suggestions on how to approach the problem.
Thanks in advance.
View 1 Replies
View Related
May 20, 2007
hai to every one,
i am pavan working as oracle dba. in oracle we have undo table space.
when we issue rollback oracle gets old image from undo tablespace.
in sql server where it gets from old image.
who performs instance crash recovery(which back ground is responsible for it)
in sql server we have logwriter, lazy writers(back ground processes)
what are the other processess.
and some doubts are
how insert query works
how update query works,
how select query works.
means i issue update statement. command successfully executed. late issue rollback, from where sql server gets old imege of the data
please send me any archetecture book /pdf/online link
thanks
kumar
pavan
Associate Oracle DBA
View 4 Replies
View Related
May 8, 2015
how to track how many rows updated or deleted per day in a single table and load the information in another table .
View 7 Replies
View Related
Apr 7, 2014
I know 2008 MS SQL Server has a timestamp data type that adds date and time when the rows are inserted. Is there a way to automatically update the date and time when the rows are updated?
View 5 Replies
View Related
Sep 8, 2006
i am getting the above error on my database i have 2 rows with the same info on and another 2 with the same info on. example:
ID username password
1 bob bob
1 bob bob
1 john john
1 john john
I know this is a fault with ms sql 2005 however how do i fix it?
Ive found this link which explains everything but how do i start a query. I tried clicking on new query and copying the code. What is table1 meant to be? the database is dbl.tbl_admin. It wont find my database.
Im not sure how to do it anyway.
I need to change it though as its my admin password and Ive given it out to web design companys
http://geekswithblogs.net/allensb/archive/2006/07/27/86484.aspx
Can some 1 read the above page and give me full instructions, I dont know what im doing thanks
info@uktattoostudios.co.uk
View 7 Replies
View Related
Mar 10, 2008
Hi,
I was opening a web page, that has a grid view representing the records of a table, I updated a record of the sql table by mistake, but I am not sure which record,
is there any way in Sql server to get the last record just updated few minutes ago. I hyave admin permissions on the DB.
Also, is there a way to know the value that was just there before the changes?
Thanks a lot.
View 1 Replies
View Related
Apr 6, 2008
Hi,I want to save the last modification date when the row is updated. I have a column called "LastModification" in the table, every time the row is update I want to set the value of this column to the current date. So far all I know is that I need to use a trigger and the GetDate() function, but could any body help me with how to set the value of the column to getdate()? thanks for your help.
View 3 Replies
View Related
Apr 24, 2008
Good afternoon everyone,
I hope that I am not asking a question which has been answered many times in the past, I did a search but could not find an answer. These may be beginner questions, so bear with me as I am something of a beginner.
This week our organization updated from SQL 2000 to SQL 2005. We are using a Microsoft Access front end for this data and the information is entered through forms into the correct tables. When our researchers are enter the information they also have to sometimes search existing information to ensure they do not duplicate what is already in there. For this we use several access queries. This has worked well on the SQL 2000 server without any issues. However, now that we are on 2005 we are starting to recieve ODBC Call fail errors and errors which specify that they are a result of a deadlock. My first question is, are the ODBC call fail errors possibly locks which caused the ODBC connection to time out? My second question is why am I recieving these errors in 2005 but not 2000?
Thanks in advance for any help
- Hitz
View 1 Replies
View Related
Jan 3, 2007
SQL 2000 to SQL 2005 Upgrade Error - Database Down - Help Appreciated
I am upgrading a SQL 2000 standard database server to SQL 2005 standard on a windows 2003 server
I am logged in as domain admin and started the upgrade as 'sa'
The upgrade stops with the error:
Service MSSQLSERVICE can not be started. Verify you have sufficient privilages to start system services. The error code is (17185)
The error log shows:
2007-01-04 15:59:38.77 Server Authentication mode is MIXED.
2007-01-04 15:59:38.79 Server Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)
Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
2007-01-04 15:59:38.79 Server (c) 2005 Microsoft Corporation.
2007-01-04 15:59:38.79 Server All rights reserved.
2007-01-04 15:59:38.79 Server Server process ID is 4188.
2007-01-04 15:59:38.79 Server Logging SQL Server messages in file 'F:SQLDataMSSQLlogERRORLOG'.
2007-01-04 15:59:38.79 Server This instance of SQL Server last reported using a process ID of 2980 at 1/4/2007 3:56:58 PM (local) 1/4/2007 2:56:58 AM (UTC). This is an informational message only; no user action is required.
2007-01-04 15:59:38.79 Server Registry startup parameters:
2007-01-04 15:59:38.79 Server -d F:SQLDataMSSQLdatamaster.mdf
2007-01-04 15:59:38.79 Server -e F:SQLDataMSSQLlogERRORLOG
2007-01-04 15:59:38.79 Server -l F:SQLDataMSSQLdatamastlog.ldf
2007-01-04 15:59:38.79 Server Command Line Startup Parameters:
2007-01-04 15:59:38.79 Server -s MSSQLSERVER
2007-01-04 15:59:38.79 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2007-01-04 15:59:38.79 Server Detected 4 CPUs. This is an informational message; no user action is required.
2007-01-04 15:59:38.83 Server Set AWE Enabled to 1 in the configuration parameters to allow use of more memory.
2007-01-04 15:59:39.02 Server Using the static lock allocation specified in the locks configuration option. Allocated 20000 Lock blocks and 20000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2007-01-04 15:59:39.02 Server Multinode configuration: node 0: CPU mask: 0x0000000a Active CPU mask: 0x0000000a. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2007-01-04 15:59:39.04 Server Multinode configuration: node 1: CPU mask: 0x00000005 Active CPU mask: 0x00000005. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2007-01-04 15:59:39.04 Server Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-01-04 15:59:41.04 Server Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-01-04 15:59:41.04 Server Database Mirroring Transport is disabled in the endpoint configuration.
2007-01-04 15:59:41.04 spid7s Starting up database 'master'.
2007-01-04 15:59:41.05 spid7s 1 transactions rolled forward in database 'master' (1). This is an informational message only. No user action is required.
2007-01-04 15:59:41.07 spid7s 0 transactions rolled back in database 'master' (1). This is an informational message only. No user action is required.
2007-01-04 15:59:41.07 spid7s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2007-01-04 15:59:41.08 spid7s SQL Trace ID 1 was started by login "sa".
2007-01-04 15:59:41.08 spid7s Starting up database 'mssqlsystemresource'.
2007-01-04 15:59:41.11 spid7s Using 'dbghelp.dll' version '4.0.5'
2007-01-04 15:59:41.11 spid7s ***Stack Dump being sent to F:SQLDataMSSQLLOGSQLDump0035.txt
2007-01-04 15:59:41.11 spid7s SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
2007-01-04 15:59:41.11 spid7s * *******************************************************************************
2007-01-04 15:59:41.11 spid7s *
2007-01-04 15:59:41.11 spid7s * BEGIN STACK DUMP:
2007-01-04 15:59:41.11 spid7s * 01/04/07 15:59:41 spid 7
2007-01-04 15:59:41.11 spid7s *
2007-01-04 15:59:41.11 spid7s *
2007-01-04 15:59:41.11 spid7s * Exception Address = 78144D3A Module(MSVCR80+00014D3A)
2007-01-04 15:59:41.11 spid7s * Exception Code = c0000005 EXCEPTION_ACCESS_VIOLATION
2007-01-04 15:59:41.11 spid7s * Access Violation occurred reading address 0000001E
2007-01-04 15:59:41.11 spid7s *
2007-01-04 15:59:41.11 spid7s *
2007-01-04 15:59:41.11 spid7s * MODULE BASE END SIZE
2007-01-04 15:59:41.11 spid7s * sqlservr 01000000 02BA7FFF 01ba8000
2007-01-04 15:59:41.11 spid7s * ntdll 7C800000 7C8BFFFF 000c0000
2007-01-04 15:59:41.11 spid7s * kernel32 77E40000 77F41FFF 00102000
2007-01-04 15:59:41.11 spid7s * MSVCR80 78130000 781CAFFF 0009b000
2007-01-04 15:59:41.11 spid7s * msvcrt 77BA0000 77BF9FFF 0005a000
2007-01-04 15:59:41.11 spid7s * MSVCP80 7C420000 7C4A6FFF 00087000
2007-01-04 15:59:41.11 spid7s * ADVAPI32 77F50000 77FEBFFF 0009c000
2007-01-04 15:59:41.11 spid7s * RPCRT4 77C50000 77CEEFFF 0009f000
2007-01-04 15:59:41.11 spid7s * USER32 77380000 77411FFF 00092000
2007-01-04 15:59:41.11 spid7s * GDI32 77C00000 77C47FFF 00048000
2007-01-04 15:59:41.11 spid7s * CRYPT32 761B0000 76242FFF 00093000
2007-01-04 15:59:41.11 spid7s * MSASN1 76190000 761A1FFF 00012000
2007-01-04 15:59:41.11 spid7s * Secur32 76F50000 76F62FFF 00013000
2007-01-04 15:59:41.11 spid7s * MSWSOCK 71B20000 71B60FFF 00041000
2007-01-04 15:59:41.11 spid7s * WS2_32 71C00000 71C16FFF 00017000
2007-01-04 15:59:41.11 spid7s * WS2HELP 71BF0000 71BF7FFF 00008000
2007-01-04 15:59:41.11 spid7s * USERENV 76920000 769E3FFF 000c4000
2007-01-04 15:59:41.11 spid7s * opends60 333E0000 333E6FFF 00007000
2007-01-04 15:59:41.11 spid7s * NETAPI32 71C40000 71C97FFF 00058000
2007-01-04 15:59:41.11 spid7s * SHELL32 7C8D0000 7D0D2FFF 00803000
2007-01-04 15:59:41.11 spid7s * SHLWAPI 77DA0000 77DF1FFF 00052000
2007-01-04 15:59:41.11 spid7s * comctl32 77420000 77522FFF 00103000
2007-01-04 15:59:41.11 spid7s * psapi 76B70000 76B7AFFF 0000b000
2007-01-04 15:59:41.11 spid7s * instapi 48060000 48069FFF 0000a000
2007-01-04 15:59:41.11 spid7s * sqlevn70 4F610000 4F7A0FFF 00191000
2007-01-04 15:59:41.11 spid7s * SQLOS 344D0000 344D4FFF 00005000
2007-01-04 15:59:41.11 spid7s * rsaenh 68000000 6802EFFF 0002f000
2007-01-04 15:59:41.11 spid7s * AUTHZ 76C40000 76C53FFF 00014000
2007-01-04 15:59:41.11 spid7s * MSCOREE 61FB0000 61FF4FFF 00045000
2007-01-04 15:59:41.11 spid7s * ole32 77670000 777A3FFF 00134000
2007-01-04 15:59:41.11 spid7s * msv1_0 76C90000 76CB6FFF 00027000
2007-01-04 15:59:41.11 spid7s * iphlpapi 76CF0000 76D09FFF 0001a000
2007-01-04 15:59:41.11 spid7s * kerberos 62220000 62277FFF 00058000
2007-01-04 15:59:41.11 spid7s * cryptdll 766E0000 766EBFFF 0000c000
2007-01-04 15:59:41.11 spid7s * schannel 76750000 76776FFF 00027000
2007-01-04 15:59:41.11 spid7s * COMRES 77010000 770D5FFF 000c6000
2007-01-04 15:59:41.11 spid7s * XOLEHLP 622E0000 622E5FFF 00006000
2007-01-04 15:59:41.11 spid7s * MSDTCPRX 622F0000 62367FFF 00078000
2007-01-04 15:59:41.11 spid7s * msvcp60 780C0000 78120FFF 00061000
2007-01-04 15:59:41.11 spid7s * MTXCLU 62370000 62388FFF 00019000
2007-01-04 15:59:41.11 spid7s * VERSION 77B90000 77B97FFF 00008000
2007-01-04 15:59:41.11 spid7s * WSOCK32 71BB0000 71BB8FFF 00009000
2007-01-04 15:59:41.11 spid7s * OLEAUT32 77D00000 77D8BFFF 0008c000
2007-01-04 15:59:41.11 spid7s * CLUSAPI 62390000 623A1FFF 00012000
2007-01-04 15:59:41.11 spid7s * RESUTILS 623B0000 623C2FFF 00013000
2007-01-04 15:59:41.11 spid7s * DNSAPI 76ED0000 76EF8FFF 00029000
2007-01-04 15:59:41.11 spid7s * winrnr 76F70000 76F76FFF 00007000
2007-01-04 15:59:41.11 spid7s * WLDAP32 76F10000 76F3DFFF 0002e000
2007-01-04 15:59:41.11 spid7s * rasadhlp 76F80000 76F84FFF 00005000
2007-01-04 15:59:41.11 spid7s * security 62800000 62803FFF 00004000
2007-01-04 15:59:41.11 spid7s * dbghelp 671B0000 672C7FFF 00118000
2007-01-04 15:59:41.11 spid7s *
2007-01-04 15:59:41.11 spid7s * Edi: 62FA0040: 62FA0028 671AFFF0 00000000 00000000 00000000 00000000
2007-01-04 15:59:41.11 spid7s * Esi: 0000001E:
2007-01-04 15:59:41.11 spid7s * Eax: 0416C05E: C0400096 C0400416 00000416 000062FA 00000000 00000000
2007-01-04 15:59:41.11 spid7s * Ebx: 0416C040: 0105F270 00002000 00000005 00000000 3368C1E0 00000000
2007-01-04 15:59:41.11 spid7s * Ecx: 0105B010: 458B0046 01F88348 00D3850F 458B0000 89C23B50 0F342444
2007-01-04 15:59:41.11 spid7s * Edx: 00000000:
2007-01-04 15:59:41.11 spid7s * Eip: 78144D3A: 24FFA5F3 144E5495 C78B9078 000003BA 04E98300 E0830C72
2007-01-04 15:59:41.11 spid7s * Ebp: 33D6E770: 33D6E790 01C65B97 62FA0040 0000001E 0416C040 0416C6DC
2007-01-04 15:59:41.11 spid7s * SegCs: 0000001B:
2007-01-04 15:59:41.11 spid7s * EFlags: 00010212: 0020006D 00690046 0065006C 005C0073 006F0043 006D006D
2007-01-04 15:59:41.11 spid7s * Esp: 33D6E768: 62FA0040 33D6E7A4 33D6E790 01C65B97 62FA0040 0000001E
2007-01-04 15:59:41.11 spid7s * SegSs: 00000023:
2007-01-04 15:59:41.11 spid7s * *******************************************************************************
2007-01-04 15:59:41.11 spid7s * -------------------------------------------------------------------------------
2007-01-04 15:59:41.11 spid7s * Short Stack Dump
2007-01-04 15:59:41.13 spid7s 78144D3A Module(MSVCR80+00014D3A)
2007-01-04 15:59:41.13 spid7s 01C65B97 Module(sqlservr+00C65B97)
2007-01-04 15:59:41.13 spid7s 01CA43B5 Module(sqlservr+00CA43B5)
2007-01-04 15:59:41.13 spid7s 01CA452E Module(sqlservr+00CA452E)
2007-01-04 15:59:41.13 spid7s 0217D3BD Module(sqlservr+0117D3BD)
2007-01-04 15:59:41.13 spid7s 0217B896 Module(sqlservr+0117B896)
2007-01-04 15:59:41.13 spid7s 0100889F Module(sqlservr+0000889F)
2007-01-04 15:59:41.13 spid7s 010089C5 Module(sqlservr+000089C5)
2007-01-04 15:59:41.13 spid7s 010086E7 Module(sqlservr+000086E7)
2007-01-04 15:59:41.13 spid7s 010D764A Module(sqlservr+000D764A)
2007-01-04 15:59:41.13 spid7s 010D7B71 Module(sqlservr+000D7B71)
2007-01-04 15:59:41.13 spid7s 010D746E Module(sqlservr+000D746E)
2007-01-04 15:59:41.13 spid7s 010D83F0 Module(sqlservr+000D83F0)
2007-01-04 15:59:41.13 spid7s 781329AA Module(MSVCR80+000029AA)
2007-01-04 15:59:41.13 spid7s 78132A36 Module(MSVCR80+00002A36)
2007-01-04 15:59:41.13 spid7s Stack Signature for the dump is 0x2BEDE9E0
2007-01-04 15:59:41.27 spid7s External dump process return code 0x20000001.
External dump process returned no errors.
2007-01-04 15:59:41.27 spid7s Error: 17185, Severity: 16, State: 1.
2007-01-04 15:59:41.27 spid7s Unable to update password policy.
2007-01-04 15:59:41.27 spid7s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
Any clues?
Cheers
Paul
View 3 Replies
View Related
Nov 21, 2004
Hello all,
I know that Oracle uses undo table spaces or rollback segments as its undo mechanism. what does Microsoft SQL Server use as its undo mechanism?
Krz
View 5 Replies
View Related
Feb 9, 2007
I'm confused how the undo works when you restore WITH STANDBY
Suppose I restore WITH STANDBY
FULL
DIFF
LOG A
LOG B
LOG C
How do I undo LOG C? Do I restore LOG B again?
View 2 Replies
View Related
Dec 9, 2007
Hello !
I have a big problem. I need to go back un changes that had been since the a specific date (beginning of november in my case).
Thanks a lot for any help on how to do this !
Regards,
Fabianus
my favorit hoster is ASPnix : www.aspnix.com !
View 6 Replies
View Related
Apr 20, 2006
Is there anyway in SQL Server to rollback an SQL statement which wasalready executed. I know there is a transaction log but what itcontains and how it works is still a mystery to me.Assuming I delete all records from a table - can I somehow undo this?
View 5 Replies
View Related
Apr 6, 2006
Environment:
Running this code on my PC via VS 2005
.Net version 2.0.50727 on the server (shown in IIS)
Code is in ASP.NET 2.0 and is a VB.NET Console application
SSIS 2005
Problem & Info:
I am bringing in an Excel file. I need to first strip out any non-detail rows such as the breaks you see with totals and what not. I should in the end have only detail rows left before I start moving them into my SQL Table. I'm not sure how to first strip this information out in SSIS specfically how down to the right component and how to actually code the component to do this based on my Excel file here: http://www.webfound.net/excelfile.xls
Then, I assume I just use a Flat File Source coponent or something to actually take the columns in the Excel and split into an OLE DB Datasource to shove each column into a corresponding column in my SQL Server Table. I have used a Flat File Source in the past to do so with a comma delimited txt file but never tried with an Excel.
Desired Help:
How to perform
1) stripping out all undesired rows
2) importing each column into sql table
View 1 Replies
View Related
Feb 19, 2008
Hi,
I have a DB running for a while, but it reached 32767 rows and stopped.. The DB is only 20MB big. Where can i ajdust this setting to a bigger number of rows?
thxs.
View 3 Replies
View Related
May 2, 2007
Without systemAdmin role, xp_AvailableMedia can still run (after granting execute permission) but just return 0 rows.
It seems we have to give the user SystemAdmin role, in order to get the list of devices in SQL 2005, while in previous versions of SQL Server, the user granted the execute permission for xp_AvailableMedia will be able to get the list of devices.
Is this be design? Is there any way the a NON-SA user can retrieve device list? If yes, what extra permissions do we have grant?
Thanks in advance for your help.
Frank
View 3 Replies
View Related
Dec 17, 1999
if we kill sp, let's say, on the third statement, will the first two
be rolled back (undo) ?
View 1 Replies
View Related
Apr 9, 2008
How come Undo button does not work? Thanks.
View 2 Replies
View Related
Jan 17, 2014
I have update a table field and I like to know how do you "undo" the update? I set the field_length from 6 to 7 and like to undo this.Here is my command:
table = template_fileds
column= field_length.
filed name= field_name.
update template_fields set field_length='7' where field_name='assesscode9'
View 7 Replies
View Related
Dec 2, 2005
Muhammad Qasim writes "i hav query that i was just taking the backup of the database n by mistake i just clicked restore as the wizards are similar so i just restored the database to 10days old backup n now i have no latest backup so how can i just undo this restore if u hav any idea of how to overcome this plz reply as early possible lookin for replies"
View 4 Replies
View Related
Aug 30, 2005
Hello,Somebody accidently deleted a record with cascade deletesand took out about 80 records.The database has been used heavily since then.How do I put back the data?I have spent hours researching BOL and all I can findis how to restore the database to a point in time.But that will lose all the work done after the mistake.(We do a full backup every week and log backup every day)Is there a standard way to do this?Morgan
View 2 Replies
View Related
Nov 29, 2007
Hi
Can somebody advice me on this:
I am trying to update a row, which is being pulled from another table.
i.e., I have two tables T1 and T2
I am getting a row from T2 and inserting it in T1
then I am updating that row in T1
What i want is if in case these is an error while updating this row I want to remove the row from T1
T1 and T2 are same.
declare @err1 int
--BEGIN TRANSACTION
INSERT INTO dbo.T1 SELECT * FROM dbo.T2 WHERE UpdateFlag = 'Y' AND ID = '12345'
BEGIN TRY
UPDATE dbo.T1 set ReportDate= '9910-12-2006'
SET @Err1 = @@error
END TRY
BEGIN CATCH
insert into errorlog values (error_message())
END CATCH
--if @err1<>0
--begin
--Rollback transaction
--end
This work fine but I am not able to roll back the transaction
When I activate the codes fro roll back, it not performing the Logging operation in CATCH also terminating
REQUIREMENT
1) Get the record in T1 from T2
2) Update the record in T1
3) IF step:3 good commit it, else remove the only the row which was pulled from T2. It must do this also log in dbo.ErrorLog the errored system message error_message()
Thanks a lot in advance
View 3 Replies
View Related
Oct 11, 2006
Hi ,
I was working in the SSIS designer and when I found that the DataFlow task I deleted was indeed something I needed, I tried to Undo the operation but Alas the option is not enabled :(
Is there a way we can undo the operations?
View 1 Replies
View Related