August 14, 2008 at 2:20 pm
Is there any tool that will let me debug, or rather run step by step scripts
in SQLServer Mgmnt Studio or some other "Query Analyzer"
I know that I can debug Stored Procs in Visual Studio but I just want to take a script I have and be able to place break points and run.
Is there anything like this out there at all?
August 14, 2008 at 3:11 pm
There are several third-party products that have that kind of thing. I think RedGate has one, pretty sure ApexSQL has one.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
August 14, 2008 at 3:32 pm
Or upgrade to SQL Server 2008. It's built right into management studio.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 15, 2008 at 7:29 am
GSquared (8/14/2008)
There are several third-party products that have that kind of thing. I think RedGate has one, pretty sure ApexSQL has one.
Neither of these companies has a product that allows step by step running of scripts with breakpoint debugging.
August 15, 2008 at 7:31 am
GilaMonster (8/14/2008)
Or upgrade to SQL Server 2008. It's built right into management studio.
So can I use 2008 Management Studio on 2005 DBs without harming them? What I mean is can I tell 2008 that I want to back up a 2005 DB AS a 2005 DB?
Does it offer step by step debugging with breakpoints?
August 15, 2008 at 7:46 am
You can connect to a 2005 server from 2008's management studio. The server remains 2005. I'm not sure if you can debug against a lower version. It's one of the things I've been meaning to try for a while.
If you upgrade the server instance to 2008, then all the databases become SQL 2008 databases. Management studio's just a client tool. It doesn't affect the version of anything on the server.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 15, 2008 at 11:03 am
GilaMonster (8/15/2008)
You can connect to a 2005 server from 2008's management studio. The server remains 2005.
Yes I figured that, it worked that way with 2005 connecting to 2000. However...
GilaMonster (8/15/2008)
If you upgrade the server instance to 2008, then all the databases become SQL 2008 databases. Management studio's just a client tool. It doesn't affect the version of anything on the server.
Not exactly. We've had instances where we connect to a 2000 DB using 2005 Mgmt Studio and did a backup and the backup was 2005, NOT 2000. We couldn't restore to a 2000 server.
August 15, 2008 at 11:14 am
MrBaseball34 (8/15/2008)
Not exactly. We've had instances where we connect to a 2000 DB using 2005 Mgmt Studio and did a backup and the backup was 2005, NOT 2000. We couldn't restore to a 2000 server.
100% sure it was a SQL 2000 server?
Management studio has no backup capabilities in an of itself. It's just a client interface. All it does when you backup a database is it issues a command down to the server and says "backup database X to ...." Hence the backup will be in whatever format the server writes it out. If that was a SQL 2000 server, then the backup is SQL 2000, if it was a SQL 2005 server then the backup is SQL 2005.
Same with query analyser, osql, isql and any other query tool that you want to use
Now if that was a database in compat mode 80 on a SQL 2005 server, then it's considered a SQL 2005 database, regardless of compat mode.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 15, 2008 at 1:11 pm
Management Studio 2008 can't use it's debugging features on SQL 2005/2000.
I just installed a trial copy of 2008 today. Tested both Intellisense and debugging on 2008 and then on 2005. Both work in a 2008 database, neither works in 2005 (from Management Studio 2008).
On the other hand, make a copy of the database in 2008, debug the queries there, then copy the script to the 2005 database. That works. That lets you debug, even though it does add a couple of (easy) extra steps.
The debugging includes break points, variable values, etc.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
August 15, 2008 at 1:18 pm
GSquared (8/15/2008)
Management Studio 2008 can't use it's debugging features on SQL 2005/2000.I just installed a trial copy of 2008 today. Tested both Intellisense and debugging on 2008 and then on 2005. Both work in a 2008 database, neither works in 2005 (from Management Studio 2008).
Thanks. Saves me from testing it out.
A bit disappointing, but I can see why. Still might be worth whining on Connect about though. 😉
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 15, 2008 at 2:02 pm
Probably is worth asking for. Probably won't get, but can't hurt to ask.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply