Re: Missing table

From: Keith Kratochvil (sqlguy.back2u_at_comcast.net)
Date: 05/27/04


Date: Thu, 27 May 2004 13:21:15 -0500

Yes, execute the commands within Query Analyzer.

The first piece of sql displays the table owner, type (table or view), and the name of the table.
The second piece of sql displays the creation date for the table as well as the table name.

Knowing these pieces of information might help in your investigation to find out what happened.

You mentioned that "most" are owned by dbo. How about the one table that is causing problems? Is it owned by someone else?

You mentioned that it disappeared from the [tables] view within Enterprise Manager. Hit the "views" node. Is your "table" listed there? Jump out to Query Analyzer and perform
exec sp_helptext YourTableNameGoesHere
That will give you the text of the view (if there is a view with the same name as the table). Perhaps the view is limiting the rows (making it look like some data is missing).

-- 
Keith
<anonymous@discussions.microsoft.com> wrote in message news:13a0501c44413$262bab40$a001280a@phx.gbl...
> Am I to type out the 2 commands you list, as is?  What am 
> I looking for in the results?  
> I executed the first one and it gave me a list of 24 
> items, most saying DBO, while the last ones said 
> INFORMATION_SCHEMA.   What does this mean?
> 
> >-----Original Message-----
> >I am guessing that the table is "owned" by some other 
> user.
> >
> >Using Query Analyzer
> >Connnect to the server
> >switch to the appropriate database
> >
> >SELECT TABLE_SCHEMA, TABLE_TYPE, TABLE_NAME FROM 
> INFORMATION_SCHEMA.tables
> >
> >SELECT crdate, name FROM sysobjects WHERE TYPE = 'u' 
> ORDER BY crdate DESC, name
> >
> >
> >Regarding the dissapearing data, I am guessing that 
> someone who thought they knew what they were doing  (on or 
> around 5/18/2004) created a new table (with a different 
> owner) and dropped the old table.  That is speculation, 
> but based on the information that you have provided it 
> sounds logical.  The other possibility is that someone 
> deleted the data within the table and changed the owner.
> >
> >Whatever the case may be, you have some investigation to 
> do!
> >
> >-- 
> >Keith
> >
> >
> >"Bean" <anonymous@discussions.microsoft.com> wrote in 
> message news:1371901c44404$a95e1610$a601280a@phx.gbl...
> >> I have a SQL 7.0 server holding our Agency's most 
> critical 
> >> database. At my deskstop, I link to this database in 
> >> Access via ODBC drivers. I am linked to a specific 
> table 
> >> which has disappeared from the server. It does not 
> appear 
> >> in Enterprise Manager.  I can find no "hidden" 
> attributes 
> >> to reverse...the table is simply gone. However, I can 
> use 
> >> the Query Analyser to get a count of records in this 
> table 
> >> and it returns the correct number of records. 
> Furthermore, 
> >> all data prior to 5/18/04 has also disappeared. Can 
> anyone 
> >> help me find this table AND more importantly, help me 
> >> discover why the data disappeared. No, I have no 
> backups 
> >> going back that far...... Thanks in advance.
> >.
> >


Relevant Pages

  • Re: SP - output parameter not coming back
    ... > Also I have tested the SP using SQL Query Analyzer and it does not ... If it does not work in query analyzer, it has no chance of working in asp ... > If I do not find out about the output parameter I am considering ... You definitely need to work on the stored procedure so that you can see the ...
    (microsoft.public.inetserver.asp.db)
  • Re: Cannot edit table data using Enterprise Manager
    ... The point of using Query Analyzer is that you write the ... they could have had the SQL written and been done with it! ... change or insert some words to data string using Replace function is ... Manager wasn't designed to be a data entry tool. ...
    (microsoft.public.sqlserver.tools)
  • Re: performace issue with a stored procedure
    ... in Query Analyzer and look at the results in SQL Profiler. ... The high CPU you are seeing might be due to cursors or some bad SQL choices. ...
    (microsoft.public.sqlserver.programming)
  • RE: Is the Folowing Applicationb Possible
    ... Therfore are you saying it is possible to create a useable app ... that uses SQL properly - but based around Sharepoint 'front end' AND is easy ... Then have a drop down list so that a users could easliy pick the owner. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Local SQL Queries slow on Dual CPU/hyperthreading hardware
    ... This will tell if the problem is related to the SQL script you send or not. ... anti-virus, network monitoring, etc running? ... but only when hyperthreading is switched on using the same> physical hardware. ... In fact you don't need to run the query at all -> simply parsing it in SQL query analyzer is enough. ...
    (microsoft.public.sqlserver.server)