Thursday, March 29, 2012

Do SQL Server's developers even know what the datetime datatype is?

Just a bit of a rant here...
I've marveled for a long time that SQL Server developers chose to store
SQL Agent job history dates in in the sysjobhistory table as two
seperate columns in integer format instead of a single datetime column.
I mean come on.
Then today I discovered that the Windows 2003 Perfmon stores dates as
char(24) when the data is logged to a SQL Server database. CHAR(24)?!?!
Char (24) won't even do an explicit conversion to datetime. You have to
only grab the first 23 characters.
I think Bill G. needs to send around an internal memo reminding
everyone about the datetime data type.
/end rantI wish Gert had included some background on why this decision came about,
but otherwise a great resource:
http://www.sqldev.net/sqlagent/SQLAgentDateTime.htm
As for Perfmon, isn't it possible it was formatted to CHAR(24) because it
usually logs to a file, and the file needs to be understood by more systems
than just SQL Server?
<pshroads@.gmail.com> wrote in message
news:1164659681.627479.274240@.h54g2000cwb.googlegroups.com...
> Just a bit of a rant here...
> I've marveled for a long time that SQL Server developers chose to store
> SQL Agent job history dates in in the sysjobhistory table as two
> seperate columns in integer format instead of a single datetime column.
> I mean come on.
> Then today I discovered that the Windows 2003 Perfmon stores dates as
> char(24) when the data is logged to a SQL Server database. CHAR(24)?!?!
> Char (24) won't even do an explicit conversion to datetime. You have to
> only grab the first 23 characters.
> I think Bill G. needs to send around an internal memo reminding
> everyone about the datetime data type.
> /end rant
>

Do SQL Server's developers even know what the datetime datatype is?

Just a bit of a rant here...
I've marveled for a long time that SQL Server developers chose to store
SQL Agent job history dates in in the sysjobhistory table as two
seperate columns in integer format instead of a single datetime column.
I mean come on.
Then today I discovered that the Windows 2003 Perfmon stores dates as
char(24) when the data is logged to a SQL Server database. CHAR(24)?!?!
Char (24) won't even do an explicit conversion to datetime. You have to
only grab the first 23 characters.
I think Bill G. needs to send around an internal memo reminding
everyone about the datetime data type.
/end rantI wish Gert had included some background on why this decision came about,
but otherwise a great resource:
http://www.sqldev.net/sqlagent/SQLAgentDateTime.htm
As for Perfmon, isn't it possible it was formatted to CHAR(24) because it
usually logs to a file, and the file needs to be understood by more systems
than just SQL Server?
<pshroads@.gmail.com> wrote in message
news:1164659681.627479.274240@.h54g2000cwb.googlegroups.com...
> Just a bit of a rant here...
> I've marveled for a long time that SQL Server developers chose to store
> SQL Agent job history dates in in the sysjobhistory table as two
> seperate columns in integer format instead of a single datetime column.
> I mean come on.
> Then today I discovered that the Windows 2003 Perfmon stores dates as
> char(24) when the data is logged to a SQL Server database. CHAR(24)?!?!
> Char (24) won't even do an explicit conversion to datetime. You have to
> only grab the first 23 characters.
> I think Bill G. needs to send around an internal memo reminding
> everyone about the datetime data type.
> /end rant
>

Do SQL Server 2005/CLR Triggers support .config Files?

Does anyone know if it's possible to use the standard .config file within a CLR Trigger to read properties via the System.Configuration namespace

I guess it's not possible because the CLR Trigger needs to be compiled as an assembly which is hosted by SQL Server

Thanks

Jason

Hi,

http://groups.google.de/group/microsoft.public.sqlserver.programming/browse_frm/thread/6d635c2cd23fed7

CLR stuff in SQL Server does not work like those know from "normal" applications. Although you can use the Configuration class to load a configuration somewhere stored on disk, you have to keep in mind, that every namespace / class that you use with are not approved as safe will lower down your security, because you have to mark them as unsafe / external access.

Perhaps any other posters has some other experiences about that.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||Hi,
I think the “CLR Triggers for SQL Server 2005” article on
http://aspalliance.com/1273_CLR_Triggers_for_SQL_Server_2005
may be helpful in this discussion.

This popular white paper is written by a software engineer from our organization Mindfire Solutions (http://www.mindfiresolutions.com).

I hope you find it useful!

Cheers,
Byapti

DO SQL perf counters intepret sysperfinfo internally ?

When SQL Server counters are used within perfmon, do they read off of values
in sysperfinfo and if so, what populates sysperfinfo and when does it run ?
And if there is no connection at all, then what is the use of sysperfinfo
and when can one use it and what can i make of it ?Sysperfinfo gets its data from the SAME sources as perfmon... Sysperfinfo is
used as the source for SQL Agent Performance Alerts..YOu can also use it for
your purposes but the formatting etc is strange... If I am not mistaken
there may be a white paper ( search on MS web site ) which describes how to
use sysperfinfo stats.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:ei0$fAuiDHA.1940@.TK2MSFTNGP09.phx.gbl...
> When SQL Server counters are used within perfmon, do they read off of
values
> in sysperfinfo and if so, what populates sysperfinfo and when does it run
?
> And if there is no connection at all, then what is the use of sysperfinfo
> and when can one use it and what can i make of it ?
>|||Are you saying that the SQL Agent perf alerts are based upon the values in
sysperfino ? If so , then the source to perfmon\SQL Agent Perf counters is
sysperfino ..right ?
And the source to sysperfinfo is a stored proc that runs every couple of
secs I beleive ..sp_sqlagent_get_perf_counters ...
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:OA1LvN0iDHA.888@.TK2MSFTNGP09.phx.gbl...
> Sysperfinfo gets its data from the SAME sources as perfmon... Sysperfinfo
is
> used as the source for SQL Agent Performance Alerts..YOu can also use it
for
> your purposes but the formatting etc is strange... If I am not mistaken
> there may be a white paper ( search on MS web site ) which describes how
to
> use sysperfinfo stats.
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Computer Education Services Corporation (CESC), Charlotte, NC
> www.computeredservices.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:ei0$fAuiDHA.1940@.TK2MSFTNGP09.phx.gbl...
> > When SQL Server counters are used within perfmon, do they read off of
> values
> > in sysperfinfo and if so, what populates sysperfinfo and when does it
run
> ?
> > And if there is no connection at all, then what is the use of
sysperfinfo
> > and when can one use it and what can i make of it ?
> >
> >
>|||The source for the (virtual) table sysperfinfo is a piece of shared
memory that is maintained all over the place in the sqlserver code.
Querying sysperfinfo, perfmon/sysmon refreshes and other actions (like
agent alerts) use that piece of shared memory as their source of
information.
"sql" <sql@.hotmail.com> wrote in message news:<OoFt271iDHA.1688@.TK2MSFTNGP12.phx.gbl>...
> Are you saying that the SQL Agent perf alerts are based upon the values in
> sysperfino ? If so , then the source to perfmon\SQL Agent Perf counters is
> sysperfino ..right ?
> And the source to sysperfinfo is a stored proc that runs every couple of
> secs I beleive ..sp_sqlagent_get_perf_counters ...
>
> "Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
> news:OA1LvN0iDHA.888@.TK2MSFTNGP09.phx.gbl...
> > Sysperfinfo gets its data from the SAME sources as perfmon... Sysperfinfo
> is
> > used as the source for SQL Agent Performance Alerts..YOu can also use it
> for
> > your purposes but the formatting etc is strange... If I am not mistaken
> > there may be a white paper ( search on MS web site ) which describes how
> to
> > use sysperfinfo stats.
> >
> > --
> > Wayne Snyder, MCDBA, SQL Server MVP
> > Computer Education Services Corporation (CESC), Charlotte, NC
> > www.computeredservices.com
> > (Please respond only to the newsgroups.)
> >
> > I support the Professional Association of SQL Server (PASS) and it's
> > community of SQL Server professionals.
> > www.sqlpass.org
> >
> >
> > "Hassan" <fatima_ja@.hotmail.com> wrote in message
> > news:ei0$fAuiDHA.1940@.TK2MSFTNGP09.phx.gbl...
> > > When SQL Server counters are used within perfmon, do they read off of
> values
> > > in sysperfinfo and if so, what populates sysperfinfo and when does it
> run
> ?
> > > And if there is no connection at all, then what is the use of
> sysperfinfo
> > > and when can one use it and what can i make of it ?
> > >
> > >
> >
> >sql

Do SQL Analysis service needs a separate database ?

As Adventure Works have Adventure works DW as a separate database, Do we also needs to create new database such as while working with "pubs" or any other do we need to create pubs DW separately or pubs will be sufficient for our working for sql analysis ?

Hi,

you should to create a new DW database (it′s a best pratice), but it′s not mandatory.

If you have a small production database, you will not percept the performance degradation...

So to create a DW (Dataware house) can be good to isolate OLAP from OLTP.

Regards

Do SQL 7 CALs count for a SQL 2000 install?

Hi,
I have a client with SQL 7 and they need to go to SQL 2000 via an upgrade to
run their now updated app. Do their existing SQL 7 CALs allow then to access
the SQL 2000 server or do they have to buy all the CALs again. Or maybe there
is some upgrade price.
Their vendor has priced 60 SQL 200 CALs at £8,100.00 - which isnt too cheap(!)
Thanks.From the server EULA:
"Any CAL must have the same or later version number than the corresponding
version number of the Server Software being used."
http://www.microsoft.com/sql/howtobuy/default.asp
Ask the vendor about upgrade pricing.
--
David Portas
SQL Server MVP
--

Do SQL 7 CALs count for a SQL 2000 install?

Hi,
I have a client with SQL 7 and they need to go to SQL 2000 via an upgrade to
run their now updated app. Do their existing SQL 7 CALs allow then to access
the SQL 2000 server or do they have to buy all the CALs again. Or maybe ther
e
is some upgrade price.
Their vendor has priced 60 SQL 200 CALs at £8,100.00 - which isnt too cheap
(!)
Thanks.From the server EULA:
"Any CAL must have the same or later version number than the corresponding
version number of the Server Software being used."
http://www.microsoft.com/sql/howtobuy/default.asp
Ask the vendor about upgrade pricing.
David Portas
SQL Server MVP
--