Showing posts with label ive. Show all posts
Showing posts with label ive. Show all posts

Wednesday, March 28, 2012

How to force a recompile on the stored procs?

I want to recompile all the stored procs in the database. I've tried
sp_recompile on all of them, but it simply marks them to be recompiled.
Thanks
They don't actually get recompiled until the next time they get called.
That is how it always works.
Andrew J. Kelly SQL MVP
"Frank Rizzo" <none@.none.com> wrote in message
news:e9d8DSUIGHA.3728@.tk2msftngp13.phx.gbl...
>I want to recompile all the stored procs in the database. I've tried
>sp_recompile on all of them, but it simply marks them to be recompiled.
> Thanks
|||DBCC FREEPROCCACHE clears the procedure cache and causes ad hoc queries to
be recompiled
if you want a stored procedure to be compiled you will need to use the WITH
RECOMPILE option
if you want to clear the data cache you will need to use DBCC
DROPCLEANBUFFERS
DBCC FLUSHPROCINDB: Used to clear out the stored procedure cache for a
specific database on a SQL Server, not the entire SQL Server. The database
ID number to be affected must be entered as part of the command.
"Frank Rizzo" <none@.none.com> wrote in message
news:e9d8DSUIGHA.3728@.tk2msftngp13.phx.gbl...
>I want to recompile all the stored procs in the database. I've tried
>sp_recompile on all of them, but it simply marks them to be recompiled.
> Thanks

Monday, March 19, 2012

How to find Rank(return Top 3 Country)

Hi All,
These are the records I've in my table. I need to return top 3 countries (rank) by Sales.
Record Date Country Sales
1 01.01.04 AU 80%
2 01.01.04 IN 92%
3 01.01.04 CH 50%
4 01.01.04 USA 75%
5 01.01.04 SG 25%
The result set should be:
Record Date Country Sales
2 01.01.04 IN 92%
1 01.01.04 AU 80%
4 01.01.04 USA 75%
How to write query for that?
Thanx
Rgds
K.Senthil Kumar
SELECT TOP 3 Record, Date, Country, Sales
FROM your_table
ORDER BY Sales DESC
Jacco Schalkwijk
SQL Server MVP
"K.Senthil Kumar" <K.Senthil Kumar@.discussions.microsoft.com> wrote in
message news:6EB6A9BF-7A6D-4B10-8F9D-CC9087946489@.microsoft.com...
> Hi All,
> These are the records I've in my table. I need to return top 3 countries
(rank) by Sales.
> Record Date Country Sales
> 1 01.01.04 AU 80%
> 2 01.01.04 IN 92%
> 3 01.01.04 CH 50%
> 4 01.01.04 USA 75%
> 5 01.01.04 SG 25%
>
> The result set should be:
> Record Date Country Sales
> 2 01.01.04 IN 92%
> 1 01.01.04 AU 80%
> 4 01.01.04 USA 75%
> How to write query for that?
> Thanx
> Rgds
> K.Senthil Kumar

Friday, March 9, 2012

How to find my rdl filesn the sql server?

Hello.
I have a few reports that I've published to my reportserver.
Now, my rdl files have been delete from my local computer.

Is there a way to find the rdl files on the server so I can download them to my local pc so I can continue working on them?

I have full access to the report server of course (and the the sql server itself).
I'm useing rs2005.

Thanks.

Hi there - this isnt documented very well, but you can actually just re-download the report directly from the report server

browse tohttp://reportingserver/reports

replace reportingserver with the name of your server.

click a folder - then a report to view it (like you were going to run it), then click the properties tab at the top.

About half way down the page, there will be an "edit" linkbutton, under the "Report Deffinition" heading, clicking that will give you the option to download the RDL

|||

That's great to know, because the rdl files do not exist on the reports server. They are in the database. I spent hours and hours trying to figure that one out. :(

|||

Hi Freakyuno.

Thanks for the reply. I get that question in a few other forum so I guss thats the way to do it :)

I also found a nice tool to do this (from the msdn ssrs forum):
http://sqldbatips.com/showarticle.asp?ID=62

Still didn't try it out my self but I read about it and it sound like another way.

Thanks.