显示标签为“wanna”的博文。显示所有博文
显示标签为“wanna”的博文。显示所有博文

2012年2月18日星期六

any good way to solve the daylight saving problem

i wanna show CST time in the report which are later than UTC time by 6 hours.SO we used dateADD(hh,-6,getUTSdate())

but the CST time will execute day light saving.

we r not sure where the server locates finally.

anyone kows some good ways to solve this issue?

Move the server to Arizona

{Just kidding }

|||

You could check the registry for the Keys:

ActiveTimeBias,

Bias

located at:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation

|||

As Arnie said we need to fetch few data from the Registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones here you can find all the timezones and the corresponding offset(Standard & Daylight) values.

If your program written in .NET then its simple to call these objects (note: the regeistry hold few binary information which can deserilaized as objcet, it is responsible to convert the given UTC time to standard/daylight time). You have to use P/Invoke to call collect these infomarion.

|||

Take a look at this and see if it might address your problem:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=28712

|||

In 2005, you can use the CLR functions to deal with this. In a blog a while back (http://drsql.spaces.live.com/Blog/cns!80677FB08B3162E4!1311.entry) I posted a solution to the problem of UTC to server time. It is basically using the Date type in VB.NET to do the conversion. As I recall, you can also specify the time zone on the date type as well.

2012年2月13日星期一

any advantage using an xml string as parameter

Hi,
I just wanna know the pros and cons while using XML string as argument to the procedure. Which one will be better in terms of security and performance.
regards
Aneesh R.
That depends on what you want to do with the parameter. Could you please be a bit more specific?
Best regards
Michael
"Aneesh" <aneesh.r@.eostek.com> wrote in message news:%23TD84aoiEHA.1356@.TK2MSFTNGP09.phx.gbl...
Hi,
I just wanna know the pros and cons while using XML string as argument to the procedure. Which one will be better in terms of security and performance.
regards
Aneesh R.
|||Hi,
Actually the application is E-Com. Is it better to use XML parameters for Password verification, UserRegistration etc. I need to consider both Performance and security
regards
Aneesh R.
That depends on what you want to do with the parameter. Could you please be a bit more specific?
Best regards
Michael
"Aneesh" <aneesh.r@.eostek.com> wrote in message news:%23TD84aoiEHA.1356@.TK2MSFTNGP09.phx.gbl...
Hi,
I just wanna know the pros and cons while using XML string as argument to the procedure. Which one will be better in terms of security and performance.
regards
Aneesh R.
|||Some items are dependent on your perf and scaling requirements:
- Are you planning on using OpenXML to unshred it? You may find that large XML documents may be problematic from a scaling point of view (>100kB). Small ones should be fine.
- Are you planning on using a T-SQL statement instead to parse a CSV format? That may be less efficient, but performance tests should be done.
Some items are general security items:
- Do you expose the stored proc parameter to arbitrary users? In that case there are some DoS scenarios that you may need to prepare for by checking for them on the mid-tier. If you have full control over the XML format that you send, then there is no more or less security than on any other data value that you send.
HTH
Michael
"Aneesh" <aneesh.r@.eostek.com> wrote in message news:O0iDzmyiEHA.3564@.TK2MSFTNGP10.phx.gbl...
Hi,
Actually the application is E-Com. Is it better to use XML parameters for Password verification, UserRegistration etc. I need to consider both Performance and security
regards
Aneesh R.
That depends on what you want to do with the parameter. Could you please be a bit more specific?
Best regards
Michael
"Aneesh" <aneesh.r@.eostek.com> wrote in message news:%23TD84aoiEHA.1356@.TK2MSFTNGP09.phx.gbl...
Hi,
I just wanna know the pros and cons while using XML string as argument to the procedure. Which one will be better in terms of security and performance.
regards
Aneesh R.