Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Friday, March 9, 2012

Method/Definition inside T-SQL

Did anybody hear if it's possible to define something like a
method/function/macrodefinition inside T-SQL? Particularly I have a few
SELECTs inside one T-SQL script and in most of them the WHERE CLAUSE is
absolutely same, but the retrieving results should be different and
according to these results the data flow should be different, so I can't
merge all these queries into one because the logic depends on the previous
results. The idea was to define this WHERE (...) as something to use it in
all queries inside this T-SQL. But I'm afraid that the standard T-SQL
doesn't allow us to do that because there are column names in this WHERE
clause. Temporary table? It will be huge and makes no sense.
Just D.Results from one table depending on results from another table sounds like a
join or union to me. Can you provide a more concrete example, e.g. table
structure, sample data, desired results?
"Just D." <no@.spam.please> wrote in message
news:nR6af.65318$WR2.43229@.fed1read03...
> Did anybody hear if it's possible to define something like a
> method/function/macrodefinition inside T-SQL? Particularly I have a few
> SELECTs inside one T-SQL script and in most of them the WHERE CLAUSE is
> absolutely same, but the retrieving results should be different and
> according to these results the data flow should be different, so I can't
> merge all these queries into one because the logic depends on the previous
> results. The idea was to define this WHERE (...) as something to use it in
> all queries inside this T-SQL. But I'm afraid that the standard T-SQL
> doesn't allow us to do that because there are column names in this WHERE
> clause. Temporary table? It will be huge and makes no sense.
> Just D.
>|||You could wrap your SQL inside a stored procedure, or even a user-defined
function. It's possible to parameterize either to make them flexible, and a
n
sp or udf is roughly equivalent to a method.
It's even possible to schedule a SQL script as a job; your DBA will be able
to help you with that.
Tell us a bit more about what you want to do and we'll try and help.
Damien
"Aaron Bertrand [SQL Server MVP]" wrote:

> Results from one table depending on results from another table sounds like
a
> join or union to me. Can you provide a more concrete example, e.g. table
> structure, sample data, desired results?
>
> "Just D." <no@.spam.please> wrote in message
> news:nR6af.65318$WR2.43229@.fed1read03...
>
>

Method to insert all record from Access table to SQL server one

Anyone know if there is method that can insert all record from a table
in an MS Access 2000 database to a table in MS SQL Server 2000
database by a SQL statement? (Therefore, I can execute the statement
in my program)

--
Posted via http://dbforums.comTry OPENROWSET. For example:

INSERT INTO MyTable
FROM OPENROWSET
(
'Microsoft.Jet.OLEDB.4.0',
'c:\MyDatabases\\MyDatabase.mdb';
'admin';
'',
'SELECT * FROM MyTable'
)

--
Hope this helps.

Dan Guzman
SQL Server MVP

--------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index...epartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--------

"king" <member29622@.dbforums.com> wrote in message
news:3341972.1063004486@.dbforums.com...
> Anyone know if there is method that can insert all record from a table
> in an MS Access 2000 database to a table in MS SQL Server 2000
> database by a SQL statement? (Therefore, I can execute the statement
> in my program)
>
> --
> Posted via http://dbforums.com|||Thanks for Dan Guzman!

I have tried your method, but I get returning error like:

"Ad hoc access to OLE DB provider 'Microsoft.Jet.OLEDB.4.0' has been
denied. You must access this provider through a linked server."

What can I do now?

--
Posted via http://dbforums.com|||Check out MSKB 327489:

http://support.microsoft.com/defaul...kb;en-us;327489

--
Hope this helps.

Dan Guzman
SQL Server MVP

--------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index...epartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--------

"king" <member29622@.dbforums.com> wrote in message
news:3345907.1063072590@.dbforums.com...
> Thanks for Dan Guzman!
>
> I have tried your method, but I get returning error like:
> "Ad hoc access to OLE DB provider 'Microsoft.Jet.OLEDB.4.0' has been
> denied. You must access this provider through a linked server."
>
> What can I do now?
>
> --
> Posted via http://dbforums.com

method to get more info for failed login

Hi,
We are currently tracking SQL Server login failures. But the SQL Server
error log only give infomation about which login has been attempted failed.
Is there a way to tell more info about this failed login, like from which
mechine the failed login came?
Thanks.
Hong Wang wrote:
> Hi,
> We are currently tracking SQL Server login failures. But the SQL
> Server error log only give infomation about which login has been
> attempted failed. Is there a way to tell more info about this failed
> login, like from which mechine the failed login came?
> Thanks.
Yes, you can set up a server-side trace to watch for the Audit Login
Failed event in the Security Audit category. The easiest way to do this
is define the server-side trace from Profiler and then have profiler
save the script for you. use the script in a stored procedure and set
the procedure to auto-start (sp_procoption) when the server starts. All
information is written to a local file onthe server, which is locked by
the trace. You can write a purge procedure that stops the trace and
merges the data from the flat file into table or just copies the file
and then restarts the trace. You have a lot of options here, but the
server-side trace is the way to go.
Use the following columns when defining the trace:
DatabaseID
StartTime
Error
ServerName
Success
TextData
ApplicationName
LoginName
ClientProcessID
SPID
Success will always be 0 for this event. HostName is not passed.
David Gugick
Imceda Software
www.imceda.com

method to get more info for failed login

Hi,
We are currently tracking SQL Server login failures. But the SQL Server
error log only give infomation about which login has been attempted failed.
Is there a way to tell more info about this failed login, like from which
mechine the failed login came?
Thanks.Hong Wang wrote:
> Hi,
> We are currently tracking SQL Server login failures. But the SQL
> Server error log only give infomation about which login has been
> attempted failed. Is there a way to tell more info about this failed
> login, like from which mechine the failed login came?
> Thanks.
Yes, you can set up a server-side trace to watch for the Audit Login
Failed event in the Security Audit category. The easiest way to do this
is define the server-side trace from Profiler and then have profiler
save the script for you. use the script in a stored procedure and set
the procedure to auto-start (sp_procoption) when the server starts. All
information is written to a local file onthe server, which is locked by
the trace. You can write a purge procedure that stops the trace and
merges the data from the flat file into table or just copies the file
and then restarts the trace. You have a lot of options here, but the
server-side trace is the way to go.
Use the following columns when defining the trace:
DatabaseID
StartTime
Error
ServerName
Success
TextData
ApplicationName
LoginName
ClientProcessID
SPID
Success will always be 0 for this event. HostName is not passed.
David Gugick
Imceda Software
www.imceda.com

method to get more info for failed login

Hi,
We are currently tracking SQL Server login failures. But the SQL Server
error log only give infomation about which login has been attempted failed.
Is there a way to tell more info about this failed login, like from which
mechine the failed login came?
Thanks.Hong Wang wrote:
> Hi,
> We are currently tracking SQL Server login failures. But the SQL
> Server error log only give infomation about which login has been
> attempted failed. Is there a way to tell more info about this failed
> login, like from which mechine the failed login came?
> Thanks.
Yes, you can set up a server-side trace to watch for the Audit Login
Failed event in the Security Audit category. The easiest way to do this
is define the server-side trace from Profiler and then have profiler
save the script for you. use the script in a stored procedure and set
the procedure to auto-start (sp_procoption) when the server starts. All
information is written to a local file onthe server, which is locked by
the trace. You can write a purge procedure that stops the trace and
merges the data from the flat file into table or just copies the file
and then restarts the trace. You have a lot of options here, but the
server-side trace is the way to go.
Use the following columns when defining the trace:
DatabaseID
StartTime
Error
ServerName
Success
TextData
ApplicationName
LoginName
ClientProcessID
SPID
Success will always be 0 for this event. HostName is not passed.
David Gugick
Imceda Software
www.imceda.com

Method to check the connection status of any Machine on Network

Hello All:
I need to know the connection status of any machine on domain i.e. I want to
check that whether the machine is on or off(alive/dead).
If anyone can tell then I shall be highly grateful
Sincerely,
Adnan KudiyaHi
Try sp_who 'active'
"adnankudiya" <adnankudiya.1nq9tv@.mail.codecomments.com> wrote in message
news:adnankudiya.1nq9tv@.mail.codecomments.com...
> Hello All:
> I need to know the connection status of any machine on domain i.e. I
> want to check that whether the machine is on or off(alive/dead).
> If anyone can tell then I shall be highly grateful
> Sincerely,
> Adnan Kudiya
>
> --
> adnankudiya
> ---
> Posted via http://www.codecomments.com
> ---
>|||Hi
I assume you mean database connection status and not just something like
pinging the client periodically to see if you get a reply? This may be
difficult as you can gather information about when a connection last did
something sysprocesses, but you don't know if they are connected or have
died. If your application has a set timeout and any activity has not happene
d
in that time, I guess you can assume they are dead.
John
"adnankudiya" wrote:

> Hello All:
> I need to know the connection status of any machine on domain i.e. I
> want to check that whether the machine is on or off(alive/dead).
> If anyone can tell then I shall be highly grateful
> Sincerely,
> Adnan Kudiya
>
> --
> adnankudiya
> ---
> Posted via http://www.codecomments.com
> ---
>|||I thought about this a while back and did not come up with a good solution.
One idea was to write a stored procedure - sp_ping and execute that on the
connection:
create proc sp_ping
as
return 0
go
or something trivial and similar - EG
SELECT DateNow = GetDate()
You could run that SP with a timeout that is quite low say 2 seconds.
- Tim
BTW: I do realise sp_ is not a good prefix.
"John Bell" <JohnBell@.discussions.microsoft.com> wrote in message
news:F32C6F92-2896-4F96-9FC5-49D846A434FF@.microsoft.com...
> Hi
> I assume you mean database connection status and not just something like
> pinging the client periodically to see if you get a reply? This may be
> difficult as you can gather information about when a connection last did
> something sysprocesses, but you don't know if they are connected or have
> died. If your application has a set timeout and any activity has not
> happened
> in that time, I guess you can assume they are dead.
> John
> "adnankudiya" wrote:
>

Method Refresh of object ICrystalReportViewer3 Failed

Hi,
I am using CR 8, vb6 and protected access2000 .mdb database. In report viewer I used refresh method. But it is raising the runtime error -"Method 'Refresh' of object 'ICrystalReportViewer3' Failed".
Please help me.
Regards
Ashish AnandDo verify database and see|||I have problem with : " Method 'Refresh' of object ICrystalReportViewer3 Failed "

I did verify database but it show error

Please help me, immediate|||I have problem with : " Method 'Refresh' of object ICrystalReportViewer3 Failed "

I did verify database but it show error

Please help me, immediate
What is the new error you got?|||I try verify database more time and I try create new report , but it show error : Method 'Refresh' of object ICrystalReportViewer3 Failed

I think sure : function 'refresh' in CrystalReport 8 was failed

I click button(Refresh) in report then it run ok (have picture: storm)
I don't understand this

Please explain me clearly

Method of providing standby

hi all, I am considering what should be the best way of implementing
the following requirement.

I've got a SQL2K production server. Now I've got another machine as the
standby machine for this server
so I'm thinking what method should I be using for this.

Should I be using log shipping or Replication? Or if it's replication,
what kind of replications
should it be?

I am thinking maybe snapshot replication can be just fine, right?Hi

Log shipping is the least intrusive as it requires no table changes.

Replication, IMHO, is a bad form of DR as you can not be guaranteed the time
lag between the primary and secondary being updated.

Regards
----------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mike@.epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

"New MSSQL DBA" <boscong88@.gmail.com> wrote in message
news:1121049035.357996.61730@.g49g2000cwa.googlegro ups.com...
> hi all, I am considering what should be the best way of implementing
> the following requirement.
> I've got a SQL2K production server. Now I've got another machine as the
> standby machine for this server
> so I'm thinking what method should I be using for this.
> Should I be using log shipping or Replication? Or if it's replication,
> what kind of replications
> should it be?
> I am thinking maybe snapshot replication can be just fine, right?|||After researching a bit, I agree with your suggestion.

But the problem is, the SQL2K is just a standard edition and can we
implement log shipping on it? I know log shipping is available only in
EE but is there a way to get it works in standard edition?|||I seem to remember that there's a trimmed down log shipping tool for
Standard Edition in the MSSQL Resource Kit. Or you could implement your
own solution - this article discusses MSSQL 7, but you could also apply
it to MSSQL 2000:

http://www.sql-server-performance.c...og_shipping.asp

Simon|||Thanks a lot for your help.

Method of EnumJob()

I use the method of EnumJob() in order to create an DataGridView in Visual Studio to put in it all the jobs of a server with three of their propertes!

So I use three columns!In first Column I put the "Name",in the second the "Status" and in the third the "Last Execution".

I found from the "SQL Server Books Online" that their DataPropertyNames are Name,CurrentRunStatus and LAstRunDate.

I used them and only the DataPropertyName : "Name" works!!!!!

What am I doing Wrong?

I would appreciate if somebody could help me or give me an idea

Seems that this is not implemeted in the SMO classes, the appropate lines shows:

public DateTime LastRunDate

{

get

{

return (DateTime) base.Properties.GetValueWithNullReplacement("LastRunDate");

}

}

Perhaps you might query the system tables directly.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

method of encrypting the pass of IP, PASS, USER to the SQL ?

Is there a method of encrypting the passing of IP, PASS, USER to the SQL
server without using VPN ?
Thanks
ScottAre you talking about encrypting it on the wire? Or storing it in a
databases?
--
----
----
-
Need SQL Server Examples check out my website
http://www.geocities.com/sqlserverexamples
"scott" <nospamscott@.yahoo.com> wrote in message
news:uSK0EDblEHA.2948@.TK2MSFTNGP11.phx.gbl...
> Is there a method of encrypting the passing of IP, PASS, USER to the SQL
> server without using VPN ?
> Thanks
> Scott
>|||"scott" <nospamscott@.yahoo.com> wrote in message
news:uSK0EDblEHA.2948@.TK2MSFTNGP11.phx.gbl...
> Is there a method of encrypting the passing of IP, PASS, USER to the SQL
> server without using VPN ?
In my experience and based on a few minute's sniffing, the login id and
client hostname always appear in clear text whatever the connection method.
For DB-Library SQL Server authenticated logins, the password is always clear
text.
For ADO SQL Server authenticated logins, the password is encrypted.
For Windows authentication (aka trusted authentication), passwords are not
passed with the TDS login packet: they are already passed encrypted at an
earlier stage.
Kind Regards, Howard

method of encrypting the pass of IP, PASS, USER to the SQL ?

Is there a method of encrypting the passing of IP, PASS, USER to the SQL
server without using VPN ?
Thanks
Scott
Are you talking about encrypting it on the wire? Or storing it in a
databases?
----
-
Need SQL Server Examples check out my website
http://www.geocities.com/sqlserverexamples
"scott" <nospamscott@.yahoo.com> wrote in message
news:uSK0EDblEHA.2948@.TK2MSFTNGP11.phx.gbl...
> Is there a method of encrypting the passing of IP, PASS, USER to the SQL
> server without using VPN ?
> Thanks
> Scott
>
|||"scott" <nospamscott@.yahoo.com> wrote in message
news:uSK0EDblEHA.2948@.TK2MSFTNGP11.phx.gbl...
> Is there a method of encrypting the passing of IP, PASS, USER to the SQL
> server without using VPN ?
In my experience and based on a few minute's sniffing, the login id and
client hostname always appear in clear text whatever the connection method.
For DB-Library SQL Server authenticated logins, the password is always clear
text.
For ADO SQL Server authenticated logins, the password is encrypted.
For Windows authentication (aka trusted authentication), passwords are not
passed with the TDS login packet: they are already passed encrypted at an
earlier stage.
Kind Regards, Howard

Method of connect machine?

I work with sql server 2000 and I want to make remote access with another computer .

I want to know what is method

This link will provide you the various ways to connect to SQL Server and access data for your .NET application.

Data -.NET Tutorials for SQL Data
http://dotnetjunkies.com/QuickStartv20/howto/doc/adoplus/xmlfromsqlsrv.aspx

|||I don't mean that I connect machine with sql server2000 by another|||

Please help us understand what you are attempting to accomplish -because it is confusing what you want.

I work with sql server 2000 and I want to make remote access with another computer .

|||

I will explan by another way:

I program database application with sql server 2000 Engine and want to publish it . how can I connect all other machine throw my application with database .

|||

The 'Tutorials' I offered above have a lot of good information about how to connect an Application to SQL Server.

Also, perhaps www.connectionstrings.com may be helpful.

|||

These links should get you started:

http://msdn.microsoft.com/vstudio/express/beginner/

http://msdn2.microsoft.com/en-us/library/ms345332.aspx

http://support.microsoft.com/kb/914277

Method of connect machine?

I work with sql server 2000 and I want to make remote access with another computer .

I want to know what is method

This link will provide you the various ways to connect to SQL Server and access data for your .NET application.

Data -.NET Tutorials for SQL Data
http://dotnetjunkies.com/QuickStartv20/howto/doc/adoplus/xmlfromsqlsrv.aspx

|||I don't mean that I connect machine with sql server2000 by another|||

Please help us understand what you are attempting to accomplish -because it is confusing what you want.

I work with sql server 2000 and I want to make remote access with another computer .

|||

I will explan by another way:

I program database application with sql server 2000 Engine and want to publish it . how can I connect all other machine throw my application with database .

|||

The 'Tutorials' I offered above have a lot of good information about how to connect an Application to SQL Server.

Also, perhaps www.connectionstrings.com may be helpful.

|||

These links should get you started:

http://msdn.microsoft.com/vstudio/express/beginner/

http://msdn2.microsoft.com/en-us/library/ms345332.aspx

http://support.microsoft.com/kb/914277

Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.CleanCurrentUserName'

my goal is to show reports in sharepoint services 3.0 and use this update Microsoft SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint

i have this problem:

After update my sql server 2005 to sp2 ctp with SQLServer2005SP2-KB921896-x86-ENU.exe and upate reporting services, try to::1010/reportserver" href="http://links.10026.com/?link=http://_3A1010/reportserver">http://<localserver>:1010/reportserver show the message.

An internal error occurred on the report server. See the error log for more details. (rsInternalError)

Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.CleanCurrentUserName()'.

i this problem is in the Microsoft.ReportingServices.Diagnostics.dll i see the method and in version (9.0.3027.0) dont have, and have in 9.0.1399, what i can do to this work rigth

Just try Microsoft.ReportingServices.Diagnostics.dll 9.0.3033.0 still dont working...........

More Details.........

<Header>
<Product>Microsoft SQL Server Reporting Services Version 9.00.3033.00</Product>
<Locale>en-US</Locale>
<TimeZone>GMT Standard Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__12_26_2006_12_16_30.log</Path>
<SystemName>CRM</SystemName>
<OSName>Microsoft Windows NT 5.2.3790 Service Pack 1</OSName>
<OSVersion>5.2.3790.65536</OSVersion>
</Header>
w3wp!library!1!26-12-2006-12:16:31:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.MissingMethodException: Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.set_CacheUserName(Boolean)'.
at Microsoft.ReportingServices.WebServer.Global.StartApp()
at Microsoft.ReportingServices.WebServer.Global.Application_BeginRequest(Object sender, EventArgs e)
End of inner exception stack trace
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing ConnectionType to '0' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing ProcessRecycleOptions to '0' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing EnableRemoteErrors to default value of 'False' because it was not specified in Server system properties.
w3wp!library!1!26-12-2006-12:16:31:: Unhandled exception was caught: System.MissingMethodException: Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.CleanCurrentUserName()'.
at Microsoft.ReportingServices.WebServer.Global.Application_EndRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
w3wp!library!1!26-12-2006-12:16:31:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.MissingMethodException: Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.CleanCurrentUserName()'.
at Microsoft.ReportingServices.WebServer.Global.Application_EndRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
End of inner exception stack trace

Dont understand what happend but i was forcing to work, modifing the web.config and them assum the 9.0.3033.00 and works fine ? now can make reports?

But what happen? i think the problem he was assuming 9.00.1399.00 not 9.0.3033.00..... but if anyone have a better explination, please report i lose more then a week to solve this problem.

Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.CleanCurrentUserNa

my goal is to show reports in sharepoint services 3.0 and use this update Microsoft SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint

i have this problem:

After update my sql server 2005 to sp2 ctp with SQLServer2005SP2-KB921896-x86-ENU.exe and upate reporting services, try to::1010/reportserver" href="http://links.10026.com/?link=http://_3A1010/reportserver">http://<localserver>:1010/reportserver show the message.

An internal error occurred on the report server. See the error log for more details. (rsInternalError)

Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.CleanCurrentUserName()'.

i this problem is in the Microsoft.ReportingServices.Diagnostics.dll i see the method and in version (9.0.3027.0) dont have, and have in 9.0.1399, what i can do to this work rigth

Just try Microsoft.ReportingServices.Diagnostics.dll 9.0.3033.0 still dont working...........

More Details.........

<Header>
<Product>Microsoft SQL Server Reporting Services Version 9.00.3033.00</Product>
<Locale>en-US</Locale>
<TimeZone>GMT Standard Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__12_26_2006_12_16_30.log</Path>
<SystemName>CRM</SystemName>
<OSName>Microsoft Windows NT 5.2.3790 Service Pack 1</OSName>
<OSVersion>5.2.3790.65536</OSVersion>
</Header>
w3wp!library!1!26-12-2006-12:16:31:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.MissingMethodException: Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.set_CacheUserName(Boolean)'.
at Microsoft.ReportingServices.WebServer.Global.StartApp()
at Microsoft.ReportingServices.WebServer.Global.Application_BeginRequest(Object sender, EventArgs e)
End of inner exception stack trace
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing ConnectionType to '0' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing ProcessRecycleOptions to '0' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!library!1!26-12-2006-12:16:31:: i INFO: Initializing EnableRemoteErrors to default value of 'False' because it was not specified in Server system properties.
w3wp!library!1!26-12-2006-12:16:31:: Unhandled exception was caught: System.MissingMethodException: Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.CleanCurrentUserName()'.
at Microsoft.ReportingServices.WebServer.Global.Application_EndRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
w3wp!library!1!26-12-2006-12:16:31:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.MissingMethodException: Method not found: 'Void Microsoft.ReportingServices.Diagnostics.UserUtil.CleanCurrentUserName()'.
at Microsoft.ReportingServices.WebServer.Global.Application_EndRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
End of inner exception stack trace

Dont understand what happend but i was forcing to work, modifing the web.config and them assum the 9.0.3033.00 and works fine ? now can make reports?

But what happen? i think the problem he was assuming 9.00.1399.00 not 9.0.3033.00..... but if anyone have a better explination, please report i lose more then a week to solve this problem.

Method not found: Void Microsoft.Reporting.WebForms.ReportViewer.Reset().

After using this Reset method on my asp RV control, now the page issues this error:

Exception Details:System.MissingMethodException: Method not found: 'Void Microsoft.Reporting.WebForms.ReportViewer.Reset()'.

I tried downloading ReportViewer.exe 2005 Redistr. from the MS site and installed at the server but still get same error.

Is there a newer redist somewhere that I haven't found? Or do I need to regasm some files?

Fixed it. Even after running the ReportViewer.exe 2005 Redistr. on the server machine, nothing changed. Looks like that Redist from MS is not up to date.

I ended up copying my local files(Common, WebForms) to the server then running gacutil -i on them. All better.

|||

I'm glad you posted a solution to this error. I'm having the exact same problem when I transfer my application to our Windows Server 2003 box. What local files exactly did you transfer? I searched for both "Common" and "WebForms" on my workstation but was unable to find them. Thanks!

Regards,
David Gardner

|||

These are the files you need to use Reset():

Microsoft.ReportViewer.Common.dll 8.0.50727.762

Microsoft.ReportViewer.WebForms.dll 8.0.50727.762

|||

Alright. I'm having the same problems.

I installed the Visual Studio 2k5 SP1 as well as the ReportingViewer.exe redist. and nothing seems to work

Everytime I try to call reportviewer.reset() in code, it gets a blue squiggly underneath it and says "reset is not a member of Microsoft.Reporting.WebForms.ReportViewer"

I have tried to remove the references to the Microsoft.Reporting dlls and adding them back in but nothing has worked.

Anything else I can try?

|||

I'm having the same problem.

How do I use the gacutil? Can someone please send me the syntax for it?

Basically on my development machine I have VS2005 SP1 installed. When i'm deploying my application onto the staging server, I keep getting the following error message:

method does not exist: 'Void Microsoft.Reporting.WebForms.ReportViewer.Reset()'

Someone please help!!!

|||

Eric,

Can you send me the syntax for the gacutil please?

I'm having the same issues as the others are having, where it works on my development machine but not on the staging server.

I'll appreciate it.

|||

Eric,

I am also facing the same problem. After installating report viewer redistributable service pack it got solved in local machine. But after uplaoding to server, an empty alert with no message is showing.

I have tried to copy local files i.e common & webform from c:\winnt\assembly, MMS but its not allowing. From where should i copy these files.

Thanks In Advance.

Regards,

Vijay Kumar

|||

A better solution is to install the ReportViewer 2005 Redistributable SP1:
Microsoft Report Viewer Redistributable 2005 SP1 (Upgrade)

If you haven't installed the original redistributable, you can do the full SP1 install:
Microsoft Report Viewer Redistributable 2005 SP1 (Full Installation)

Note: you'll need to install Windows Installer 3.1 on your server if you want to use the Upgrade patch.

Method not found:

I had just installed the reporting services beta which I
uninstalled and then installed the evaluation edition and
the service pack when I realized you can't apply the
service pack to the beta. Everything went ok during the
uninstall/re-install but then I get this error whenever I
click the Preview tab in the Report Designer:
Method not found: Void
Microsoft.DateWarehouse.Insterfaces.MenuCommandEx.set_In
(System.Object[]).
Anyone know what this is and how to resolve it. I have
the .NET Framework 1.1 and VS 2003, as well SQL Server
Enterprise Edition with SP3 as well as IIS 5.0 on Windows
2000 Advanced Server.
when I checked event viewer I got:
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 101
Date: 7/9/2004
Time: 2:13:19 PM
User: N/A
Computer: ''
Description:
The server was unable to add the virtual root '/Scripts'
for the directory 'c:\inetpub\scripts' due to the
following error: The system cannot find the file
specified. The data is the error code.
For additional information specific to this message please
visit the Microsoft Online Support site located at:
http://www.microsoft.com/contentredirect.asp.
Data:
0000: 02 00 00 00 ...
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 101
Date: 7/9/2004
Time: 2:13:19 PM
User: N/A
Computer: SMS-AS08
Description:
The server was unable to add the virtual
root '/IISSamples' for the
directory 'c:\inetpub\iissamples' due to the following
error: The system cannot find the file specified. The
data is the error code.
For additional information specific to this message please
visit the Microsoft Online Support site located at:
http://www.microsoft.com/contentredirect.asp.
Data:
0000: 02 00 00 00 ...
Thanks,
BryanWhen upgrading from Beta 2, you need to remove
Microsoft.DataWarehouse.Interfaces from the GAC, as we no longer install it
there. If that turns out to be impossible, then you should drag the copy
from "%Program Files%\Microsoft SQL Server\80\Tools\Report Designer" into
the GAC.
--
Albert Yen
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bryan Murtha" <bmurtha@.corp.sms.ac> wrote in message
news:29fc401c465fd$f9da2190$a501280a@.phx.gbl...
> I had just installed the reporting services beta which I
> uninstalled and then installed the evaluation edition and
> the service pack when I realized you can't apply the
> service pack to the beta. Everything went ok during the
> uninstall/re-install but then I get this error whenever I
> click the Preview tab in the Report Designer:
> Method not found: Void
> Microsoft.DateWarehouse.Insterfaces.MenuCommandEx.set_In
> (System.Object[]).
> Anyone know what this is and how to resolve it. I have
> the .NET Framework 1.1 and VS 2003, as well SQL Server
> Enterprise Edition with SP3 as well as IIS 5.0 on Windows
> 2000 Advanced Server.
> when I checked event viewer I got:
> Event Type: Warning
> Event Source: W3SVC
> Event Category: None
> Event ID: 101
> Date: 7/9/2004
> Time: 2:13:19 PM
> User: N/A
> Computer: ''
> Description:
> The server was unable to add the virtual root '/Scripts'
> for the directory 'c:\inetpub\scripts' due to the
> following error: The system cannot find the file
> specified. The data is the error code.
> For additional information specific to this message please
> visit the Microsoft Online Support site located at:
> http://www.microsoft.com/contentredirect.asp.
> Data:
> 0000: 02 00 00 00 ...
> Event Type: Warning
> Event Source: W3SVC
> Event Category: None
> Event ID: 101
> Date: 7/9/2004
> Time: 2:13:19 PM
> User: N/A
> Computer: SMS-AS08
> Description:
> The server was unable to add the virtual
> root '/IISSamples' for the
> directory 'c:\inetpub\iissamples' due to the following
> error: The system cannot find the file specified. The
> data is the error code.
> For additional information specific to this message please
> visit the Microsoft Online Support site located at:
> http://www.microsoft.com/contentredirect.asp.
> Data:
> 0000: 02 00 00 00 ...
>
> Thanks,
> Bryan
>

Method for Archiving Rows

I need to archive some rows from a production database. Any ideas on good
principles to follow ? I would absolutlely want to ensure that each row is
properly archived prior to deleting it from the production table. Anyone
have ideas that they used and wish to share ?
ThanksRob wrote:
> I need to archive some rows from a production database. Any ideas on go
od
> principles to follow ? I would absolutlely want to ensure that each row
is
> properly archived prior to deleting it from the production table. Anyone
> have ideas that they used and wish to share ?
Do the archive process during "off-hours."
Wrap the append (to the archive) and delete (from the production db)
statements in BEGIN TRANS and COMMIT. Use ROLLBACK if an error occurs.
See the BOL for more info.
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)|||Thanks for responding...
Something I was thinking about was linking the key from the "archive db" to
the Key to the "poduction db" and updating a flag on the prodcution. This
would ensure that the row existed in the Archive prior to deleting from
production.
"MGFoster" <me@.privacy.com> wrote in message
news:0F1Yd.6545$cN6.2489@.newsread1.news.pas.earthlink.net...
> Rob wrote:
> Do the archive process during "off-hours."
> Wrap the append (to the archive) and delete (from the production db)
> statements in BEGIN TRANS and COMMIT. Use ROLLBACK if an error occurs.
> See the BOL for more info.
> --
> MGFoster:::mgf00 <at> earthlink <decimal-point> net
> Oakland, CA (USA)|||Rob wrote:
> Thanks for responding...
> Something I was thinking about was linking the key from the "archive db" t
o
> the Key to the "poduction db" and updating a flag on the prodcution. This
> would ensure that the row existed in the Archive prior to deleting from
> production.
--BEGIN PGP SIGNED MESSAGE--
Hash: SHA1
You could update that flag after the archive process runs, but, again,
that can be done inside the transaction. You don't need to "link"
anything between the archive & production. IOW, the production table(s)
would have an "Archived" column. The archive process would only select
rows that do not have the Archived column set to true.
An example of the process:
begin tran
insert into archive_table (<column list> )
select <column list>
from table_name
where archived = 0 -- False will be zero & True will be 1
-- the default for archived should be zero
if @.@.error <> 0 goto err_
update table_name
set archived = 1
where archived = 0
if @.@.error <> 0 goto err_
commit
goto exit_
err_:
rollback
exit_:
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
--BEGIN PGP SIGNATURE--
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/ AwUBQjCzOYechKqOuFEgEQJu+gCePIIvgGgSjDh3
9lQY0uy3JVrybfYAoJTV
xPUUKn7k08dcCAr42/VJI7zf
=pp/t
--END PGP SIGNATURE--|||I just copy the records to the ARchive DB and then my purge solution does an
inner join to the Archive table (Or WHERE Exists()) to ensure existence
prior to deletion from prod.
works like a champ as long as proper indexes are in place, etc.
GAJ

Method EnumDatabaseMapping on Login SMO object takes 3 minutes

Hi,

The EnumDatabaseMapping call below takes upto 3 minutes on some SQL Servers whereas it takes hardly any time at all on others. What may cause such a long delay?

Regards,
Joginder Nahil
www.starprint2000.com

Private Sub OutputUserMapping(ByVal oLogin As Microsoft.SqlServer.Management.Smo.Login)

Dim colDatabaseMapping() As DatabaseMapping
colDatabaseMapping = oLogin.EnumDatabaseMappings

' Rest of the code has been deleted

End sub

Hi Joginder,

EnumDatabaseMappings is an expensive operation. SMO issues queries that iterate over all databases on the server and stores intermediate results in a temporary table. This might take time for a server with many databases and users, especially if under heavy load.

You can find out more by running SQL Server Profiler and inspecting the queries that are being sent to the server.

Arur Laksberg
SQL Server Team
Microsoft

|||

Hi Artur,

I am inclined to say that 3 minutes is a very long time in computer processing time (BTW my SQL Server is on the same computer as running the application and has 1GB memory + 3.6 Pentium 4 Processor+ there is nothing much else running) to enumerate just three databases AdventureWorks, Pubs and Northwind.

Regards,

Joginder Nahil
www.starprint2000.com

method call works from .Net form and not from SQL CLR - EnterpriseLibrary used

Hello

I created a wrapper class for a function, and exposed it through CLR. However, if I call this function form SQL it blows up but if I call directly from a test Windows Form the call works fine.

The blow up is related to EnterpriseLibrary.Data, where my Queue class uses that library to do all data access call ops

Here's my wrapper class:

namespace inlineCLRsql{

public static class Wrapper{

public static void CallQueueEntry(int queueId, int deskNo, int missed){

inLineLib.Queue oQueue;

inLineLib.QueueEntry oQueueEntry;

oQueue = new inLineLib.Queue(queueId);

oQueueEntry = oQueue.callQueueEntry(deskNo, false);

Microsoft.SqlServer.Server.SqlContext.Pipe.Send(oQueueEntry.queueNum.ToString());

}

}

And this is my CLR SQL creation code:

CREATE PROC sp_CallQueueEntry

@.queueId int,

@.deskNo int,

@.missed int

AS

EXTERNAL NAME inLineLib.[inlineCLRsql.Wrapper].CallQueueEntry

GO

sp_CallQueueEntry 4,2,0

Here is what I get as a result

System.NullReferenceException: Object reference not set to an instance of an object.

System.NullReferenceException:

at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseConfigurationView.get_DefaultName()

at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseMapper.MapName(String name, IConfigurationSource configSource)

at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy.BuildUp(IBuilderContext context, Type t, Object existing, String id)

at Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)

at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)

at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp[TTypeToBuild](IReadWriteLocator locator, String idToBuild, Object existing, PolicyList[] transientPolicies)

at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IReadWriteLocator locator, IConfigurationSource configurationSource)

at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp[T](IConfigurationSource configurationSource)

at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.NameTypeFactoryBase`1.CreateDefault()

at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase()

at inLineLib.Queue.getNextQueueEntry(Int32 servedBy)

at inLineLib.Queue.callQueueEntry(Int32 servedBy, Boolean callMissed)

at inlineCLRsql.Wrapper.CallQueueEntry(Int32 queueId, Int32 deskNo, Int32 missed)

What can I do to fix this?

Cheers

M

This is almost a total guess - I've never used EntLib. However, I found some one else hit this issue when EntLib was not able to find the database in the application config file: http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21833370.html

This is likely to be the same problem you're facing. I believe you can solve this by running the Enterprise Library Config tool and specify your config file as sqlservr.exe.config in the same directory as sqlservr.exe. Or you can try copying and renaming the config file your Windows Form app is using.

Hope this works.

Steven