We have a bit of a thing at work where, each week, someone will pose a few technical questions for the group. Whoever provides the first correct answer gets to choose the following week's victim.

This week it was my turn. So far the questions have all been entirely outside my area (Windows, VMWare licensing, Cisco stuff) so I figured it was fair to pose questions about Sendmail and Sybase.

Here they are, appropriately sanitised. I would expect my audience here to find the first very easy, but the second was an amusing thing to come across in the wild, and while all the information needed to solve it is right there -- if only as suitable Google-fodder -- it's kind of cute.

I'll post the answers in a couple of days if nobody figures it out before then.

Sendmail:

There are three machines on the same network. One is running sendmail and acting as a mail relay. Here is the sendmail meta-config.

(Consider yourself lucky I don’t throw the real config at you instead!)


VERSIONID(`$Id$')
OSTYPE(solaris2)dnl

define(`confPID_FILE',`/var/run/sendmail.pid')
define(`confCOPY_ERRORS_TO',`postmaster')
define(`SMART_HOST',`smtp:fw.fooa.com.au')

FEATURE(`use_cw_file',`/etc/mail/local-host-names')
FEATURE(`redirect')
FEATURE(`mailertable')
FEATURE(`virtusertable')
FEATURE(`genericstable')
FEATURE(`allmasquerade')
FEATURE(`masquerade_envelope')
FEATURE(`always_add_domain')
FEATURE(`use_ct_file')
FEATURE(`relay_entire_domain')
MASQUERADE_AS(`foo-hk.com')
MASQUERADE_DOMAIN(`foo-hk.com')
EXPOSED_USER(`root')

MAILER(local)
MAILER(smtp)


Here is one host trying to relay mail:


220 asahi.foo-hk.com ESMTP Sendmail 8.11.6/8.11.6; Tue, 18 May 2010 09:55:32 +0800 (CST)
helo sailor
250 asahi.foo-hk.com Hello trad02-hk.fooasiapac.com [10.136.1.155], pleased to meet you
mail from: <me@foo.com>
250 2.1.0 <me@foo.com>... Sender ok
rcpt to: <me@foo.com>
550 5.7.1 <me@foo.com>... Relaying denied


And here is the other:


220 asahi.foo-hk.com ESMTP Sendmail 8.11.6/8.11.6; Tue, 18 May 2010 09:56:20 +0800 (CST)
helo sailor
250 asahi.foo-hk.com Hello carlton.foo-hk.com [10.136.1.100], pleased to meet you
mail from: <me@foo.com>
250 2.1.0 <me@foo.com>... Sender ok
rcpt to: <me@foo.com>
250 2.1.5 <me@foo.com>... Recipient ok


Two questions:

1) Why does the second one work and the first one not?
2) Why would this be an incredibly stupid configuration to run on the Big Bad Internet?

Sybase

You support some very clever users. One of them comes to you and says they can’t create clustered indexes on one of the database servers. I have attached the code which was presented to demonstrate the problem.

Here is the output from the database server where this seems to work:

table_nameindex_namekeycntindex_columnstype
bananabanana_n_6731688511nClustered Index


And from the one where it does not:

table_nameindex_namekeycntindex_columnstype
bananabanana0>no columns>Heap
bananabanana_n_151307345422nNon Clustered Index


The question is: what’s going on?

The only Sybase-specific thing you need to know to be able to nut this one out is that defining a PRIMARY KEY in a table automatically creates a clustered index by default. And you can't change that default.

Read more... )

Profile

Abort, Rephrase, Ignore?

October 2011

S M T W T F S
       1
2 345678
9101112131415
16171819202122
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags