Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 CRUD SP generator

Author  Topic 

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2007-10-05 : 16:36:59
Do any of you guys have an SP that will take all the user tables in a database and create basic CRUD SPs for them?

If it doesn't exist I may take a stab at writing it but I don't want to reinvent the wheel if I don't have to.

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-05 : 16:40:04
you can use this:
http://weblogs.sqlteam.com/mladenp/archive/2007/09/20/SSMS-Tools-Pack---an-add-in-for-SQL-Management-Studio.aspx

there are also tools that are stand alone like MyGeneration. google them.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2007-10-05 : 17:18:00
Thanks but that add-in isn't an SP.

I have googled around a bit and haven't quite found what I want, which is why I posted here.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-05 : 17:20:24
why do you need a sp that generates other sp's if there are already tools for that??

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2007-10-05 : 17:37:21
Sps are cleaner and more portable. For example, the add-in you mention above is for SQL2005. That's not very helpful on SQL2000. Also it's a lot simpler to just run a script than it is to install software at a client site. Some client sites won't let me bring in my own machine and all I have is access to my website or a CD.

Why do you use two question marks when one will do?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-05 : 17:43:34
> Why do you use two question marks when one will do?
i guess it's a force of habit when being surprised by an answer.

to answer your question: no, i haven't seen a proc for this.
the add-in i mentioned is for SSMS. you can connect to sql server 2000 just fine with SSMS



_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-10-06 : 05:21:20
We have an Sproc that does this, but its proprietary I'm afraid. But it wasn't hard for us to write.

I'm sure that's not very helpful, because if there is something out there that will be your fastest route, but our home-brewed one has allowed us to adjust it for things that we thought of later - like

SET XACT_ABORT ON

Kristen
Go to Top of Page

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2007-10-08 : 11:44:11
No worries, Kristen. I'll just modify some of the MS supplied SPs to suit my needs.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-09 : 05:01:09
here's one:
http://entropia-online.blogspot.com/2007/08/free-script-to-create-crud-procedures.html

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -