Monday, February 20, 2012
List all Stored Procedures used in a VS.NET project
This is kind of a visual studio question, but pertinent to db' s - due to many changes of our application I know that there are many stored procs in the database that are no longer used. Since I cannot get a list from the programmers, is there any way to get a list out of visual studio, of every SQL stored procedure called in that project? (Going through each form manually will just be too time consuming for me or the programmers)
Anyone know any tricks??
thx
Desthis query can list all the stored procedure names that ur db has...
select name from YOURDBName..sysobjects where xtype='P'|||Sorry, you misundertand - I need to list the procs used in a Visual Studio project, not in a DB..(as I know a lot are not used anymore and want to clean out my db)
List all SQL/VS.NET objects on an aspx page?
Being new to ASP.NET, I may be asking something that is dead simple, but please bear with me!
How would I go about listing all the tables, stored procedures and views from a SQL database within an aspx page? I understand how to connect and return a dataset etc, but that's about as far as I can get. I want to be able to list all of these objects from a given db - any ideas?
Additionally (this may not be possible) - is there a way I can list all of the objects within a visual studio.net solution, again within an aspx page?
Thanks for any help,
JonSQL has a number of procs and views that allow you to get at the meta data of its database. It's also got some weird foreach functions that help too.
select * from sysobjectsis one place to start, but there are nicer views.
As for .net you can use reflection and work your way around that.
System.Reflection.Assembly.GetExecutingAssembly();is another good starting place.|||Thanks alot - that gives me some useful pointers.
I shall have a go and post results (if anyone else is interested in how it's done).