How To If Needed Recover From Mistake
May 16, 2007
Hi.
I deleted a stored procedure (one I had written) out of the master database. I
thought I had accidentally put it there, then I got to thinking.. what if it
is normally reflected there, and maybe I should not of deleted it.
So.. my question.. is it normal for procedures in other databases to be
reflected also in the master database, and then how can I restore / recover
the master database if necessary.
I am using sql server 2005 on XP pro.
thanks for the advice
Jeff Kish
View 3 Replies
ADVERTISEMENT
Mar 10, 2008
Can I restore records from a MSDE2000 Database
I copied some stored procedure from other database but unfortunately, I drop all records
I have checked the Transaction Log which is only 1024 KB
I have used Red Gate Log Resure but cannot find the log
Anyone can Help!!!!!
Thanks
View 4 Replies
View Related
Jun 25, 2004
Please Help!
What is wrong with this procedure!
Why it doesn't sum the fields Obshta_suma and Pay
Why it doesn't return @Obshta_suma and @PayCREATE PROCEDURE dbo.Nalichni
@Date1 varchar(12),
@Date2 varchar(12),
@Obshta_Suma decimal output,
@Pay decimal output,
@prmO_PKO bit output,--boolean 0-false, 1-true
@prmO_RKO bit output--boolean 0-false, 1-true
AS
set @prmO_PKO = 0
set @prmO_RKO=0
if exists(Select Obshta_suma from PKO where Obshta_suma<>Null and (Vnos_Data >= @Date1) and (Vnos_Data <=@Date2))
begin
set @prmO_PKO=1
Select @Obshta_Suma=sum(Obshta_Suma) from PKO where (Vnos_Data >= @Date1) and (Vnos_Data <=@Date2)
end
if exists(Select Data,Pay from RKO where Pay<>Null and ( Data >= @Date1 and Data <=@Date2))
begin
set @prmO_RKO=1
Select @Pay= sum(Pay) from RKO where( Data >= @Date1) and( Data <=@Date2)
end
GO
View 1 Replies
View Related
Apr 1, 2008
I am trying to create a new table containing a subset in an existing table using SELECT INTO, but I get the error:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'MyDb.MyDestSchema.MyDestTable'.
What am I doing wrong? Here's the SQL statement:
SELECT t2.* INTO [MyDb].[MyDestSchema].[MyDestTable]
FROM [MyDb].[MySrcSchema].[MySrcTable] t2
LEFT JOIN [MyDb].[MyDestSchema].[MyDestTable] t1
ON t2.[DateTime] = t1.[DateTime]
WHERE (t1.[DateTime] IS NULL) AND
(convert(varchar, t2.[DateTime],126) BETWEEN '2006-11-01T08:30:00' AND '2006-12-31T15:30:00') AND
(convert(varchar, t2.[DateTime],114) BETWEEN '2006-11-01T08:30:00' AND '2006-12-31T15:30:00')
ORDER BY t1.[DateTime];
View 5 Replies
View Related
Feb 18, 2006
I have an excercise:
SET @UserID = @@ROWCOUNT
it is said that there is mistake, nad to complete it there i no need of knowledge mssql? So where is mistake?
View 6 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
Sep 24, 2006
With out any BEGIN Transaction statement , i ran a update query.
I had to update just one record using the "Where field='abc'"
But i happened to miss that. Is there any chance of recovery? can i use the transaction logs to bring back the records before the update?
A quick answer is appreciated.
Sahel
View 1 Replies
View Related
Aug 29, 2002
I have a correction to my previous thread all values are '83' not '80' My mistake
Message as it should be:
am new to SQL.
MY issue: Table (A) has the customerID field as a primary key. Table(b) has a customerID field but isn't the primary key. I am selecting all records from Table(A) and Table(B) Where Table(A).customerID=83 AND Table(B).customerID=83.
Table(A) has the customerID '83' Table(B) doesn't. The int 83 doesn't exist in table(B)
The various joins I constructed always returns (0 row(s) affected). When I enter a value that is inboth tables I get the desired result.
MY Goal:
I would like one record returned from table(A) if the customerID is not present in table(B) and one record that has a single customerID in both table(A)and Table(B)
Please advise.
Thanks
View 1 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
May 2, 2008
Hi,
I accidentally unclicked the check-boxes for group-header and group footer - I meant to leave the group header in. Now, I can't get to the group to edit it! Is there any way I can get back to it?
View 1 Replies
View Related
Sep 21, 2006
I €˜d like to discus with you the following REAL enough disaster scenario:
1. The TEST database is in the FULL backup mode.
2. WE have a full TEST DB backup and all tr. log backups.
3. DBA moved TEST database OFFLINE for maintenance operations.
4. MDF file for TEST DB was removed by mistake.
5. TRANSACTION LOG (LDF) file is OK.
6. DBA want to recover database to the point of failure.
According with MS SQL Server 2000 documentation it is possible.
We need to backup the transaction log , BUT I CANNOT DO THIS.
PLEASE, HELP.
In the same time, I can make LDF backup and recover database to the point of failure, if database is online and I stop/start SQL Server to remove MDF file.
View 4 Replies
View Related
Jun 30, 2006
I want to use SSB as a mean to thread multiple SP invocation of the same procedure.
When I launched the initator processes it created in the transmission queue error messages saying for each of them that it is an invalid target service name.
The view (sys.transmission_queue) records them in this way in the status column:
"The target service name could not be found. Ensure that the service name is specified correctly and/or the routing information has been supplied."
Services and queues and activation procedure are all defined into the same database.
I drop services and queues, and i tried to create a service with the initial wrong name. Nothing happened.
Thanks vour your help
View 5 Replies
View Related
Feb 2, 2007
Is there a way to recover the database without defining a device to restore from?
Restore Database TestDB With Recovery
MTmace
View 4 Replies
View Related
Feb 1, 2008
Hi,
By mistake i've damaged my .mdf file and i have no backup on this database . However i have the transaction log intact and an older version of the database .
Is it possible to recover the database using the transaction log? How can it be done?
I do not have the transaction log backup, just the .ldf file.
Thanks to anyone who can help me.
View 6 Replies
View Related
Feb 27, 2000
How do I begin? I had previously installed the SQL Server 7.0 with NT Authentication and everything was fine until I Rename domain Name and Computer name. I decided to uninstall SQL Server, and then reinstall it.
From this action unable to see my database in enterprise manager. I Rename old domain and computer name again. and reinstall with Upgrade Version. but still same effect. Can anyone help? What do I need to do to get my database to work again? Any input on this will be appreciated. Thanks in advance.
View 1 Replies
View Related
Aug 25, 2004
I had MS SQL installed on my comp.I had to reformat my hard drive due to some problems.There was a db in the sql server which i needed.So i saved the .mdf & .sdf files.Then i installed sql server in the formatted hard drive & pasted the .mdf & .ldf files in the Data forlder in MSSQL folder.But the problem is that even after doing this the enterprise manager doesnt show that database.Can anyone help me with this?Is there any way to recover the database?
Thanks a lot
P.S.- I also have whole of the earlier MSSQL folder present in the earlier program files backed up.Would that help in anyway.
View 3 Replies
View Related
Aug 5, 2004
Hello, everyone:
A guy think that the DTS packages can be recoved by restore MSDB database. Is that true? Does anyone have experience on that? Thanks.
ZYT
View 2 Replies
View Related
Nov 23, 2004
Hi
I've had a powerfailure, that resulted in I had to scratch my DB server, I've managed to get all the .mdf and .ldf files from the server. On the new server I get a "Error 823: I/O error (torn page)" when I'm trying to attach the .mdf file to the New server.
Both the new and the old server is a win2003 with SQL 2000 SP3
Is there anybody who knows how I can recover the DB?
/Rune
View 1 Replies
View Related
Oct 6, 2005
Hello,
Is it possible to restore a SQL 2000 database with data from a transaction log?
I am not sure what happened to my database, all the data in the tables is gone. I generated a db script to create a duplicate database. I saved the .sql file on my local machine, separate from the db server, renamed the database name in the .sql file to a new database. Tested script in query analyzer for syntax, all was fine. Running it at this point would have created a new database with a different name, right?
Now my original database is empty. Can someone please provide me with information on getting my data back. Is there a way of using the transaction log to recover the data.
Thanks
View 2 Replies
View Related
Jan 30, 2004
I have changed the roles of primary and secondary servers due to server failure.
Can anyone advise how to revert back to previous main server? Are these any links available?
View 2 Replies
View Related
May 3, 2004
Hi
I need help to recover database from its MDF & ldf files as my server crahsed today .
BTW i installed afresh copy of MS SQL 7.0
I need to be able to restore the database. Pls reply if
you can help. It would be greatly appreciated.
:( :confused:
View 1 Replies
View Related
May 9, 2011
is there any way to recover a database? I accidently drop my database .I don't have any backup.
View 5 Replies
View Related
Aug 5, 2005
Paul,
Having read your useful insight into the sorts of issues around the corruptions that folk have posted in this forum I'm interested in preparing for the day when one of our servers gets corrupted :-(
Should I expect to be able to:
Restore FULL backup from Before the corruption first happened
Restore all Tranaction log backups since
and would get me back to ground zero?
I'm thinking:
if I do a DBCC CHECKDB once a week, say, immediately after a FULL backup - then if that gives me some error messages I've got last weeks Full backup and a weeks worth of Trans Log Backups to restore - which is OK for a rare disaster.
I apprecaite that the thing that caused the corruption might be a memory or disk fault, which might also have broken the creation of the backup files too - in which case I'm fairly stuffed!
Does a RESTORE do a checksum of somesort that would detect a corruption caused by, say, a memory fault or a disk controller that wrote the block faultily [twiddled some bits, but did not report error]?
In which case continuous restores of backup files to A.N.Other server would discover the moment at which a backup was "known bad"
Am I close?
Thanks
Kristen
View 9 Replies
View Related
Feb 2, 2006
I am using sql server7.0
I want to know how to recover pubs and northwind data bases in case they are deleted.
Gajanan Kulkarni
View 2 Replies
View Related
Jun 22, 2006
raju writes "while attaching the mdf file we are getting the following error
error 823
i/o error (bad page id) detected during read at offset
0x0000001404000 in file d:filename"
View 4 Replies
View Related
Mar 9, 2007
OS: Windows 2003 Standard Edition
MS SQL: Standard Server 2005
I am looking to implement a disaster recovery plan for an MS SQL 2005 server, this is what I have done so far but would like the benefit of your experience to provide feedback and help improve the strategy.
MS SQL Server:
I have two maintenance plans, one to backup the system databases to individual backup files (.bak) and one to backup all the user databases to a backup device (mssql_backup) The backup files & device are in a directory (backup) and is backed up using NFS. I keep a copy of the backups on a USB HD which is stored offsite.
Disaster:
Office burnt down
Recovery:
New server, install OS/MSSQL, patch up to same version as burnt server.
Copy .bak files to new server, copy mssql_backup file to same location as previously held i.e. X:ackupmssql_backup
Start MS SQL in single user mode, restore master database using .bak.
Start MS SQL in normal mode, restore other system databases using .bak
Restore user databases using mssql_backup device
Testing:
Using the above steps I was able to restore up to the point of "user databases" Getting to this point I realised that there are a number of databases to restore, in my novice ways this seems to be a lot of right-clicking and restoring.
1) is there a command that would in effect be able to restore all databases using the backup device?
2) do I have a working version of the databases to the point of the last backup? Or am I missing something?
3) in my current setup in mind (SQL backup to NFS directory and picked up my backup software) is there a 'better' way I could be doing this which would make the restoration procedure more efficient
View 4 Replies
View Related
Mar 28, 2007
how can i recover sqlserver 6.5 datbase from tape.
pls help me?
View 1 Replies
View Related
Jul 23, 2007
Hi all,
Is it possible to recover or find the password of database or resetting is the only option? I have a database that has a two users in the Users tab. How to find out the password for these?
Thanks,
View 4 Replies
View Related
Feb 1, 2008
Hi,
By mistake i've damaged my .mdf file and i have no backup on this database . However i have the transaction log intact and an older version of the database .
Is it possible to recover the database using the transaction log? How can it be done?
Thanks to anyone who can help me.
View 3 Replies
View Related
May 13, 2008
Hi,
Some times my laptop will hang for some reason and i will have open few sql 2005 query editors working with scripts. I am loosing them if i restart my system. Is there any way to recover the previous instance of my sql 2005 query editors after restarting my system. Please let me know if yo have any idea to handle.
Thanks
Dilip
View 4 Replies
View Related
Jun 3, 2004
Hi All,
Accidentally I have dropped a table and that is the main table for my application.
I dont have a backup of it. Is there any way to recover it.Please help me guys.
Thanks,
Kumar.
View 1 Replies
View Related
Apr 16, 2002
Hello,
I have some procedure in SQL Server 7.3 they are
working fine. Now my SQL Server is not working that is
it not opening Query Analizer or any other tool
in SQL Server ok.
I have no back of my procedures which are written
in SQL Server any where like in notepad or in some
places.
Now i have a plan to load Sql server again
but i want my old procedures before loading
Sql Server again.
How to do it?
How to restore my procedures?
Where actually SQL Server stores these procedures?
I searched in my system with my procedure name but it
shows nothing with those names.
In my case there is no chance of recovering my old SQL Server
i have load again SQL Server.
So kindly help on this issue asap.
thanks
View 4 Replies
View Related