cra451
well...
Im happy that you found the missing object. im not sure that this was a missing object i would suspect that it was either not checked in , not refreshed , some other wierdness , but i think this might be process driven... and since ths is an experiment , and if you dont mind i can outline how we are actually using this wth developers and dba's. We have been doing this project since last summer and data dude since October. So we have some of the isuses worked out.
I can not say that this is the best way but it is working for us quite nicely. (THANKS MSFT)
Lets look at how our team systems works for c# code and see if 'normal' or 'standard' practaces can illistrate some procedures for Datadude.
When the developer arrives in the am (or im the pm for the really good programmers) , this person opens up team system and probably opens up a common solution with all if not most of the Projects in it. Personally i right click on the solution and do a GetLatest (or get all) for the project.
While this is churning away i get outlook open and see if the email from the build last night was a success of failure. (some offices make the developer who breaks the build do some thing silly for breaking the build. i have heard of wearing a tuto or having to buy the team lunch the friday after payday. use you own judgement here but this is a developers job to try to keep from breaking the build)
If the build succeeded i sigh and relax.
by the time i finish reading the email i know two things ..... Where im gong to lunch friday and by then the getall has had enough time to complete. .... and then I do a local build from the solution ....(right click on solution) now to be clear this is not a Data dude deploy that is in a second.....
if everythng is working I have a stable starting point to start the day. this is important for developers and data people also. ifnot i can start tosee what happened to break this...
the get all and sync will insure all objects (C# and Tsql) are 'moved' to the local machine for dev. but in the case of c# there eally isnt any great use in executing a c# file you generally need to execute a Dll or EXE . thier creation is handled in the build process. but these file are in your source tree the are not on a test server or database. to get these 'compiled' objects (aka targets, websites databases etc) to thier usefull locations is generally done with a deploy step.
this kinda makes sense when you think about it.... if im sending a web site update to the web server id want to get all the changes together in one batch and then send them to the test server all at once.... then take that same set of changes to PreProd then finally to Production.
so for review the Deploy has a payload and the build a smaller process to assemble and verify that this payload works ( or a payload) is complete and repeatable. NOTE i did not say Tested...... i just said assembled and Works....
Now for me personally since im a dba im going to go ahead and deploy my database projects locally and run their db unit test and populate with some safe test data.
C# C++ C , vb etc have been using this process for years (if not decades)
We try to go in a 4 hour block of time ill try to set up a task that takes 4 hours to complete and check that in .
So from here lets assume that 3.5 hours have passed and this is what im going to do next.
so far i have successfully created local database objects (views, sp, fn, etc) and i have written sql tests and am satisfied that my task is done....
so what do i do ...
I open up team systems... ( what when did i close it... )
yep thats right i actually do my dev work in my favorate tools.... im not tied to TFS for accomplishing work... just orginazing and scheduling and communicating... (YEA no more status reports...another rant)
I do most of my work in SQl server managemnt studio for SQl 2005 ...
So im back in tfs...
Well since im checking in code the first thing i do is open up the solution that has all of our projects... and right clickon the databases and do a get latest (since im THE DBA there should not be anything there i dont know already about... but i can check on it before proceding..)
once the get is done (99% of the time there isnt any changes ) i do build and then a database schem compair between the project and my local database... Yep that is right....
this will check all the differences not just the ones that i remeber. and really now i dont have to because its chceking my local database against the Checked in database.
this creates two things the diff screen that shows me what is changed and the complete delta script.
I can tell it what gets checked in and what doesnt from this screen ...... in my humble opinion this is so much better than trying to edit the objects in tfs... (although the refactoring is really cool, although some things it doesnt do as well and that is being worked on in this next release)
When i am satisfied with what im turning in, i select the Write updates button. this updates all the sql files in the database project that need to be changed. But these files are not back in the tfs server yet. and that is a good thing.
Do you remeber that part about breaking the build... if the changes went directly into tfs you dont really know if you selected everything right...Right the program told you bit you just over-rode its sugestions....
so i recommend doing a build and Deploy to a localtestdatabase.. and rerunning your database test scripts, then checking both the database test scripts and the database projects back into the tfs server.
Also in this check in, i update my task as complete.
At this point and only at this point can a developer get this code for thier use.... (not counting shelving....another topic)
this eliminates the oops factor on both sides and leaves a nice audit .... and the database and 'data' is in version control and can be rebuilt+Deployed and set up in minutes for any and many task(s).
Did i mention it can be deployed anywhere that you can set up a sql2005 connection to. (nice for one off situations that the developer may need )
By the way the process of sync build checking takes me about 3 minutes to do. but it documents this task item is complete, it also associates this code to this task, these tests to this code and my status is now updated. (this is also called a changeset)
My worse case is if things dont go right (i forgot something , the code doesnt compile etc ) is no more than 15 minutes but this saves someone else from having to deal with this not working. and also mostly elimines the quick fixed that are needed all the time... these quick fixes are more controled and eventually more rare... and if needed 3-15 minutes on my side and 3 minutes on the developers side if needed.
Now for the build ... its later that night and we have a Database build and Deploy to a dev server set up and all my changes will be built and deployed to the dev server that night..(actually we backup and delete dev once a week) and our build sets up the database, permissions , and standard starting test data.
when the build/deploy is complete we execute the db tests against this database that way the Developers that use it know its right everytime its built.
If the build succeeds then the builds deploys and the application tests execute and we get a full regression testing every night. (at the database and at the application) we actually have 5 apps and 2 databases in our contract with the client.
I realize that this answer is a bit long but there are alot of controls that are in place and i think they are wisely thought out. We have a small tight team of 2 devs 1 dba and one 1Project manager/Tester. and we learned and did this mostly in the last 6 months. so you can too , its hard to do the initial climb but the view is great once you get here.....(MSFT no vista jokes please GRIN/groan)
And i really hope i filled some possible cracks. please post back with more questions...... we are all here to help
Cra451