2012年3月22日星期四
Anybody know how to solve this error when accessing a linked server that isn't a SQL data
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476[ /url]
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot obtain the schema rowset "DBSCHEMA_CATALOGS" for OLE DB provider "SQL Server" for linked server "(null)". The provider supports the interface, but returns a failure code when it is used. (Microsoft SQL Server, Error: 7311)
For help, click: [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00 .3042&EvtSrc=MSSQLServer&EvtID=7311&LinkId=20476[/url]
BUTTONS:
OK
The links take you to the "We're sorry page," which doesn't help.
Thanks,
Tony
Tony
Could be a bug
http://connect.microsoft.com/SQLServer/feedback/Validation.aspx?FeedbackID=261012
"Tony" <tsheehan@.tji-holdings.com> wrote in message news:ekk$S$cbIHA.4172@.TK2MSFTNGP02.phx.gbl...
TITLE: Microsoft SQL Server Management Studio
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476[ /url]
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot obtain the schema rowset "DBSCHEMA_CATALOGS" for OLE DB provider "SQL Server" for linked server "(null)". The provider supports the interface, but returns a failure code when it is used. (Microsoft SQL Server, Error: 7311)
For help, click: [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00 .3042&EvtSrc=MSSQLServer&EvtID=7311&LinkId=20476[/url]
BUTTONS:
OK
The links take you to the "We're sorry page," which doesn't help.
Thanks,
Tony
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.