9Pardhu Posted November 19, 2012 Author Report Share Posted November 19, 2012 i am unable to post here... PM chesta neeku Post it... Link to comment Share on other sites More sharing options...
deals2buy Posted November 19, 2012 Report Share Posted November 19, 2012 [quote name='9pardhu' timestamp='1353355952' post='1302824811'] i am unable to post here... PM chesta neeku Post it... [/quote] sure Link to comment Share on other sites More sharing options...
karna11 Posted November 19, 2012 Report Share Posted November 19, 2012 HOW TO RETREIVE CHECK CONSTRAINTS OF CURRENT DATABASES? alagee FOREIGN CONSTRAINTS kodaaa? Link to comment Share on other sites More sharing options...
9Pardhu Posted November 19, 2012 Author Report Share Posted November 19, 2012 [quote name='karna11' timestamp='1353357925' post='1302825033'] HOW TO RETREIVE CHECK CONSTRAINTS OF CURRENT DATABASES? alagee FOREIGN CONSTRAINTS kodaaa? [/quote] Go to Databases > Tables > Keys - for Keys Go to Databases > Tables > Constraints - for Constraints Link to comment Share on other sites More sharing options...
karna11 Posted November 19, 2012 Report Share Posted November 19, 2012 [quote name='9pardhu' timestamp='1353358631' post='1302825070'] Go to Databases > Tables > Keys - for Keys Go to Databases > Tables > Constraints - for Constraints [/quote] baa nuvvu marinuuu, nenu adigindhiii through query Link to comment Share on other sites More sharing options...
deals2buy Posted November 19, 2012 Report Share Posted November 19, 2012 [quote name='karna11' timestamp='1353357925' post='1302825033'] HOW TO RETREIVE CHECK CONSTRAINTS OF CURRENT DATABASES? alagee FOREIGN CONSTRAINTS kodaaa? [/quote] using GUI aithe pardhu cheppindi follow avvu using SQL aithe use this SELECT OBJECT_NAME(OBJECT_ID) AS NameofConstraint, SCHEMA_NAME(schema_id) AS SchemaName, OBJECT_NAME(parent_object_id) AS TableName, type_desc AS ConstraintType FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' GO ---- select Referencing_Object_name, referencing_column_Name, Referenced_Object_name, Referenced_Column_Name from (select Referenced_Column_Name = c.name, Referenced_Object_name = o.name, f.constid from sysforeignkeys f, sysobjects o, syscolumns c where (f.rkeyid = o.id) and c.id = o.id and c.colid = f.rkey) r, (select referencing_column_Name = c.name, Referencing_Object_name = o.name, f.constid from sysforeignkeys f, sysobjects o, syscolumns c where (f.fkeyid = o.id) and c.id = o.id and c.colid = f.fkey) f where r.Referenced_Column_Name = f.referencing_column_Name and r.constid = f.constid order by f.Referencing_Object_name Link to comment Share on other sites More sharing options...
deals2buy Posted November 19, 2012 Report Share Posted November 19, 2012 select o1.name as Referencing_Object_name , c1.name as referencing_column_Name , o2.name as Referenced_Object_name , c2.name as Referenced_Column_Name , s.name as Constraint_name from sysforeignkeys fk inner join sysobjects o1 on fk.fkeyid = o1.id inner join sysobjects o2 on fk.rkeyid = o2.id inner join syscolumns c1 on c1.id = o1.id and c1.colid = fk.fkey inner join syscolumns c2 on c2.id = o2.id and c2.colid = fk.rkey inner join sysobjects s on fk.constid = s.id and o2.name='tblUserDetails' — this predicate for a specific table Link to comment Share on other sites More sharing options...
karna11 Posted November 19, 2012 Report Share Posted November 19, 2012 babu deals2buy neeku question clear ga ardham ayyindhaa, nenu adigindhi only check constraints not a all constrints Link to comment Share on other sites More sharing options...
deals2buy Posted November 19, 2012 Report Share Posted November 19, 2012 [quote name='karna11' timestamp='1353359431' post='1302825159'] babu deals2buy neeku question clear ga ardham ayyindhaa, nenu adigindhi only check constraints not a all constrints [/quote] particular table meeda na? leka whole database meeda na? Link to comment Share on other sites More sharing options...
karna11 Posted November 19, 2012 Report Share Posted November 19, 2012 [quote name='deals2buy' timestamp='1353359811' post='1302825215'] particular table meeda na? leka whole database meeda na? [/quote] TABLE MEDHA KADHU, dATABASE LEVEL LOO, NUVVU AS IT IS GAA cd ISTHUNNAV GAA , CHARANALU ESIIII GOOGLE NUNDI Link to comment Share on other sites More sharing options...
deals2buy Posted November 19, 2012 Report Share Posted November 19, 2012 [quote name='karna11' timestamp='1353359938' post='1302825228'] TABLE MEDHA KADHU, dATABASE LEVEL LOO [/quote] idi try chesi chudu Select SysObjects.[Name] As [Contraint Name] ,Tab.[Name] as [Table Name],Col.[Name] As [Column Name] From SysObjects Inner Join (Select [Name],[ID] From SysObjects Where XType = 'U') As Tab On Tab.[ID] = Sysobjects.[Parent_Obj] Inner Join sysconstraints On sysconstraints.Constid = Sysobjects.[ID] Inner Join SysColumns Col On Col.[ColID] = sysconstraints.[ColID] And Col.[ID] = Tab.[ID] where SysObjects.[Name] like 'CK%' order by Tab.[Name] neeku constraints names correct o kaado ela verify chesukuntaav mari? Link to comment Share on other sites More sharing options...
deals2buy Posted November 19, 2012 Report Share Posted November 19, 2012 [quote name='karna11' timestamp='1353359938' post='1302825228'] TABLE MEDHA KADHU, dATABASE LEVEL LOO, NUVVU AS IT IS GAA cd ISTHUNNAV GAA , CHARANALU ESIIII GOOGLE NUNDI [/quote] nuvvu ethukodaniki badhakam esi ikkada adugutunnavemo anukunna btw paina cheppina code try chey...u may get ur answer Link to comment Share on other sites More sharing options...
Darling999 Posted November 19, 2012 Report Share Posted November 19, 2012 painaa rendu tryu cheyyi vastadi Link to comment Share on other sites More sharing options...
9Pardhu Posted November 19, 2012 Author Report Share Posted November 19, 2012 blogs .inkeysolutions. com/ 2011/07/ shrinkfile-and-truncate-log-file-in-sql. html Link to comment Share on other sites More sharing options...
9Pardhu Posted November 19, 2012 Author Report Share Posted November 19, 2012 remove spaces. i am unable to post because i dont have 200 posts Link to comment Share on other sites More sharing options...
Recommended Posts