Re: [OT] Shrinking LDF file

2016-02-08 Thread Greg Keogh
I found it! ... DBCC SHRINKFILE(mydatabase_log, 1) This reduced the 140MB to 3MB, not quite as good as I hoped, but much better. I don't yet know what this command actually does. The advice in dozens of top search web articles is really verbose and misleading Why on earth is the LDF so big anywa

[OT] Shrinking LDF file

2016-02-08 Thread Greg Keogh
Folks, I have been trying for 40 minutes to shrink the 140MB LDF file paired with its 15MB MDF file. I have been searching and searching and reading, but all the commands and suggestions I've found *DON'T WORK*. This is a test database and there is nothing in the LDF of interest to me. I want to de

RE: Interview question pseudocode (was RE: [OT] Internal Developer Training)

2016-02-08 Thread Bill McCarthy
Returning from the finally block should not be allowed, as the finally block is meant to always be executed (eventually) so a return in there could be preceded by an earlier return ,yet the finally return is meant to still execute: at best an unstable stack, but generally Not allowed From: Mark

Re: Interview question pseudocode (was RE: [OT] Internal Developer Training)

2016-02-08 Thread Mark Hurd
If the question was *What happens here?" or "Analyse this code (in various languages).", I would say it's not too bad as you can mention it should return 2 in any language that accepts returning from a finally, which happens to include VB.NET indirectly, but I could believe there are languages

RE: [OT] Internal Developer Training

2016-02-08 Thread Andrew Coates (DX AUSTRALIA)
Also forgot to say that 1. it’s good to occasionally get an external speaker in, and 2. If someone gives a good presentation, encourage them to give it again at, say, the local .NET User Group. Nothing like reuse to make you feel like that work was worthwhile, and the second time’s

RE: [OT] Internal Developer Training

2016-02-08 Thread Dave Walker
Oh yeah heaps of people so won't be any issues there. On 9 Feb 2016 18:20, "Andrew Coates (DX AUSTRALIA)" < andrew.coa...@microsoft.com> wrote: > 7’s probably at the bottom end of enough for critical mass. You don’t need > many people to be on leave, sick or working on that urgent project before >

RE: [OT] Internal Developer Training

2016-02-08 Thread Andrew Coates (DX AUSTRALIA)
7’s probably at the bottom end of enough for critical mass. You don’t need many people to be on leave, sick or working on that urgent project before someone’s doing a presentation they spent 6 hours of their own time prepping for to 2 or 3 people. Is there anyone else in the org you could rope

Re: SQL foreign key question

2016-02-08 Thread David Burstin
Thanks Greg - that clears it up for me. I hadn't thought about the pre-processor. Cheers. On 9 February 2016 at 16:11, Greg Low (罗格雷格博士) wrote: > Yes, if it just points to itself, it already knows that it satisfies it. > It is respecting the constraint. There is nothing to check. > > > > I see d

RE: SQL foreign key question

2016-02-08 Thread 罗格雷格博士
Ahh. Should have been: WHERE A <= 10 AND A >= 10 Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: www.sqldownunder.com From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdot

RE: SQL foreign key question

2016-02-08 Thread 罗格雷格博士
SQL Server also pre-processes all sorts of things. For example: WHERE A <= 10 AND >= 10 That can safely be replaced by: WHERE A = 10 But they are very cautious about rewriting your code. Very easy to break it. But they really have to. While humans can write lousy code, code generators are sp

RE: [OT] Internal Developer Training

2016-02-08 Thread Dave Walker
Cheers this looks awesome! Team is 7 people so not small. On 9 Feb 2016 17:22, "Andrew Coates (DX AUSTRALIA)" < andrew.coa...@microsoft.com> wrote: > Hi Dave, > > > > How big is your team? > > > > One of the things we’ve seen work well is to have a regular “internal user > group” every fortnight,

RE: SQL foreign key question

2016-02-08 Thread 罗格雷格博士
Yes, if it just points to itself, it already knows that it satisfies it. It is respecting the constraint. There is nothing to check. I see dumb stuff like this all the time. Was at a site recently where they had triple-created all the FK constraints. No big surprise that it doesn’t actually che

Re: SQL foreign key question

2016-02-08 Thread David Burstin
On 9 February 2016 at 16:02, Greg Low (罗格雷格博士) wrote: > You often see tables referring to themselves (due to some sort of > hierarchical data) but having a column refer to itself seems at best > pointless, at worst silly. > For me the bigger question is how this actually works. Does the sql engi

Re: SQL foreign key question

2016-02-08 Thread David Burstin
Thanks Tony. One more reason why I don't use the visual designer (now get off my lawn). I don't like the idea that it is ignored arbitrarily. Does anything else get arbitrarily ignored? On 9 February 2016 at 15:59, Tony McGee wrote: > This can sometimes happen to a primary key if you use the vi

RE: SQL foreign key question

2016-02-08 Thread 罗格雷格博士
You often see tables referring to themselves (due to some sort of hierarchical data) but having a column refer to itself seems at best pointless, at worst silly. And reason #3723923 why I won’t ever use such a visual table designer. Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office

Re: SQL foreign key question

2016-02-08 Thread Tony McGee
This can sometimes happen to a primary key if you use the visual query designer to create a FK relationship and don't change the defaults before clicking OK. It looks like it's ignored in the insert query execution plan. On 9 Feb 2016 2:32 pm, "David Burstin" wrote: > I came across this (snipped

Re: SQL foreign key question

2016-02-08 Thread Corneliu I. Tusnea
Inception :) On Tue, Feb 9, 2016 at 3:31 PM, David Burstin wrote: > I came across this (snipped to protect the innocent): > > > > CREATE TABLE [dbo].[V2_BREC_NMIStatusHistory] ( > > [NMIStatusHistoryId] INT IDENTITY (1, 1) NOT FOR REPLICATION > NOT NULL, > > > > CONSTRAIN

SQL foreign key question

2016-02-08 Thread David Burstin
I came across this (snipped to protect the innocent): CREATE TABLE [dbo].[V2_BREC_NMIStatusHistory] ( [NMIStatusHistoryId] INT IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL, CONSTRAINT [PK_V2_BREC_NMIStatusHistory] PRIMARY KEY CLUSTERED ([NMIStatusHistoryId] ASC), C

RE: [OT] Internal Developer Training

2016-02-08 Thread Andrew Coates (DX AUSTRALIA)
Hi Dave, How big is your team? One of the things we’ve seen work well is to have a regular “internal user group” every fortnight, put 2 hours aside over lunch or towards the end of the day, bring in pizza, and have someone from your team do a general technical presentation (45-60 min). Then ha

Any opinions on the Dell XPS 15 laptops?

2016-02-08 Thread 罗格雷格博士
? As per subject ? Regards, Greg Dr Greg Low 1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax SQL Down Under | Web: www.sqldownunder.com

Re: [OT] Internal Developer Training

2016-02-08 Thread DotNet Dude
+1 for code reviews. Plus technical brown bag sessions once a week or fortnight On Tue, Feb 9, 2016 at 2:09 PM, Stephen Price wrote: > I highly recommend doing code reviews. Not only does it improve the > quality of your code base, but its a two way learning avenue. The person > reviewing the au

Re: [OT] Internal Developer Training

2016-02-08 Thread Dave Walker
Hi sure thing. So team is made up of Web devs (html, CSS, and some js), automated testers etc who it was not a priority in company for them to have good coding standards. I disagree on this front and so want to improve their skillsets to be able to accomplish a wider variety of tasks. They are on b

RE: [OT] Internal Developer Training

2016-02-08 Thread Stephen Price
I highly recommend doing code reviews. Not only does it improve the quality of your code base, but its a two way learning avenue. The person reviewing the author’s code gets to understand what the code is doing. The Author thinks through their own reasoning while trying to accurately explain wha

Re: [OT] Internal Developer Training

2016-02-08 Thread Arjang Assadi
Hello " I've found that especially their C# skillsets are limited " , What would facilitate that finding? I have been wondering what makes one bad at language and still get to be a programmer? for example what is point of quiz code like this : try divide by 0 catch return 1 finally return

[OT] Internal Developer Training

2016-02-08 Thread Dave Walker
Hi all, I've recently taken over a new team which has a wide variety of technical skill from complete beginner to senior developer. Talking to the team I've found that especially their C# skillsets are limited and can be greatly improved. So far we've organised for everyone to have a pluralsight a

.NET MVC Developer Needed

2016-02-08 Thread Effigy Creative
Wondering if anyone might be interested or know someone who might be a good fit for a role we have. We are a small digital company in Brisbane. We do .NET MVC websites for clients and also maintain a few legal practice systems that are also .NET MVC. We are looking for either a full time or cont