Does The Undo Operation Work ?
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
ADVERTISEMENT
Nov 20, 2013
I'm using SQL Server 2012 Analysis services in Tabular mode and connected to Oracle Database and while importing, I'm getting below error after importing some rows.
OLE DB or ODBC error: Accessor is not a parameter accessor.. The current operation was cancelled because another operation in the transaction failed.
View 1 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
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
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
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
Apr 2, 2008
I often run queries in Query analyzer. Today I accidentaly deleted some data from a table. Is their a way to undo the last SQL command executed?I have heard of the rollback command, but I don't know if that is applicable or not?
View 6 Replies
View Related
Nov 28, 2007
I have full Recovery mode.
I just accidently deleted a handful of records out of a table about 10 minutes ago. My last backup was last night.
Can I go back 10 minutes ago for a specific table? If so how... DO I need to backup now, then use the trans-logs to recover up to a specific point?
Thanks!!
View 15 Replies
View Related
Oct 21, 2015
USE [master]
RESTORE DATABASE [EmployeeRecovered] FROM DISK = N'D:BackupsNormalEmployeeFULL.BAK' WITH FILE = 1,
MOVE N'Employee' TO N'D:MSSQLDATAEmployeeRecovered1.mdf',
MOVE N'Employee_log' TO N'D:MSSQLLOGEmployeeRecovered1_log.ldf',
NOUNLOAD, STATS = 5, NORECOVERY
[Code] ....
Now I realze the recovery point is somewhere in TranBackup2.trn and need to go back to the state where only TranBackup1.trn is applied. How can i do this ?
View 4 Replies
View Related
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
View Related
Sep 17, 2007
Hi,
I am in a process of designing a web application (ASP.NET) which is mostly data driven. The application needs to provide an undo functionality to users for eg. Undo an Add, Update or Delete that has been already committed to the database.
We are using SQL Server 2005 at back end. What I need to know is how will I enable this feature at database level. I am sure we might have to play with triggers but that too might not help in achieving the UNDO functionality. If anyone can shed light on how to achieve this, it will be quite helpful. Thanks
View 7 Replies
View Related
Dec 18, 2014
1. A few months ago, I received a request to deny delete to a group (Windows AD login) against 3 databases. So I issued a DENY DELETE to the relevant Windows login.
2. Now, someone is having trouble updating data. The issue seems to be that a trigger fires during the update. In the trigger the code tries to delete from a table in the previously delete-denied databases. So the update fails.
-- In retrospect, perhaps I should have used REVOKE - not sure
-- Also, I can't seem to find a listing of the DENY permissions - or rather, how to list what permissions are denied. I guess maybe that is a hard thing to do if the result of a DENY is to leave certain permission columns NULL (vs adding 'DENY'). But it would be useful for me to see what the current permission state is.
-- Finally, I tried to undo the DENY without success. Here is my attempt.
a. I tried GRANT DELETE... - no luck
b. Then I saw an article explaining to use REVOKE, so I tried 'REVOKE DELETE' followed by 'GRANT DELETE' - still no luck.
View 3 Replies
View Related
Aug 7, 2015
I have a table with 1 million records. I want to update only 400 records. The update statement is provided by a 3rd party vendor. Once i run the update statement it will update all the 400 records. Once the table is updated the users will validate the table
if the update is successful or not. What i'm looking for is:
1) Is there a way to identify what records were updated.
2) If the update done is not what the users wanted i need to undo and bring back the 400 records to their previous values.
I'm on sql server 2008.
View 34 Replies
View Related
Jun 18, 2015
I received an alert from one of my two secondary servers (all servers are running 2012 SP1):
File 'E:SQLMS SQL ServerMSSQL11.MSSQLSERVERMSSQLDATAMyDatabaseName_DateTime.tuf' is not a valid undo file for database 'MyDatabaseName (database ID 8). Verify the file path, and specify the correct file.
The detail in the job step shows this additional information:
*** Error: Could not apply log backup file 'MyDatabaseName_DateTime.trn' to secondary database 'MyDatabaseName'.(Microsoft.SqlServer.Management.LogShipping) ***
*** Error: Table error: Page (0:0). Test (m_headerVersion == HEADER_7_0) failed. Values are 0 and 1.
Table error: Page (0:0). Test ((m_type >= DATA_PAGE && m_type <= UNDOFILE_HEADER_PAGE) || (m_type == UNKNOWN_PAGE && level == BASIC_HEADER)) failed. Values are 0 and 0.
Table error: Page (0:0). Test (m_freeData >= PageHeaderOverhead () && m_freeData <= (UINT)PAGESIZE - m_slotCnt * sizeof (Slot)) failed. Values are 0 and 8192.
Starting a few minutes later, the Agent Job named LSRestore_MyServerName_MyDatabaseName fails every time it runs. The generated log backup, copy, and restore jobs run every 15 minutes.
I fixed the immediate problem by running a copy-only full backup on the primary, deleting the database on the secondary and restoring the new backup on the secondary with NORECOVERY. The restore job now succeeds and all seems fine. The secondaries only exists for DR purposes - no one runs reports against them or uses them at all. I had a similar problem last weekend on a different database that is also replicated between the same servers. I've been here for over a year, and these are the first instances of this problem that I've seen. However, I've now seen it twice in a week on the same server.
View 0 Replies
View Related
Sep 15, 1998
I accidentaly deleted data from the wrong table. Is there a way to un-delete what I had deleted.
need help ASAP.
Regards,
Steve
View 5 Replies
View Related
Aug 2, 2000
I am running SQL Server 7. I have an user that need to run the Set Identity On a table, and he gets an error message:
Server: Msg 8104. The current user is not the database or object owner of table 'tpartners'. Cannot perform SET operation.
I can grant this user with DBO user role, then he can edit anyting on the database.
Is there a work around that he can run the Set cmd and I don't need to grant him the DBO user role?
View 4 Replies
View Related
Jul 20, 2005
HiI have a database with full recovery model.Every night at 11.00pm performs full backup, and dayly every 3 hoursperforms differential backup, and trasnactional log backup performsevery 15 minutes during a day.I am interested what operations i can not recover from log ordifferential backup.I saw that when i drop table i can recover it from log backup, but isthere some operation that can not be recoverThanks a lotAlex*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
View 1 Replies
View Related
Apr 6, 2007
Dear friends, I was not able to find any perfect toolbox item to use "not in" operation on my selected columns, also how can we use multiple join conditions in the merge join item? Thanks,
View 1 Replies
View Related
Jan 18, 2008
Why do I get the message "Operation can't be completed?" when I try to save a stored procedure!!! When I create a new stored procedure and copy the code into it it works fine!
View 2 Replies
View Related
Jan 18, 2003
I have a sp that creates a #temp table and performs a bulk insert.
CREATE TABLE #template (template varchar(8000))
EXEC ('bulk INSERT #template FROM "' + @filename + '"')
SET @html = (SELECT template FROM #template)
DROP TABLE #template
...
When I access this sp with any other user than 'sa' I get this error message:
The current user is not the database or object owner of table '#template'. Cannot perform SET operation.
I've been everywhere (with no success) in the sql srv admin to look for the appropriate check box to allow another named user to access this sp.
Can anyone help?
View 2 Replies
View Related
Jun 4, 2001
On SQL 2k, How can I set my DTS package, which imports a 3 million row .TXT file to a table, as a NON-LOGGED operation?
(LOGGING is taking tooooo long!! I will be sure to run a full DB backup when the job completes.)
thx-
BT
View 1 Replies
View Related
Jun 19, 2006
If tables are in relation (foreign key), then how should one proceed for deletion of a record from a master table?
how will the database itself tackle the problem? What should be done from the front end for this?
please help.......I urgently require a solution for this.
View 1 Replies
View Related
Sep 6, 2006
I was looking into some of the System stored procedures like sp_denylogin, sp_grantLogin etc. I found bit wise operations like
update master.dbo.sysxlogins set xstatus = (xstatus & ~1) | 2, xdate2 = getdate()
where name = @loginame and srvid IS NULL
How does the bitwise NOT(~) works with different datatypes like INT, SMALLINT and TINYINT?
Look at the following sample code and result. I just wanted to understand how it works with int and smallint
declare @a int
declare @b smallint
declare @c tinyint
select @a = 1, @b = 1, @c = 1
select @a=~@a, @b= ~@b, @c= ~@c
select @a, @b, @c
Result
~~~~~
-2-2254
Thanks in advance
Gnana
View 3 Replies
View Related
Feb 18, 2004
hello,
I have a problem where I am calling the BCP utility to write a table to a file. I then need to delete the rows of the table. but not all of them. This all works fine. I've been asked to place this into a transaction..incase a piece fails. When I do that...SQL server hangs. I must shutdown SQL Server.
Any idea why that would happen. I am using the xp_cmdshell stored procedure to invoke bcp utility within a stored procdure. The procedure is executed every 15 minutes to provide files to an outboard system.
Salik.
View 6 Replies
View Related
Apr 14, 2008
IDENTITY_INSERT is already ON for table 'Elbalazo.dbo.DeliveryOption'. Cannot perform SET operation for table 'City'
Here's my entire script:
--------------------------------------------------------------------
/*Disable Constraints & Triggers*/
exec sp_MSforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'
exec sp_MSforeachtable 'ALTER TABLE ? DISABLE TRIGGER ALL'
/*Perform delete operation on all table for cleanup*/
exec sp_MSforeachtable 'DELETE ?'
/*Enable Constraints & Triggers again*/
--exec sp_MSforeachtable 'ALTER TABLE ? CHECK CONSTRAINT ALL'
exec sp_MSforeachtable 'ALTER TABLE ? ENABLE TRIGGER ALL'
/*Reset Identity on tables with identity column*/
exec sp_MSforeachtable 'IF OBJECTPROPERTY(OBJECT_ID(''?''), ''TableHasIdentity'') = 1 BEGIN DBCC CHECKIDENT (''?'',RESEED,0) END'
-- City
SET IDENTITY_INSERT City ON
INSERT INTO Elbalazo.dbo.City (
[CityID]
,[CityName]
,[CountyID]
,[Active])
SELECT [CityID],[CityName],[CountyID],1
FROM [ElbalazoProduction].dbo.tbl_City
SET IDENTITY_INSERT City OFF
-- State
SET IDENTITY_INSERT [State] ON
INSERT INTO Elbalazo.dbo.State (
[StateID]
,[State]
,[Active])
SELECT [StateID],[State],1
FROM [ElbalazoProduction].dbo.tbl_State
SET IDENTITY_INSERT [State] OFF
-- NumberOfPeopleOption
SET IDENTITY_INSERT NumberOfPeopleOption ON
INSERT INTO [Elbalazo].[dbo].[NumberOfPeopleOption]
([NumberOfPeopleOptionID]
,[NumberOfPeopleNameOption]
,[Active])
SELECT [NumberOfPeopleID], [NumberOfPeopleName],1
FROM [ElbalazoProduction].dbo.tbl_NumberOfPeople
SET IDENTITY_INSERT NumberOfPeopleOption OFF
-- DeliveryOption
SET IDENTITY_INSERT DeliveryOption ON
INSERT INTO [Elbalazo].[dbo].[DeliveryOption]
([DeliveryOptionID]
,[DeliveryOptionName]
,[Active])
SELECT [DeliveryOptionID], [DeliveryOptionName],1
FROM [ElbalazoProduction].dbo.tbl_DeliveryOption
SET IDENTITY_INSERT DeliveryOption OFF
-- User
SET IDENTITY_INSERT [User] ON
INSERT INTO [Elbalazo].[dbo].[User]
([UserID]
,[FirstName]
,[LastName]
,[Address1]
,[Address2]
,[CityID]
,[StateID]
,[Zip]
,[PhoneAreaCode]
,[PhonePrefix]
,[PhoneSuffix]
,[Email]
,[CreateDate]
,[Active])
SELECT [CustomerID]
,[FirstName]
,[LastName]
,[AddressLine1]
,NULL
,[CityID]
,[StateID]
,[Zip]
,[PhoneAreaCode]
,[PhonePrefix]
,[PhoneSuffix]
,[EmailPrefix] + '@' + [EmailSuffix]
,[CreateDate]
,1
FROM [ElbalazoProduction].dbo.tbl_Customer
SET IDENTITY_INSERT [User] OFF
-- EntreeOption
SET IDENTITY_INSERT EntreeOption ON
INSERT INTO [Elbalazo].[dbo].[EntreeOption]
([EntreeOptionID]
,[EntreeOptionName]
,[Active])
SELECT [EntreeOptionID]
,[EntreeOptionName]
,1
FROM [ElbalazoProduction].dbo.tbl_EntreeOption
SET IDENTITY_INSERT EntreeOption OFF
-- CateringOrder
SET IDENTITY_INSERT CateringOrder ON
INSERT INTO [Elbalazo].[dbo].[CateringOrder]
([CateringOrderID]
,[UserID]
,[NumberOfPeopleID]
,[BeanOptionID]
,[TortillaOptionID]
,[CreateDate]
,[Notes]
,[EventDate]
,[DeliveryOptionID])
SELECT [CateringOrderID]
,[CustomerID]
,[NumberOfPeopleID]
,[BeanOptionID]
,[TortillaOptionID]
,[CreateDate]
,[Notes]
,[EventDate]
,[DeliveryOptionID]
FROM [ElbalazoProduction].dbo.tbl_CateringOrder
SET IDENTITY_INSERT CateringOrder OFF
-- CateringOrder_EntreeItem
SET IDENTITY_INSERT CateringOrderEntreeItem ON
INSERT INTO [Elbalazo].[dbo].[CateringOrderEntreeItem]
([CateringOrderEntreeItemID]
,[CateringOrderID]
,[EntreeItemID])
SELECT [CateringORder_EntreeItemID]
,[CateringOrderID]
,[EntreeItemID]
FROM [ElbalazoProduction].dbo.tbl_CateringOrder_EntreeItem
SET IDENTITY_INSERT CateringOrderEntreeItem OFF
select * from BeanOption
select * from CateringItemIncluded
select * from CateringOrder
select * from CateringOrderEntreeItem
select * from CateringOrderEntrees
select * from City
select * from Country
select * from DeliveryOption
select * from EntreeOption
select * from NumberOfPeopleOption
select * from [State]
select * from [User]
View 15 Replies
View Related
Dec 14, 2007
Can anybody explain whether Delete and Truncate are Logged Operations?
On some site, I came accross Truncate is not Logged Operation, on some site, Truncate is Logged Operation.
Can anybody explain, what exactly it is?
Thanks in advance,
Mahesh
View 2 Replies
View Related