Click here to Skip to main content
12,254,527 members (65,285 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: SQL-Server
HI,

can any one help me out,i want to delete one table from production before delete the table i want check the table dependent object on server level

Regards
Ramesh.m
Posted 10-Oct-12 21:27pm
Comments
n.podbielski 11-Oct-12 3:33am
   
Do you want to that from tsql script?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

To check the table dependencies, you can try this query:
SELECT routine_name, routine_type FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%sdfUser%'


--Amit
  Permalink  
Comments
ramesh4128 11-Oct-12 4:23am
   
here i want dependency on total databases available on the server
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Hi Ramesh You can use

EXEC sp_depends @objname = N'Your Table Name';

-- Mukesh
  Permalink  
Comments
ramesh4128 11-Oct-12 4:23am
   
here i want dependency on total databases available on the server

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100