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 Development (2000)
 Stored Procedures and Source Safe Implementation

Author  Topic 

Blastrix
Posting Yak Master

208 Posts

Posted - 2003-04-18 : 11:58:16
After reading through some of the posts on the forums, I decided to start using SS for my stored procedures, however, I have a few questions.

1) Is there a best implementation practice? Right now I have: Check out of SS, goto folder proc is checked out to, open it in QA(which requires me to login everytime), edit proc, slap F5 to run it, save proc, go back to SS and check back in.

2) Are there any applications out there that tie SS and QA together somehow? Maybe not completely, but if there was at least a way to set the working directory in SS where the procs are, and then tell the app what DB to hook to, then be able to run changes from the app, checkout/in and so on. If I needed the more advanced features that QA brings, then I could always open it up, but for regular editing, it's a real pain how I do it right now.

3) All proc user permissions need to be coded into the file, correct? Not that big of an issue, since it's just one line per user, but it's also quicker to just click a little box in EM.

Thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2003-04-18 : 12:13:27
I leave qa running all the time and either open the file using qa or drag it using explorer.

Apart from that I do 1).

You can code the permissions into the file or you can run a separate script to set permissions. I tend to go with a grant statement at the end of the SP unless the same SP has to go to different places with different permissions.

I posted a method of creating a bat file to load QA to connect to the database with the SP from the file without having to manually log on but don't think it's very good.

I like to keep sourcesafe fairly manual as it is so important. And also want to use the same techniques at companies that use other products (although most do seem to use sourcesafe now).


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.

Edited by - nr on 04/18/2003 12:16:07
Go to Top of Page

Blastrix
Posting Yak Master

208 Posts

Posted - 2003-04-18 : 12:24:13
Have you ever used the application here: http://www.skilledsoftware.com ?

It seems like it does everything that could be needed, and then some. But as you said, source control is very important, and I wouldn't want to use an app that might create major headaches down the road.

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-04-18 : 13:21:28
If you're using SQL Server 2000 (or at least the 2000 client tools) you can customer Query Analyzer to add options under Tools to check in, check out, and run differences on your code using Source Safe. The details can be found in

The Guru's Guide To SQL Server Stored Procedures, XML, and HTML

by Ken Henderson. Otherwise you can do as Nigel suggests; I do the same thing and it works great. Just leave QA open an it's no trouble at all.

Go to Top of Page

Blastrix
Posting Yak Master

208 Posts

Posted - 2003-04-18 : 16:41:15
nr,
I tried finding the batch file you said you posted, but I didn't get anything from my search. Could you post the text of that file? I'm looking for something where I can just drop the proc file onto the bat file, and have it run. I tried the following, but it doesn't work, and just keeps popping up the help window.

"C:\Program Files\Microsoft SQL Server\80\Tools\Binn\isqlw" -S DND1 -d DNDPrimary -E -i "%1"

If I take out the -i "%1", then QA starts up logged in like expected.

Thanks,
Steve

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-04-18 : 17:09:12
I really should get that book soon. If robvolk recommends it, then it must be a good book.

I've been meaning to get the book, but I can't remember how to order books through my company.

Tara
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2003-04-18 : 17:59:25
May well not have been on this site.
Just create a bat file with the command to load isqlw in it with your server, dbname, uid and pwd. Use %1 to give it the name of the file to load. Then you can make it the source for .sql files and it will open them in qa.
It's annoyingly slow though and opens each file in a new instance of qa so isn't very good.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.

Edited by - nr on 04/18/2003 18:01:03
Go to Top of Page
   

- Advertisement -