Morning Wim,
Sounds good. Leaves me one question. How do you get a
developer environment? Make a copy of production? Change the
paths where needed in configuration? But what if the
production database is already a 100 Gb? (and my laptop has
a 60Gb hard disk... )
What we used to do in the dim and distant past, in another job, was to
have everyone keep their own small developer database for testing of
fixes/changes we did individually. These databases were all kept up to
date with the production structure, but not necessarily all the data. It
worked fine.
Changes would be unit tested by the developers and then applied to the
almost full sized test database sitting around for this very purpose.
Then QA got their hands on it, and the changes were tested against a
full sized QA database before going live.
The developers handled the changes to their own databases and a
dedicated team did the main test and QA databases etc, production was
"untouchable" for us mere mortals.
Recently here, I helped a colleague who doesn't have a development
database but has a test and a production. He didn't want to run new
scripts etc in test because that is the one his users use to test out
bits of the application they are unfamiliar with, etc, like a
playground. He needed a development database so I installed XE on my
desktop (with full authority from the licensing people!) and loaded up
an export of the production database to run the new scripts against.
There were problems, obviously, but we fixed them and got a good clean
end to end run of all the scripts for the latest development work. Very
satisfying.
In this case, we were able to take a full copy of the database because
it's less than 4 GB of data and XE fits the bill perfectly in that case.
Bigger databases - I have one or two in the terabyte range - won't work.
In that case I'd be looking to take an extract (using Toad of course) of
a small percentage of the database (Production or test as appropriate)
and load that into XE for development work. After all, when developing
code you don't really need the full sized database. If I need to do some
performance checks, I can export production stats and import them into
XE, if required, and get my explain plans "sort of" optimised. (Given
the difference in hardware and OS between my desktop and the production
server, this will only give me a clue to potential problems!)
My little XE database does get refreshed quite often, depending on what
I'm working on this week!
Now, given Chris's problems with Duelling Developers (can I hear banjo
music?) the above will help prevent the developers trashing each others
code when compiling into the same database, but - as with a lot of
situations - will cause problems when applied to the test database where
all changes have to be applied eventually. For exactly the same reason,
one developer's changes will not include another developer's changes, so
the scripts that get applied to the test (and from there, production)
database must come from a Subversion repository because if they do, the
changes will have been merged by SVN on commit and if any conflicts
occur, they will have been manually resolved by the duelling developers.
Now, hopefully, the two developers will realise that an SVN merge of
their changes may actually break things, so when they get the finally
agreed merge of both sets of changes, a compile and unit test against
their own database would be a good idea. Then the testing
team/QA/whoever can be informed that (a) a conflict arose and (b) it has
been resolved and (c) we've both tested it again and all appears well.
I'm sure that there will be cases where you have a procedure with nested
procedures, or a package, and one developer changes a nested procedure
and another changes the code that calls it. Depending on the changes,
Subversion will not see a conflict and will happily merge the two sets
of changes which might result in code that doesn't work.
Subversion does have pre and post-commit hooks that can be used by an
automated system whereby any file that is checked in is compiled against
a standard database to ensure that what the developers - duelling or
otherwise - are checking in doesn't break stuff.
It would solve Chris's problems if Subversion had a pre/post-check-out
hook to do something whenever someone checks out a file, but it doesn't.
However, with the joys of open source, someone somewhere might add it
in!
I think those are problems I must solve myself, because of
the fact that it all depends on what I'm doing. But I like
to hear someone else thoughts on this subject.
See above!
Cheers,
Norm. [TeamT]
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.
We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.
If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk