HELP!!! I Dropped A Few Tables By Accident.
Aug 5, 2002
I was doing a DTS import and accidently imported into the wrong database, dropping very critical tables. Please let me know how I can restore these transaction back. My last backup was 24 hours ago, and I just need to restore a few hours back.
Thanks,
KJ
View 1 Replies
ADVERTISEMENT
Dec 28, 2007
If a stored procedure creates a temporary table and then has a batch-terminating error -- either a fatal error or a non-fatal error in "xact_abort on" mode -- the temp table does not get dropped even though it goes out of scope:
create proc px as
create table #z(z1 int primary key)
insert #z values ('x')
go
exec px
go
select * from tempdb.sys.tables where name like '#z%' --returns row for #z
drop table #z --fails because #z out of scope
or:
create proc px as
set xact_abort on
create table #z(z1 int primary key)
insert #z values (0)
insert #z values (0)
go
exec px
go
select * from tempdb.sys.tables where name like '#z%' --returns row for #z
drop table #z --fails because #z out of scope
Is this behavior by design? It does not appear to be documented properly if so, since BOL states that "Temporary tables are automatically dropped when they go out of scope".
In any case, is there a way to delete leftover temp tables from tempdb without restarting SQL Server?
Thanks,
Ron
View 2 Replies
View Related
Aug 29, 2006
Hey guys, has anyone ever seen this happen:
Try to move stored proc from one DB to another using DTS, errors on create proc. Create proc manually.
Three tables referenced by that stored proc have been dropped and re-created with the same table structure.
I'm not 100% certain that it happened at exactly the same time, but it seems to be around the same time. Any ideas? Anyone seen this happen before?
View 3 Replies
View Related
Jan 21, 2008
HI friends,
i have deleted the 'sysobjects' table by accident. then follows the problem.
1. default value constraint not working
2. auto increment constraint not working
is that because of this sysobjects problem.
help me out to fix this problem...
hav fun, njoy
sundaram
View 16 Replies
View Related
Apr 10, 2007
Hi all,
I have created several global temp tables to cache some intermediate results ...
However, it seems that after a while those tables will be dropped by SQL Server 2005 automatically (I have not restarted the server and no drop table statement ever executed against those tables). Is this a feature by design? How to make those global temp tables persistence to next service restart?
Thanks,
Ning
View 5 Replies
View Related
Mar 24, 2004
Is it possible at all to remove the SA login or deny "System Administrator" from it by loggin as another user who has sa previledges
thanks
View 1 Replies
View Related
Jan 25, 2001
I am helping another division with a problem of a dropped table. They have no backup and after dropping the table, the server has been re-booted 3 times. Is there a way to recover the table with no backup?
Help anyone,
Thank you.
View 2 Replies
View Related
Apr 6, 1999
Here's a poser.
I run a VB application to import data from a text file into a SQL 6.5 database. Typically, there'll be 300,000 records, all of which have to be processed. Time taken will be in excess of 2 hours.
When the application finishes, I try to go into Enterprise Manager and run a Select Count(*) to verify that the data's been imported. Invariably, I get an error reading:
"A connection could not be established to <server> - [SQL Server] Could not allocate a new object descriptor for required system catalog in database '1'. Another database must be closed or objects in another database dropped in order to open this database."
I get the same error whether I try to view Current Activity, open the Query Tool or simply expand the server in the Server Manager area.
Usually, it means I have to re-boot the server, which is not popular with other users. Does anybody know what's causing this and what might be the solution?
Thanks.
View 1 Replies
View Related
Apr 17, 2007
I believe I deleted a maintenance plan that was attached to a job and therefore have received the following message:
Drop failed for Job 'Shrink DSS Database.Subplan_1'. (Microsoft.SqlServer.Smo)
An execption occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlSserver.connectionInfo)
The DELETE statement conflicted with the REFERENCE constraint "FK_subplan_job_id". The conflict occurred in database "msdb", table "dbo.sysmaintplan_subplans", column 'job_id'.
The statement has been terminated. (Microsoft SQL Server, Error: 547)
Is there a T-SQL or other means I can use to remove this constraint and delete the job show it does not show up in SQL Server Management Studio any longer?
View 5 Replies
View Related
Jan 16, 2007
Somebody has dropped my SQL table in (multiuser environment),now I want
to know who has done that. Is there any way by which I can retrieve
that(user name or machine name)?
I am using SQL 2005.
View 3 Replies
View Related
Feb 25, 2004
I'm trying to drop a table onto the design view in Web Matrix and the following message appears: "dropped table does not have a primary key and cannot be used".
I'm using a SQL 2000 database that was previously an MSDE 2000 database. Is there anyway that I can define a column as a primary key?
Thanks.
View 5 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 2, 2001
Hi
ONLY ONE of our many stored procedure is getting dropped in SQL 7.0. We were not able to find thru SQL Profiler. Let me know any alternate methods to find it or the possible reasons why/how the sp is getting dropped.
Thanks
View 1 Replies
View Related
Nov 30, 2000
Hello,
I have the following problem that I need to find a solution. I have created a generic user id and login in the model datbase on SQL 7. However the genericuser does not show in the explorer window for some databases, does not work on some databases. I have to go into TSQL and use dropuser to get rid off them and re-link them again.
Does any1 have a clue about why this happening? How it can be solved?
TIA Gurmi
View 1 Replies
View Related
Mar 2, 2005
Hi..I just restored a databae from backup. After restoring, as usual, from the Enterprises manager, I want to delete the database user and readd again from the DB login name. But when I tried to delete the DB user, it prompts me the following.
"the selected user cannot be dropped because the user owns objects"
why? I never encountered this b4 ? I restored DB again but problem still the same. Any ideas?
View 2 Replies
View Related
Dec 9, 2011
Unfortunately I dropped my table in sqlserver. How to I recover that table?
View 3 Replies
View Related
Mar 19, 2015
After installing a Zen Cart plugin I was getting errors that there was a duplicate entry for the mysql table so I went in and dropped the table assuming that it would come back when I re - installed everything, anyways I have the PHP code that created the table but not sure how to recreate it or if that's even possible. Also my main way to get to change anything is phpMyAdmin, I tried importing the code there but that didn't work.
View 2 Replies
View Related
Sep 21, 2006
I am in a big trouble ,
accidently i have issued a DROP DATABASE XXX command in the sql client, thinking its a local server....... The whole 4 months of database database is now dropped.
Please help me , how can i recover the database ....
thanks in advance
View 1 Replies
View Related
Mar 28, 2007
Hi,
In my local instance of SQL Server at work (which I use for testing), somehow all of the logins except 2 were dropped. The administrators group no longer exists as a login (nor do any other windows users or groups)-the only 2 remaining are sa (which is disabled) and a SQL login I had created earlier which has no permissions except read permission on master. I can login as this SQL user, but I do not have permissions to create logins or enable the sa account. Do I have any options other than uninstalling and reinstalling my local instance?
Thanks,
-Dave
View 5 Replies
View Related
Feb 7, 2007
I am testing sql server 2005 in different disaster situations happened under 2000. I was reading a lot about no update on system tables, so:
sp_detach_db 'tempdb'
In sql 2000 i could issue something like the following command to recover:
use master
sp_configure 'allow updates', 1
reconfigure with override
go
insert sys.sysdatabases (name, dbid, sid, mode, status, status2, crdate, reserved, category, cmptlevel, filename, version)
values ('tempdb', 2, 0x01, 0, 8, 1090520064, '2007-01-27 13:03:10.873', '1900-01-01 00:00:00.000', 0, '90', 'D:eepmssql emp empdb.mdf', 611)
go
sp_configure 'allow updates', 0
reconfigure with override
go
As tempdb is hardcoded db id 2, I do not have a chance to recover without a master backup.
Of course, this situation can be recovered using a master backup, but it is not always available.
Thank you for your comments.
View 9 Replies
View Related
Nov 24, 2000
Hello,
I'm in trouble, I have just dropped a table from a sql dbase and now need to recreate it. I have no backup and I am panicking!!! I need to know if I can recrreate them .
Any and all help appreciated
DVNC
View 1 Replies
View Related
Apr 30, 2001
Hi there,
I installed 2 SQL2000 servers at a client site, the first acting as a publisher and distributor for transactional replication. The second is a push subscription to the first. The client wanted to change the database name, and some other stuff, so I removed the replication and set it up again for the new database name.
All's fine at the publisher / distributor but the subscriber is showing as still having active push subscription to the old (and new) databases
Any idea how to fix this
View 2 Replies
View Related
Jan 25, 2013
My sql server is setup to use windows authentication. From time to time one of the applications on that server would have issues connecting to that server. I changed it to use sql authentication and all of a sudden all the problems went away.
View 8 Replies
View Related
Oct 19, 2013
I have writen a nested stored procedure when i am passing a datetime paramter from the first procedure into the internally called procedure it is dropping the time part.
EX;
Declare @pdate datetime
Exec sp1 @pDate<this is datetime> = '2013-10-19 14:00:00'
Create proc sp1
(@pdate datetime)
as
Begin try
Exec sp2 @pdate <this is the same parameter for sp1>
End try
Begin Catch
Select 'error'
end catch
View 1 Replies
View Related
Feb 22, 2007
Hello all,I am loading a bunch of data from VS 2005. Everything works fine save for the Time being reported as 2:29:00 PM instead of 2:29:38 PM. I have debugged my code and the seconds are not being lost there. I have even changed the column type to smalldatetime with no change.
TIA,
Jason
View 4 Replies
View Related
Jun 15, 2015
I created dropped all indexes in a database and run in one database instead of actual databse. How to recreate again dropped indexes ...
View 4 Replies
View Related
Nov 3, 2006
Hi
I am trying to recover a set of tables with data that was dropped. This data was not backed up. Please advice, is there any way this data can be recovered.
View 1 Replies
View Related
Nov 24, 2000
Hello,
I'm in trouble, I have just dropped a table from a sql dbase and now need to recreate it. I have no backup and I am panicking!!! I need to know if I can recrreate them .
If this can't be done let me know I have to bit the bullet
thanx
View 3 Replies
View Related
Jun 7, 2007
Hello,
I am attempting to import a fixed width flat file into a SQL Server table. When I import the file, 704 records don't make it into the table. I know this because if I do the import with MS Access 2003 into an Access table, all of the records from the flat file make it into the table. The flat files have a .txt extension.
The only possible problem that I can see is that some of the rows in the flat file do not contain the full set of characters. When I do the import into SQL Server and create a table on the fly, I still end up 704 records short. There are no error messages during or after the import.
I suppose I could isolate some of the missing records, put them into a different file and try to import them to see what would happen. Other than that, how do I begin to troubleshoot this problem? Are there known issues where records can be dropped from a fixed width file?
Thank you for your help!
cdun2
View 4 Replies
View Related
Apr 12, 2008
I hv dropped the useless columns for a table but the table size is remain unchanged by executing sp_spaceused. pls advise how to release table spaces.
thx
View 6 Replies
View Related
Jan 27, 2004
I am by no means a db administrator, so I apologize for my ignorance. However I do know that I screwed up and am unable to find the solution...
The small company I work for has a development SQL Server where we do testing and development for web based applications. While using SQL Server Enteprise Manager I accidentally dropped the user's default default database.
I have always been able to access the enteprise manager via windows authentication, but now I am unable to. Is there any way to set the default database back to 'master'? Currently I cannot connect with SQL Query Analyzer for the same reasons, and do not have any other access except via windows authentication. Is there any hope? Any help is much appreciated.
View 14 Replies
View Related
Feb 27, 2007
Hello all :)
First, sorry for my english but I don't practice everday
So,
I'm a new user of Microsoft SQL 2005 and I'm testing some functionalities in SSIS.
I used the Transfer Objects Task to copy one database to another.
The both db's are on the same instance.
I chose these options for the transfer
-SourceConnection : My_Instance
-SourceDatabase : My_DB
-DestinationConnection : My_Instance
-DestinationDatabase : CopyOfMy_DB
-DropObjectsFirst = True
-IncludeExtendedProperties = Fasle
-CopyData = True
-ExistingData = Replace
-CopySchema = True
-UseCollation = True
IncludeDependentObjects =False
CopyAllObjects = True
The others options are set on FASLE
When I execute the package, I got an error message, the logins are dropped. I cannot connect to the database engine, even with my admin account.
I have to restore the master database !
So my question is : why this SSIS task drop all the logins in sql server in place of just copy one database??????
What's the solution for this problem?
Thanks for your comments !
Matt
View 2 Replies
View Related
Aug 11, 2006
Hello,
SQL SERVER 2000:
My problem is that I have to process a special text file every day which contains 0 ASCII values to separate fields. The DTS import program drops everything after the ascii 0 value in the row, but of course I need the entire row with all fields.
So how can I prevent the text file import task from dropping everything after the 0 ascii value?
Could you help me in this?
thank you
View 8 Replies
View Related