SP_Help

Sep 13, 2006

I need to write dynamic SQL statment that will delete a code from a table but before you can delete that code...I need to find all the foreign key constraints (all the tables that references this table to either update or delete from them and then delete from this table last) I know how to get this information from SP_Help but i dont know how I can do this dynamically. Please help. Emadkb

View 5 Replies


ADVERTISEMENT

Sp_help Can't See My Tables

Jul 20, 2005

I'm trying to use sp_help to get information on my tables. I can usesp_help alone to get a list of objects (including user tables), butwhen I pass a table name as an argument I get the following errormessage:exec sp_helpexec sp_help parcelServer: Msg 15009, Level 16, State 1, Procedure sp_help, Line 71The object 'DGM_HILLSHADE2' does not exist in database 'raster'.The table clearly exists, but sp_help fails to find it and returninfo. This is the case in a couple of my databases. I'm connected as'sa' so it seems to me it shouldn't be a permissions problem, right?D Bull

View 6 Replies View Related

DB Suspect Not Show In Sp_help

Dec 4, 2007

Hi!
I am having a problem with one of my local data bases, it shown the status of (suspect).
When I try to apply solutions that I found on internet for example run:
sp_resetstatus 'dbImpOfertas'

it shows the message that : The databse 'dbImpOfertas' does not exist.
Use sp_help to show available databases.

This is the log information:

2007-11-28 00:00:03.68 spid53 Starting up database 'bdImpOfertas'.
2007-11-28 00:00:03.76 spid53 Error: 602, Severity: 21, State: 50
2007-11-28 00:00:03.76 spid53 Could not find row in sysindexes for database ID 15, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes..
2007-11-28 00:00:05.21 spid53 Using 'xpstar.dll' version '2000.80.2039' to execute extended stored procedure 'xp_instance_regread'.
2007-11-28 00:00:05.21 spid54 Using 'xpstar.dll' version '2000.80.2039' to execute extended stored procedure 'xp_instance_regread'.

View 1 Replies View Related

HELP: Sp_help And Object Browser Report View Column Sizes Differently

Jul 20, 2005

Hi,I've run into a curious problem with MS SQL Server 8.0. Using sp_help andSQL Query Analyzer's object browser to view the columns returned by a view,I find that sp_help is reporting stale information.In a recent schema change, for example, someone lengthened a varchar columnfrom 15 to 50 characters. If we use sp_help to find out about a view thatdepends upon this column, it still shows up as VARCHAR(15), whereas theobject browser correctly reports it as VARCHAR(50).Dropping and recreating the view fixes the problem, but we have quite a fewviews, and dropping and re-creating all of them any time a schema change ismade is something we want to avoid. I tried using DBCC CHECKDB in hopes thatit would 'refresh' SQL Server's information, but no luck.(if you're curious as to why I don't just use the object browser instead,read boring technical details below)Has anyone seen this before? Is there some other way (other thanre-creating every view) to tell SQL Server to "refresh" it's information?Thanks!-Scott----------------------Boring Technical Information:The reason this is an issue for us (i.e., I can't just use the objectbrowser instead) is that our object model classes are built using standardmetadata query methods in Java that seem to be returning the same staleinformation that sp_help is returning. These methods are a part of thestandard JDK, so we can't easily fiddle with them. Anyway, as a result, ourobject model (at least with respect to views) may not match our currentschema!

View 5 Replies View Related

Determining What Are System Objects In Sp_help Or System Tables

Jul 20, 2005

Hi,I have a few things on my databases which seem to be neither true systemobjects or user objects - notably a table called 'dtproperties' (createdby Enterprise manager as I understand, relating to relationship graphingor something) and some stored procs begining with "dt_" (some kind ofsource control stuff, possible visual studio related). These show up whenI use"exec sp_help 'databaseName'"but not in Ent. Mgr. or in Query Analyzer's object browser, and also notin a third party tool I use called AdeptSQL. I am wondering how thosetools know to differentiate between these types of quasi-system objects,and my real user data. (This is for the purpose of a customized schemagenerator I am writing). I'd prefer to determine this info with systemstored procs (ie sp_help, sp_helptex, sp_...etc) but will dip into thesystem tables if needed.Thanks,Dave

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved