Showing posts with label below. Show all posts
Showing posts with label below. Show all posts

Thursday, March 29, 2012

Count Records Help

Hello I have the following table below. I need to create a query that will list conference, avg. attendance, avg. winning percentage for the current year grouped by conference. For winning percentage I'm assuming I would need to count occurrnces of self score > opp_score then divide that by counting the number of dates entries within that year? ..Dont have a clue on how to express this query - Thanks for any help or suggestions

CREATE TABLE HOMEGAME
(school VARCHAR2(30),
hdate DATE,
opponent VARCHAR2(30),
attendance NUMBER(6),
self_score NUMBER(3),
opp_score NUMBER(3),
self_injuries NUMBER(3),
opp_injuries NUMBER(3));Although I dont have the exact answer are you trying to do the following

CONF ATT SELF_SCORE OPP_SCORE
---- ---- ---- ----
A 5000 3 8
A 9500 2 1
A 6700 5 2
B 12000 9 6
B 8000 2 2
B 16000 3 7

select conf, count(*) / (select count(*) from table)
from table
where self_score > opp_score
group by conf;

This query doesn't work because you need to group the divided query into the same group as the outer query. I would also like to know how this is done.|||Greetings,

I now have the answer :),

conf = conference

select s1.conf, avg_att As "Avg. Att", (wins / total) * 100 As "% Won"
from
(select conf, count(*) As wins
from help
where self_score > opp_score
group by conf) s1,
(select conf, avg(att) As avg_att, count(*) As total
from help
group by conf) s2
where s1.conf = s2.conf;

The average attendance is for the entire conference group regardless of whether or not they won. If you only want average attendance for the games they played then select the avg(att) in the top from-query as opposed to the second.

The sample table I used for this is shown below,

SQL> select * from help;

CONF ATT SELF_SCORE OPP_SCORE
---- ---- ---- ----
A 5000 3 8
A 9500 2 1
A 6700 5 0
B 12000 4 6
B 8000 2 0
B 16000 3 7

And the results generated from the answer query

CONF Avg. Att % Won
---- ---- ----
A 7066.66667 66.6666667
B 12000 33.3333333

Cheers.|||- Thanks for your reply, It appears I left some info out, Ive been trying to adapt what you replied with but still no dice.

I am including the tables and data below. There are some null values as I am only inputing sample data that is needed in the reports.

CREATE TABLE SCHOOL
(school VARCHAR2(30),
conference VARCHAR2(25),
stadium_size NUMBER(6),
ticket_price NUMBER(4,2),
in_state_players NUMBER(2),
outstate_players NUMBER(2),
scholarships NUMBER(2),
graduate NUMBER(20));

INSERT INTO school VALUES
('Indiana Univ.', 'Big Ten', 53000, null, null, null, null, null);
INSERT INTO school VALUES
('Ohio State Univ.', 'Big Ten', 104000, null, null, null, null, null);
INSERT INTO school VALUES
('Penn State Univ.', 'Independent', 80000, null, null, null, null, null);
INSERT INTO school VALUES
('Univ. of Pittsburgh', 'Independent', 51000, null, null, null, null, null);
INSERT INTO school VALUES
('Pondunk Univ.', 'Independent', 44000, null, null, null, null, 35);
INSERT INTO school VALUES
('Violator Univ.', 'Independent', 39000, null, null, null, null, 47);

CREATE TABLE SCHOOL_INCIDENTS
(school VARCHAR2(30),
idate DATE,
incident_code NUMBER(5));

INSERT INTO school_incidents VALUES
('Indiana Univ.',null, 17983);
INSERT INTO school_incidents VALUES
('Ohio State Univ',null, 12891);
INSERT INTO school_incidents VALUES
('Penn State Univ.',null, 17250);

CREATE TABLE HOMEGAME
(school VARCHAR2(30),
hdate DATE,
opponent VARCHAR2(30),
attendance NUMBER(6),
self_score NUMBER(3),
opp_score NUMBER(3),
self_injuries NUMBER(3),
opp_injuries NUMBER(3));

INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 46000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 45000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 44000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 43000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 42000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 41000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 40000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 39000, 0, 7, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 38000, 0, 7, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 37000, 0, 7, null, null);
INSERT INTO homegame VALUES
('Indiana Univ.', null, null, 36000, 0, 7, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 51000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 50000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 49000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 48000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 47000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 46000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 45000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 44000, 7, 0, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 43000, 0, 7, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 42000, 0, 7, null, null);
INSERT INTO homegame VALUES
('Penn State Univ.', null, null, 41000, 0, 7, null, null);

Below is the basic query I have been working from. I will need to add a column inbetween conference and attendance for "WINNNING PERCENTAGE" which would be calcuated for self_score & opp_score in homegame
then average the attendance column and count the recruiting incidents per conference. The final output should be 2 rows listing the calculated data.

SELECT ALL SCHOOL.CONFERENCE, HOMEGAME.ATTENDANCE "AVG ATTENDANCE", SCHOOL_INCIDENTS.INCIDENT_CODE "RECRUITING INCIDENTS"
FROM SCHOOL, SCHOOL_INCIDENTS, HOMEGAME
WHERE ((SCHOOL.SCHOOL = HOMEGAME.SCHOOL)
AND (HOMEGAME.SCHOOL = SCHOOL_INCIDENTS.SCHOOL));

CONFERENCE AVG ATTENDANCE RECRUITING INCIDENTS
-------- ----- -------
Big Ten 46000 17983
Big Ten 45000 17983
Big Ten 44000 17983
Big Ten 43000 17983
Big Ten 42000 17983
Big Ten 41000 17983
Big Ten 40000 17983
Big Ten 39000 17983
Big Ten 38000 17983
Big Ten 37000 17983
Big Ten 36000 17983

CONFERENCE AVG ATTENDANCE RECRUITING INCIDENTS
-------- ----- -------
Independent 51000 17250
Independent 50000 17250
Independent 49000 17250
Independent 48000 17250
Independent 47000 17250
Independent 46000 17250
Independent 45000 17250
Independent 44000 17250
Independent 43000 17250
Independent 42000 17250
Independent 41000 17250

Tuesday, March 27, 2012

Count need to bring back a zero when no matches

I am trying to do a calculation with the below query and it works long as d.closegoal has values and d1.opengoal has values but the problem is when there is no count for either, I need to bring back a value of zero if there are no matches. Since I am using it in an outer select statement for a calculation it not bringing anything back because of no matches.

This is my code:

select d.lwia,

cast((d.closegoal + d1.opengoal) as float)denominator

from

(

select yg.lwia,

cast(count(yg.appid)as float) closegoal

from dbo.wiayouthgoals yg

where yg.lwia = @.RWB

-- Attained a goal in the timeframe timely or untimely

and ((convert(smalldatetime, convert(varchar(10),yg.youthattaindate, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),yg.youthattaindate, 101)) <= @.EndDte) -- Parm date for end of time frame needed

-- Goal due but not attained

or (convert(smalldatetime, convert(varchar(10),yg.youthgoalanniversary, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),yg.youthgoalanniversary, 101)) <= @.EndDte -- Parm date for end of time frame needed

and yg.youthattaingoal <> 1))

group by yg.lwia

)d,

(

-- Closure with open goal

select cast(count(yg.appid)as float) opengoal

from dbo.tbl_caseclosure cc,

dbo.wiayouthgoals yg

where yg.appid = cc.col_idnum

and convert(smalldatetime, convert(varchar(10),cc.col_closuredate, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),cc.col_closuredate, 101)) <= @.EndDte -- Parm date for end of time frame needed

and yg.youthattaindate is null

and yg.lwia = @.RWB

group by yg.lwia

)d1

)d2

I'd be tempted to put your results into a temptable or table variable and add the value 0 if the insert adds 0 rows.

eg

Code Snippet

DECLARE @.Table TABLE (Iwia INT, Denominator FLOAT)

INSERT INTO @.Table

SELECT......

IF @.@.ROWCOUNT = 0

INSERT INTO @.Table
VALUES (0, 0)

SELECT Iwia, Denominator
FROM @.Table

HTH!

|||

Use ISNULL(column, 0) around your two arguments.

e.g.

Code Snippet

select d.lwia,

cast((ISNULL(d.closegoal, 0) + ISNULL(d1.opengoal, 0)) as float)denominator

...

|||

Try this

SELECT d.lwia

--, cast((d.closegoal + d1.opengoal) as float)denominator

, SUM(goal) as denominator

FROM (

SELECT yg.lwia

,0 as goal

from dbo.wiayouthgoals yg

where yg.lwia = @.RWB

--==========

UNION ALL

--==========

SELECT yg.lwia

,IsNull(cast(count(yg.appid)as int),0) as goal-- closegoal

from dbo.wiayouthgoals yg

where yg.lwia = @.RWB

-- Attained a goal in the timeframe timely or untimely

and ((convert(smalldatetime, convert(varchar(10),yg.youthattaindate, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),yg.youthattaindate, 101)) <= @.EndDte) -- Parm date for end of time frame needed

-- Goal due but not attained

or (convert(smalldatetime, convert(varchar(10),yg.youthgoalanniversary, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),yg.youthgoalanniversary, 101)) <= @.EndDte -- Parm date for end of time frame needed

and yg.youthattaingoal <> 1))

group by yg.lwia

--==========

UNION ALL

--==========

-- Closure with open goal

select yg.lwia

, IsNull(cast(count(yg.appid)as int) as goal--opengoal

from dbo.tbl_caseclosure cc,

dbo.wiayouthgoals yg

where yg.appid = cc.col_idnum

and convert(smalldatetime, convert(varchar(10),cc.col_closuredate, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),cc.col_closuredate, 101)) <= @.EndDte -- Parm date for end of time frame needed

and yg.youthattaindate is null

and yg.lwia = @.RWB

group by yg.lwia

)d

GROUP BY d.lwia

Count need to bring back a zero when no matches

I am trying to do a calculation with the below query and it works long as d.closegoal has values and d1.opengoal has values but the problem is when there is no count for either, I need to bring back a value of zero if there are no matches. Since I am using it in an outer select statement for a calculation it not bringing anything back because of no matches.

This is my code:

select d.lwia,

cast((d.closegoal + d1.opengoal) as float)denominator

from

(

select yg.lwia,

cast(count(yg.appid)as float) closegoal

from dbo.wiayouthgoals yg

where yg.lwia = @.RWB

-- Attained a goal in the timeframe timely or untimely

and ((convert(smalldatetime, convert(varchar(10),yg.youthattaindate, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),yg.youthattaindate, 101)) <= @.EndDte) -- Parm date for end of time frame needed

-- Goal due but not attained

or (convert(smalldatetime, convert(varchar(10),yg.youthgoalanniversary, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),yg.youthgoalanniversary, 101)) <= @.EndDte -- Parm date for end of time frame needed

and yg.youthattaingoal <> 1))

group by yg.lwia

)d,

(

-- Closure with open goal

select cast(count(yg.appid)as float) opengoal

from dbo.tbl_caseclosure cc,

dbo.wiayouthgoals yg

where yg.appid = cc.col_idnum

and convert(smalldatetime, convert(varchar(10),cc.col_closuredate, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),cc.col_closuredate, 101)) <= @.EndDte -- Parm date for end of time frame needed

and yg.youthattaindate is null

and yg.lwia = @.RWB

group by yg.lwia

)d1

)d2

I'd be tempted to put your results into a temptable or table variable and add the value 0 if the insert adds 0 rows.

eg

Code Snippet

DECLARE @.Table TABLE (Iwia INT, Denominator FLOAT)

INSERT INTO @.Table

SELECT......

IF @.@.ROWCOUNT = 0

INSERT INTO @.Table
VALUES (0, 0)

SELECT Iwia, Denominator
FROM @.Table

HTH!

|||

Use ISNULL(column, 0) around your two arguments.

e.g.

Code Snippet

select d.lwia,

cast((ISNULL(d.closegoal, 0) + ISNULL(d1.opengoal, 0)) as float)denominator

...

|||

Try this

SELECT d.lwia

--, cast((d.closegoal + d1.opengoal) as float)denominator

, SUM(goal) as denominator

FROM (

SELECT yg.lwia

,0 as goal

from dbo.wiayouthgoals yg

where yg.lwia = @.RWB

--==========

UNION ALL

--==========

SELECT yg.lwia

,IsNull(cast(count(yg.appid)as int),0) as goal-- closegoal

from dbo.wiayouthgoals yg

where yg.lwia = @.RWB

-- Attained a goal in the timeframe timely or untimely

and ((convert(smalldatetime, convert(varchar(10),yg.youthattaindate, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),yg.youthattaindate, 101)) <= @.EndDte) -- Parm date for end of time frame needed

-- Goal due but not attained

or (convert(smalldatetime, convert(varchar(10),yg.youthgoalanniversary, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),yg.youthgoalanniversary, 101)) <= @.EndDte -- Parm date for end of time frame needed

and yg.youthattaingoal <> 1))

group by yg.lwia

--==========

UNION ALL

--==========

-- Closure with open goal

select yg.lwia

, IsNull(cast(count(yg.appid)as int) as goal--opengoal

from dbo.tbl_caseclosure cc,

dbo.wiayouthgoals yg

where yg.appid = cc.col_idnum

and convert(smalldatetime, convert(varchar(10),cc.col_closuredate, 101)) >= @.BeginDte -- Parm date for beginning of time frame needed

and convert(smalldatetime, convert(varchar(10),cc.col_closuredate, 101)) <= @.EndDte -- Parm date for end of time frame needed

and yg.youthattaindate is null

and yg.lwia = @.RWB

group by yg.lwia

)d

GROUP BY d.lwia

count iif

Hope someone can help.
I am trying to do a count where a field is equal to a certain number of
values.
The example below doesn't work but this is the idea.
=Count(iif(Fields!VisitType.Value = "RTF" or "ARF" or "ERF" or "WOK",
Fields!JobNo.Value, Nothing))
I wondered if someone could point me in the right direction.
Thanks PaulSELECT SUM(CASE WHEN VisitType IN ('RTF', 'ARF', 'ERF', 'WOK') THEN 1 ELSE 0
END)
FROM your_table
--
Jacco Schalkwijk
SQL Server MVP
"pcalv" <pcalv@.discussions.microsoft.com> wrote in message
news:6D921197-A432-4C19-B5AE-1958B94CE795@.microsoft.com...
> Hope someone can help.
> I am trying to do a count where a field is equal to a certain number of
> values.
> The example below doesn't work but this is the idea.
> =Count(iif(Fields!VisitType.Value = "RTF" or "ARF" or "ERF" or "WOK",
> Fields!JobNo.Value, Nothing))
> I wondered if someone could point me in the right direction.
> Thanks Paul|||Try the posted case statement first, but if that doesn't work, you have to
spell out your fields again.
Like:
=Count(iif(Fields!VisitType.Value = "RTF" or Fields!VisitType.Value = "ARF"
or Fields!VisitType.Value = "ERF" or Fields!VisitType.Value = "WOK",
Fields!JobNo.Value, Nothing))
Hope that helps!
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"pcalv" wrote:
> Hope someone can help.
> I am trying to do a count where a field is equal to a certain number of
> values.
> The example below doesn't work but this is the idea.
> =Count(iif(Fields!VisitType.Value = "RTF" or "ARF" or "ERF" or "WOK",
> Fields!JobNo.Value, Nothing))
> I wondered if someone could point me in the right direction.
> Thanks Paul|||Thanks for the replies.
Catadmin i used your suggestion which worked great.
Cheers Paul
"Catadmin" wrote:
> Try the posted case statement first, but if that doesn't work, you have to
> spell out your fields again.
> Like:
> =Count(iif(Fields!VisitType.Value = "RTF" or Fields!VisitType.Value = "ARF"
> or Fields!VisitType.Value = "ERF" or Fields!VisitType.Value = "WOK",
> Fields!JobNo.Value, Nothing))
> Hope that helps!
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
> @.=)
>
> "pcalv" wrote:
> > Hope someone can help.
> >
> > I am trying to do a count where a field is equal to a certain number of
> > values.
> >
> > The example below doesn't work but this is the idea.
> >
> > =Count(iif(Fields!VisitType.Value = "RTF" or "ARF" or "ERF" or "WOK",
> > Fields!JobNo.Value, Nothing))
> >
> > I wondered if someone could point me in the right direction.
> >
> > Thanks Paul|||Glad I could help. @.=)
Catadmin
"pcalv" wrote:
> Thanks for the replies.
> Catadmin i used your suggestion which worked great.
> Cheers Paul
>

Sunday, March 25, 2012

Count for TRUE cases

Below is a statement that will return both TRUE and FALSE cases:
select (mtdat-mldat<=4) as PassIt from LpsMasFl where year(mtdat)=2005 and
month(mtdat)=5
How can I modify the statement above so that it returns only the count for
TRUE casesmtdat is obviously a smalldatetime or datetime that holds (for this
query) values in the month of May 2005. But what is mldat and what
values does it hold? Can you post some DDL & sample data that will
repro the problem?
Also, if you want to do some kind of datetime manipulation (in the
select list) you ought to use the datetime functions (like datediff(),
datepart(), dateadd(), etc.). Subtracting a value (I'm assuming it is
an int or a datetime) from a datetime value is not all that kosher.
I'm going to take a wild guess and say that mldat (or is it supposed to
be m1dat?) stores '1/1/2005'. If you're trying to find the number of
months between those two dates you would say DATEDIFF(mm, mldat,
mtdat). But then again, I just don't have a clue what you're trying to
do here.
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
tslu69 wrote:

>Below is a statement that will return both TRUE and FALSE cases:
>select (mtdat-mldat<=4) as PassIt from LpsMasFl where year(mtdat)=2005 and
>month(mtdat)=5
>How can I modify the statement above so that it returns only the count for
>TRUE cases
>
>|||mtdat and mldat are both datetime.
The statement below returns records which are either TRUE or FALSE, based on
whether the condition is met.
select (mtdat-mldat<=4) as PassIt from LpsMasFl where year(mtdat)=2005 and m
onth(mtdat)=5
e.g. (british date format)
mtdat = '01/01/2005'
mldat = '02/01/2005'
so (mtdat-mldat<=4) returns TRUE
"Mike Hodgson" <mike.hodgson@.mallesons.nospam.com> wrote in message news:OtI
rWj9aFHA.740@.tk2msftngp13.phx.gbl...
mtdat is obviously a smalldatetime or datetime that holds (for this query) v
alues in the month of May 2005. But what is mldat and what values does it h
old? Can you post some DDL & sample data that will repro the problem?
Also, if you want to do some kind of datetime manipulation (in the select li
st) you ought to use the datetime functions (like datediff(), datepart(), da
teadd(), etc.). Subtracting a value (I'm assuming it is an int or a datetim
e) from a datetime value is not all that kosher.
I'm going to take a wild guess and say that mldat (or is it supposed to be m
1dat?) stores '1/1/2005'. If you're trying to find the number of months bet
ween those two dates you would say DATEDIFF(mm, mldat, mtdat). But then agai
n, I just don't have a clue what you're trying to do here.
mike hodgson | database administrator | mallesons stephen jaques
T +61 (2) 9296 3668 | F +61 (2) 9296 3885 | M +61 (408) 675 907
E mailto:mike.hodgson@.mallesons.nospam.com | W http://www.mallesons.com
tslu69 wrote:
Below is a statement that will return both TRUE and FALSE cases:
select (mtdat-mldat<=4) as PassIt from LpsMasFl where year(mtdat)=2005 and
month(mtdat)=5
How can I modify the statement above so that it returns only the count for
TRUE cases|||Are you using SQL Server? This looks like a query for some database
product that has a boolean type, (and that you forgot to actually
count anything). Maybe you want something like
select count(*) as PassId
from LpsMasF1
where year(mtdat)= 2005
and month(mtdat) = 5
and mtdat-mldat <= 4
or better yet,
select count(*) as PassId
from LpsMasF1
where mtdat >= '2005-05-01T00:00:00.000'
and mtdat < '2005-06-01T00:00:00.000'
and mtdat <= mldat + 4
Steve Kass
Drew University
tslu69 wrote:

>Below is a statement that will return both TRUE and FALSE cases:
>select (mtdat-mldat<=4) as PassIt from LpsMasFl where year(mtdat)=2005 and
>month(mtdat)=5
>How can I modify the statement above so that it returns only the count for
>TRUE cases
>
>|||Did you see Steve's post? Your query is just not syntactically correct
for the T-SQL language. Maybe you mean something like:
select cast(case when (mtdat-mldat <= 4) then 1 else 0 end as bit)
as PassIt from LpsMasFl
where year(mtdat) = 2005
and month(mtdat) = 5
Although Steve's WHERE clause is better (with the normal date
comparisons, without the year() & month() functions). If you really
want the true/false type data then this query would be better (than what
you've got):
select cast(case when (datediff(dd,mtdat,mldat) <= 4) then 1 else 0
end as bit) as PassIt
from LpsMasFl
where mtdat >= '20050501 00:00:00.000'
and mtdat < '20050601 00:00:00.000'
I assume you want the PassIt value to be "true" for rows where the
number of days between mtdat & mldat is four or less and "not true" in
all other cases.
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
tslu69 wrote:
> mtdat and mldat are both datetime.
> The statement below returns records which are either TRUE or FALSE,
> based on whether the condition is met.
> select (mtdat-mldat<=4) as PassIt from LpsMasFl where year(mtdat)=2005
> and month(mtdat)=5
> e.g. (british date format)
> mtdat = '01/01/2005'
> mldat = '02/01/2005'
> so (mtdat-mldat<=4) returns TRUE
> "Mike Hodgson" <mike.hodgson@.mallesons.nospam.com
> <mailto:mike.hodgson@.mallesons.nospam.com>> wrote in message
> news:OtIrWj9aFHA.740@.tk2msftngp13.phx.gbl...
> mtdat is obviously a smalldatetime or datetime that holds (for
> this query) values in the month of May 2005. But what is mldat
> and what values does it hold? Can you post some DDL & sample data
> that will repro the problem?
> Also, if you want to do some kind of datetime manipulation (in the
> select list) you ought to use the datetime functions (like
> datediff(), datepart(), dateadd(), etc.). Subtracting a value
> (I'm assuming it is an int or a datetime) from a datetime value is
> not all that kosher.
> I'm going to take a wild guess and say that mldat (or is it
> supposed to be m1dat?) stores '1/1/2005'. If you're trying to
> find the number of months between those two dates you would say
> DATEDIFF(mm, mldat, mtdat). But then again, I just don't have a
> clue what you're trying to do here.
> --
> *mike hodgson* |/ database administrator/ | mallesons stephen jaques
> *T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
> *E* mailto:mike.hodgson@.mallesons.nospam.com |* W*
> http://www.mallesons.com
>
> tslu69 wrote:
>|||Thanks all..
I've use the following statement:
select count(*) from LpsMasFl where year(mtdat)=2005 and month(mtdat)=5 and
mtdat-mldat<=4
"Steve Kass" <skass@.drew.edu> wrote in message
news:%23gBM0f%23aFHA.2736@.TK2MSFTNGP12.phx.gbl...
> Are you using SQL Server? This looks like a query for some database
> product that has a boolean type, (and that you forgot to actually
> count anything). Maybe you want something like
> select count(*) as PassId
> from LpsMasF1
> where year(mtdat)= 2005
> and month(mtdat) = 5
> and mtdat-mldat <= 4
> or better yet,
> select count(*) as PassId
> from LpsMasF1
> where mtdat >= '2005-05-01T00:00:00.000'
> and mtdat < '2005-06-01T00:00:00.000'
> and mtdat <= mldat + 4
> Steve Kass
> Drew University
> tslu69 wrote:
>

Thursday, March 22, 2012

Count ?

Hi, below tells me all of the students who have failed an exam

select emark, surname, forenames from result, student
where emark=0
and result.netid = student.netid;

im looking for the person who has failed six exams
ive tried:

select emark, surname, forenames from result, student
where emark=0
(select count( surname) where surname >6)
and result.netid = student.netid;

but no luck. Iv'e also tried distinct surname as well.
Can someone point me in the right direction.

Thanxselect student.netid, count(*)
from result, student
where emark=0
and result.netid = student.netid
group by student.netid
having count(*) >= 6;|||that does the trick,
thanx alot.sql

Count

I am trying to count entries into each column heading by zip code, but when I
run the script below I get the same count across all columns. Can someone
tell/show me how to make these unquie counts?
Thanks in advance.
SELECT DISTINCT P.ZIP,
COUNT (evC.day_care_center) AS 'Day Care',
COUNT (evC.drop_care) AS 'Drop-In Care',
COUNT (evC.family_day_care) AS 'Family day care',
COUNT (evC.financial) AS 'Financial',
COUNT (evC.montessori_program2)AS 'Montessori program',
COUNT (evC.nanny_service) AS 'Nanny service',
COUNT (evC.nursery_schl_lrn_ct) AS 'Nursery school - learn centers',
COUNT (evC.parenting_info) AS 'Parenting information',
COUNT (evC.sick_child_care) AS 'Sick child care',
COUNT (evC.special_needs)AS 'Special needs',
COUNT (evC.summer_camp_care)AS 'Summer camps/care',
COUNT (evC.temporary) AS 'Temporary',
COUNT (evC.transportation2)AS 'Transportation',
COUNT (evC.support_groups) AS 'Support groups',
COUNT (evC.other) AS 'Other'
FROM Patient_Elg pe
INNER JOIN Patient p ON pe.Patient_Key = p.Patient_Key
INNER JOIN evChildcareintakea evC ON pe.Patient_Key = evC.Patient_Key
WHERE (pe.Payor_Key = 59)
AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
GROUP BY P.Zip
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200801/1Put the DISTINCT keyword inside the COUNT():
SELECT P.ZIP,
COUNT (DISTINCT evC.day_care_center) AS 'Day Care',
COUNT (DISTINCT evC.drop_care) AS 'Drop-In Care',
...
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Jay via SQLMonster.com" <u7124@.uwe> wrote in message
news:7efd1fc265539@.uwe...
I am trying to count entries into each column heading by zip code, but when
I
run the script below I get the same count across all columns. Can someone
tell/show me how to make these unquie counts?
Thanks in advance.
SELECT DISTINCT P.ZIP,
COUNT (evC.day_care_center) AS 'Day Care',
COUNT (evC.drop_care) AS 'Drop-In Care',
COUNT (evC.family_day_care) AS 'Family day care',
COUNT (evC.financial) AS 'Financial',
COUNT (evC.montessori_program2)AS 'Montessori program',
COUNT (evC.nanny_service) AS 'Nanny service',
COUNT (evC.nursery_schl_lrn_ct) AS 'Nursery school - learn centers',
COUNT (evC.parenting_info) AS 'Parenting information',
COUNT (evC.sick_child_care) AS 'Sick child care',
COUNT (evC.special_needs)AS 'Special needs',
COUNT (evC.summer_camp_care)AS 'Summer camps/care',
COUNT (evC.temporary) AS 'Temporary',
COUNT (evC.transportation2)AS 'Transportation',
COUNT (evC.support_groups) AS 'Support groups',
COUNT (evC.other) AS 'Other'
FROM Patient_Elg pe
INNER JOIN Patient p ON pe.Patient_Key = p.Patient_Key
INNER JOIN evChildcareintakea evC ON pe.Patient_Key = evC.Patient_Key
WHERE (pe.Payor_Key = 59)
AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
GROUP BY P.Zip
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200801/1|||I'm guessing you might need to COUNT the distinct values for each
column. If that is the case:
SELECT P.ZIP,
COUNT (DISTINCT evC.day_care_center) AS 'Day Care',
COUNT (DISTINCT evC.drop_care) AS 'Drop-In Care',
etc.
If that is not what you need please elaborate on what you actually
hope to see.
Note that since you were already doing a GROUP BY there was no purpose
to having a DISTINCT for the entire query.
Roy Harvey
Beacon Falls, CT
On Wed, 30 Jan 2008 15:49:59 GMT, "Jay via SQLMonster.com" <u7124@.uwe>
wrote:
>I am trying to count entries into each column heading by zip code, but when I
>run the script below I get the same count across all columns. Can someone
>tell/show me how to make these unquie counts?
>Thanks in advance.
>SELECT DISTINCT P.ZIP,
> COUNT (evC.day_care_center) AS 'Day Care',
> COUNT (evC.drop_care) AS 'Drop-In Care',
> COUNT (evC.family_day_care) AS 'Family day care',
> COUNT (evC.financial) AS 'Financial',
> COUNT (evC.montessori_program2)AS 'Montessori program',
> COUNT (evC.nanny_service) AS 'Nanny service',
> COUNT (evC.nursery_schl_lrn_ct) AS 'Nursery school - learn centers',
> COUNT (evC.parenting_info) AS 'Parenting information',
> COUNT (evC.sick_child_care) AS 'Sick child care',
> COUNT (evC.special_needs)AS 'Special needs',
> COUNT (evC.summer_camp_care)AS 'Summer camps/care',
> COUNT (evC.temporary) AS 'Temporary',
> COUNT (evC.transportation2)AS 'Transportation',
> COUNT (evC.support_groups) AS 'Support groups',
> COUNT (evC.other) AS 'Other'
>FROM Patient_Elg pe
> INNER JOIN Patient p ON pe.Patient_Key = p.Patient_Key
> INNER JOIN evChildcareintakea evC ON pe.Patient_Key = evC.Patient_Key
>WHERE (pe.Payor_Key = 59)
> AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
>GROUP BY P.Zip|||I made the changes you suggested and it did make the counts unique but they
are not correct by column heading/category. To check I displayed all the
information for zip code 55901 under the column 'Day Care' for '07. I came up
with a count of 200, but for this script I only get 11. How can I get all
records to count?
Thanks again for your help in advance
Roy Harvey (SQL Server MVP) wrote:
>I'm guessing you might need to COUNT the distinct values for each
>column. If that is the case:
>SELECT P.ZIP,
> COUNT (DISTINCT evC.day_care_center) AS 'Day Care',
> COUNT (DISTINCT evC.drop_care) AS 'Drop-In Care',
>etc.
>If that is not what you need please elaborate on what you actually
>hope to see.
>Note that since you were already doing a GROUP BY there was no purpose
>to having a DISTINCT for the entire query.
>Roy Harvey
>Beacon Falls, CT
>>I am trying to count entries into each column heading by zip code, but when I
>>run the script below I get the same count across all columns. Can someone
>[quoted text clipped - 25 lines]
>> AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
>>GROUP BY P.Zip
--
Message posted via http://www.sqlmonster.com|||Usually the fastest way to get answers to questions like this is to give us
the SQL statements to create sample tables and load those tables with sample
data (see www.aspfaq.com/5006 for how to do this). Then tell us the result
you would want to see from that sample data. That keeps us from having to
guess what you want, and you will get an answer that has been tested against
your sample data.
Tom
"jpettigrew via SQLMonster.com" <u7124@.uwe> wrote in message
news:7efdb43406fee@.uwe...
>I made the changes you suggested and it did make the counts unique but they
> are not correct by column heading/category. To check I displayed all the
> information for zip code 55901 under the column 'Day Care' for '07. I came
> up
> with a count of 200, but for this script I only get 11. How can I get all
> records to count?
> Thanks again for your help in advance
> Roy Harvey (SQL Server MVP) wrote:
>>I'm guessing you might need to COUNT the distinct values for each
>>column. If that is the case:
>>SELECT P.ZIP,
>> COUNT (DISTINCT evC.day_care_center) AS 'Day Care',
>> COUNT (DISTINCT evC.drop_care) AS 'Drop-In Care',
>>etc.
>>If that is not what you need please elaborate on what you actually
>>hope to see.
>>Note that since you were already doing a GROUP BY there was no purpose
>>to having a DISTINCT for the entire query.
>>Roy Harvey
>>Beacon Falls, CT
>>I am trying to count entries into each column heading by zip code, but
>>when I
>>run the script below I get the same count across all columns. Can someone
>>[quoted text clipped - 25 lines]
>> AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
>>GROUP BY P.Zip
> --
> Message posted via http://www.sqlmonster.com
>|||What Tom Cooper said. SHOW us what you have, and what you want.
Your original query counted all the rows for the zip code. All the
columns were the same because COUNT(columnname) returns a count of all
the rows with non-null values for that column, and apparently every
row was non-null. If there are 200 rows for a zip code, why would you
expect any number except 200 for day_care_center or drop_care?
Roy Harvey
Beacon Falls, CT
On Wed, 30 Jan 2008 16:56:33 GMT, "jpettigrew via SQLMonster.com"
<u7124@.uwe> wrote:
>I made the changes you suggested and it did make the counts unique but they
>are not correct by column heading/category. To check I displayed all the
>information for zip code 55901 under the column 'Day Care' for '07. I came up
>with a count of 200, but for this script I only get 11. How can I get all
>records to count?
>Thanks again for your help in advance
>Roy Harvey (SQL Server MVP) wrote:
>>I'm guessing you might need to COUNT the distinct values for each
>>column. If that is the case:
>>SELECT P.ZIP,
>> COUNT (DISTINCT evC.day_care_center) AS 'Day Care',
>> COUNT (DISTINCT evC.drop_care) AS 'Drop-In Care',
>>etc.
>>If that is not what you need please elaborate on what you actually
>>hope to see.
>>Note that since you were already doing a GROUP BY there was no purpose
>>to having a DISTINCT for the entire query.
>>Roy Harvey
>>Beacon Falls, CT
>>I am trying to count entries into each column heading by zip code, but when I
>>run the script below I get the same count across all columns. Can someone
>>[quoted text clipped - 25 lines]
>> AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
>>GROUP BY P.Zip|||Because of HIPAA compliance it is difficult to provide information contained
in one of the tables. How do you suggest I provide the information? If i was
not specific in my previous posts I apologize I am trying to total the
columns in the script by zip code, but do not seem to be getting all the
information.
Tom Cooper wrote:
>Usually the fastest way to get answers to questions like this is to give us
>the SQL statements to create sample tables and load those tables with sample
>data (see www.aspfaq.com/5006 for how to do this). Then tell us the result
>you would want to see from that sample data. That keeps us from having to
>guess what you want, and you will get an answer that has been tested against
>your sample data.
>Tom
>>I made the changes you suggested and it did make the counts unique but they
>> are not correct by column heading/category. To check I displayed all the
>[quoted text clipped - 28 lines]
>> AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
>>GROUP BY P.Zip
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200801/1|||On Wed, 30 Jan 2008 20:11:22 GMT, Jay via SQLMonster.com wrote:
>Because of HIPAA compliance it is difficult to provide information contained
>in one of the tables. How do you suggest I provide the information?
Hi Jay,
* Post the table structure as CREATE TABLE statements, including all
constraints, properties, and indexes.
* Post the data as INSERT statements. It doesn't need to be the real
data, a made-up sample that illustrates the problem is just as well
(probably even better, as there is no need to posts thousands or even
millions of rows when you can illustrate the problem with ten). I don't
think HIPAA disallows the posting of made-up data.
* Post the expected results.
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis|||On Jan 30, 9:49=A0pm, "Jay via SQLMonster.com" <u7124@.uwe> wrote:
> I am trying to count entries into each column heading by zip code, but whe=n I
> run the script below I get the same count across all columns. Can someone
> tell/show me how to make these unquie counts?
> Thanks in advance.
> SELECT =A0DISTINCT P.ZIP,
> =A0 =A0 =A0 =A0 COUNT (evC.day_care_center) AS 'Day Care',
> =A0 =A0 =A0 =A0 COUNT (evC.drop_care) AS 'Drop-In Care',
> =A0 =A0 =A0 =A0 COUNT (evC.family_day_care) AS 'Family day care',
> =A0 =A0 =A0 =A0 COUNT (evC.financial) AS 'Financial',
> =A0 =A0 =A0 =A0 COUNT (evC.montessori_program2)AS 'Montessori program',
> =A0 =A0 =A0 =A0 COUNT (evC.nanny_service) AS 'Nanny service',
> =A0 =A0 =A0 =A0 COUNT (evC.nursery_schl_lrn_ct) AS 'Nursery school - learn= centers',
> =A0 =A0 =A0 =A0 COUNT (evC.parenting_info) AS 'Parenting information',
> =A0 =A0 =A0 =A0 COUNT (evC.sick_child_care) AS 'Sick child care',
> =A0 =A0 =A0 =A0 COUNT (evC.special_needs)AS 'Special needs',
> =A0 =A0 =A0 =A0 COUNT (evC.summer_camp_care)AS 'Summer camps/care',
> =A0 =A0 =A0 =A0 COUNT (evC.temporary) AS 'Temporary',
> =A0 =A0 =A0 =A0 COUNT (evC.transportation2)AS 'Transportation',
> =A0 =A0 =A0 =A0 COUNT (evC.support_groups) AS 'Support groups',
> =A0 =A0 =A0 =A0 COUNT (evC.other) AS 'Other'
> FROM =A0 =A0Patient_Elg pe
> =A0 =A0 =A0 =A0 INNER JOIN Patient p ON pe.Patient_Key =3D p.Patient_Key
> =A0 =A0 =A0 =A0 INNER JOIN evChildcareintakea evC ON pe.Patient_Key =3D ev=C.Patient_Key
> WHERE =A0 =A0 (pe.Payor_Key =3D 59)
> =A0 =A0 =A0 =A0 AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
> GROUP BY P.Zip
> --
> Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forums.aspx=
/sql-server/200801/1
Hi Jay,
I think you need to do each count(distinct field) separately and store
them (maybe into a variable). For example:
Declare @.zip int, @.center int, etc
Select @.zip =3D select count(distinct p.zip)
FROM Patient_Elg pe
INNER JOIN Patient p ON pe.Patient_Key =3D p.Patient_Key
INNER JOIN evChildcareintakea evC ON pe.Patient_Key =3D
evC.Patient_Key
WHERE (pe.Payor_Key =3D 59)
AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
GROUP BY P.Zip
Select @.center int =3D select count(distinct evC.day_care_center)
FROM Patient_Elg pe
INNER JOIN Patient p ON pe.Patient_Key =3D p.Patient_Key
INNER JOIN evChildcareintakea evC ON pe.Patient_Key =3D
evC.Patient_Key
WHERE (pe.Payor_Key =3D 59)
AND p.create_date BETWEEN '1/1/07' AND '12/31/07'
GROUP BY P.Zip
etc.
HTH|||On Wed, 30 Jan 2008 20:40:12 -0800 (PST), SB <othellomy@.yahoo.com>
wrote:
>I think you need to do each count(distinct field) separately and store
>them (maybe into a variable).
All at once or individually, if they are always grouped by the same
thing there will be no difference.
Roy Harvey
Beacon Falls, CT

Sunday, March 11, 2012

Could not load file or assembly Microsoft.ReportingServices.ProcessingCore or one of its depende

My reporting server 2005 frequently throws error below.

The PC hosting reporting server has .net framework 1.1 and 2.0 installed, and it does not have SQL server installed. The 2 databases used by reporting server are in another PC.

Please help.

w3wp!webserver!1!3/14/2007-07:01:35:: i INFO: Reporting Web Server started
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing ConnectionType to '0' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing ProcessRecycleOptions to '0' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!resourceutilities!1!3/14/2007-07:01:35:: i INFO: Reporting Services starting SKU: Standard
w3wp!resourceutilities!1!3/14/2007-07:01:35:: i INFO: Evaluation copy: 0 days left
w3wp!resourceutilities!1!3/14/2007-07:01:35:: i INFO: Running on 2 physical processors, 4 logical processors
w3wp!runningjobs!1!3/14/2007-07:01:35:: i INFO: Database Cleanup (Web Service) timer enabled: Next Event: 600 seconds. Cycle: 600 seconds
w3wp!runningjobs!1!3/14/2007-07:01:35:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!1!3/14/2007-07:01:35:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!1!3/14/2007-07:01:35:: i INFO: Memory stats update timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!library!1!03/14/2007-07:01:35:: i INFO: Catalog SQL Server Edition = Standard
w3wp!library!1!3/14/2007-07:01:36:: 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.IO.FileLoadException: Could not load file or assembly 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Access is denied.
File name: 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save()
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.SetParameters(NameValueCollection parameters)
at Microsoft.ReportingServices.WebServer.ReportViewerHost.OnLoad(EventArgs e)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

End of inner exception stack trace
w3wp!library!1!3/14/2007-07:01:36:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson
w3wp!library!a!3/14/2007-07:11:35:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
w3wp!library!9!3/14/2007-07:21:35:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
w3wp!library!1!3/14/2007-07:31:35:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
w3wp!library!8!3/14/2007-07:33:55:: 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.IO.FileLoadException: Could not load file or assembly 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Access is denied.
File name: 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save()
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.SetParameters(NameValueCollection parameters)
at Microsoft.ReportingServices.WebServer.ReportViewerHost.OnLoad(EventArgs e)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

End of inner exception stack trace
w3wp!library!8!3/14/2007-07:34:25:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson
w3wp!library!1!3/14/2007-07:41:35:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
w3wp!library!a!3/14/2007-07:42:44:: 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.IO.FileLoadException: Could not load file or assembly 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Access is denied.
File name: 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save()
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.SetParameters(NameValueCollection parameters)
at Microsoft.ReportingServices.WebServer.ReportViewerHost.OnLoad(EventArgs e)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

End of inner exception stack trace

Hi Weo,

I also have the same error as you...then I gave machine asp.net user the full rights on folders C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ReportSerever and Reports. And Then It works fine on my Reporting server..

Regards,

Balwant Patel.

Could not load file or assembly Microsoft.ReportingServices.ProcessingCore or one of its depende

My reporting server 2005 frequently throws error below.

The PC hosting reporting server has .net framework 1.1 and 2.0 installed, and it does not have SQL server installed. The 2 databases used by reporting server are in another PC.

Please help.

w3wp!webserver!1!3/14/2007-07:01:35:: i INFO: Reporting Web Server started
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing ConnectionType to '0' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing ProcessRecycleOptions to '0' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file.
w3wp!library!1!3/14/2007-07:01:35:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.
w3wp!resourceutilities!1!3/14/2007-07:01:35:: i INFO: Reporting Services starting SKU: Standard
w3wp!resourceutilities!1!3/14/2007-07:01:35:: i INFO: Evaluation copy: 0 days left
w3wp!resourceutilities!1!3/14/2007-07:01:35:: i INFO: Running on 2 physical processors, 4 logical processors
w3wp!runningjobs!1!3/14/2007-07:01:35:: i INFO: Database Cleanup (Web Service) timer enabled: Next Event: 600 seconds. Cycle: 600 seconds
w3wp!runningjobs!1!3/14/2007-07:01:35:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!1!3/14/2007-07:01:35:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!1!3/14/2007-07:01:35:: i INFO: Memory stats update timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!library!1!03/14/2007-07:01:35:: i INFO: Catalog SQL Server Edition = Standard
w3wp!library!1!3/14/2007-07:01:36:: 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.IO.FileLoadException: Could not load file or assembly 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Access is denied.
File name: 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save()
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.SetParameters(NameValueCollection parameters)
at Microsoft.ReportingServices.WebServer.ReportViewerHost.OnLoad(EventArgs e)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

End of inner exception stack trace
w3wp!library!1!3/14/2007-07:01:36:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson
w3wp!library!a!3/14/2007-07:11:35:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
w3wp!library!9!3/14/2007-07:21:35:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
w3wp!library!1!3/14/2007-07:31:35:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
w3wp!library!8!3/14/2007-07:33:55:: 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.IO.FileLoadException: Could not load file or assembly 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Access is denied.
File name: 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save()
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.SetParameters(NameValueCollection parameters)
at Microsoft.ReportingServices.WebServer.ReportViewerHost.OnLoad(EventArgs e)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

End of inner exception stack trace
w3wp!library!8!3/14/2007-07:34:25:: i INFO: Exception dumped to: C:\Program Files\Microsoft SQL Server\MSSQL.1\Reporting Services\LogFiles flags= ReferencedMemory, AllThreads, SendToWatson
w3wp!library!1!3/14/2007-07:41:35:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
w3wp!library!a!3/14/2007-07:42:44:: 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.IO.FileLoadException: Could not load file or assembly 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Access is denied.
File name: 'Microsoft.ReportingServices.ProcessingCore, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save()
at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)
at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WebForms.ServerReport.SetParameters(NameValueCollection parameters)
at Microsoft.ReportingServices.WebServer.ReportViewerHost.OnLoad(EventArgs e)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

End of inner exception stack trace

Hi Weo,

I also have the same error as you...then I gave machine asp.net user the full rights on folders C:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ReportSerever and Reports. And Then It works fine on my Reporting server..

Regards,

Balwant Patel.

Saturday, February 25, 2012

Could not establish secure channel for SSL/TLS

I've seen posts for this error, but real explanation or solution.
Information about my settings are below.
ReportManager : RSWebApplication.config
<ReportServerUrl>https://mycompanyserver/ReportServer</ReportServerUrl>
ReportServer : RSReportServer.config
<Add Key="SecureConnectionLevel" Value="3"/>
<UrlRoot>https://mycompanyserver/ReportServer</UrlRoot>
Default Website, Reports (Report Manager), and ReportServer site all
have Require secure channel (SSL) - checked.
Error Message is:
The underlying connection was closed: Could not establish secure
channel for SSL/TLS.
Explanation/Solution? Thank you!I've seen this happening when the name for which the certificate was
requested does not match the name of the URL, or has expired, or is
otherwise invalid. If you navigate to https://mycompanyserver/ReportServer
and get a warning dialog-box in IE, the SOAP calls will fail with the
message you describe.
--
Tudor Trufinescu
Dev Lead
Sql Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"swruble" <swruble@.alogistics.com> wrote in message
news:de0fd1d1.0406280355.2aeb382e@.posting.google.com...
> I've seen posts for this error, but real explanation or solution.
> Information about my settings are below.
> ReportManager : RSWebApplication.config
> <ReportServerUrl>https://mycompanyserver/ReportServer</ReportServerUrl>
> ReportServer : RSReportServer.config
> <Add Key="SecureConnectionLevel" Value="3"/>
> <UrlRoot>https://mycompanyserver/ReportServer</UrlRoot>
> Default Website, Reports (Report Manager), and ReportServer site all
> have Require secure channel (SSL) - checked.
> Error Message is:
> The underlying connection was closed: Could not establish secure
> channel for SSL/TLS.
> Explanation/Solution? Thank you!|||Tudor, thanks for your response. Everything looks OK with the
certificate with the site configuration. I find that
https://mycompanyserver/ReportServer allows me to browse the
directory. Opening a folder and selecting a report allows me to view
reports fine. I get the original error message whenever I attempt to
access https://mycompanyserver/Reports.
"Tudor Trufinescu \(MSFT\)" <tudortr@.ms.com> wrote in message news:<OQ3TwuTXEHA.2964@.TK2MSFTNGP09.phx.gbl>...
> I've seen this happening when the name for which the certificate was
> requested does not match the name of the URL, or has expired, or is
> otherwise invalid. If you navigate to https://mycompanyserver/ReportServer
> and get a warning dialog-box in IE, the SOAP calls will fail with the
> message you describe.
> --
> Tudor Trufinescu
> Dev Lead
> Sql Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "swruble" <swruble@.alogistics.com> wrote in message
> news:de0fd1d1.0406280355.2aeb382e@.posting.google.com...
> > I've seen posts for this error, but real explanation or solution.
> > Information about my settings are below.
> >
> > ReportManager : RSWebApplication.config
> > <ReportServerUrl>https://mycompanyserver/ReportServer</ReportServerUrl>
> >
> > ReportServer : RSReportServer.config
> > <Add Key="SecureConnectionLevel" Value="3"/>
> > <UrlRoot>https://mycompanyserver/ReportServer</UrlRoot>
> >
> > Default Website, Reports (Report Manager), and ReportServer site all
> > have Require secure channel (SSL) - checked.
> >
> > Error Message is:
> > The underlying connection was closed: Could not establish secure
> > channel for SSL/TLS.
> >
> > Explanation/Solution? Thank you!|||Make sure the URL in RSWebApplication.config contains the same server name
as the one to which the certificate was granted to.
--
Tudor Trufinescu
Dev Lead
Sql Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"swruble" <swruble@.alogistics.com> wrote in message
news:de0fd1d1.0406292104.4648e20f@.posting.google.com...
> Tudor, thanks for your response. Everything looks OK with the
> certificate with the site configuration. I find that
> https://mycompanyserver/ReportServer allows me to browse the
> directory. Opening a folder and selecting a report allows me to view
> reports fine. I get the original error message whenever I attempt to
> access https://mycompanyserver/Reports.
>
> "Tudor Trufinescu \(MSFT\)" <tudortr@.ms.com> wrote in message
news:<OQ3TwuTXEHA.2964@.TK2MSFTNGP09.phx.gbl>...
> > I've seen this happening when the name for which the certificate was
> > requested does not match the name of the URL, or has expired, or is
> > otherwise invalid. If you navigate to
https://mycompanyserver/ReportServer
> > and get a warning dialog-box in IE, the SOAP calls will fail with the
> > message you describe.
> >
> > --
> > Tudor Trufinescu
> > Dev Lead
> > Sql Server Reporting Services
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "swruble" <swruble@.alogistics.com> wrote in message
> > news:de0fd1d1.0406280355.2aeb382e@.posting.google.com...
> > > I've seen posts for this error, but real explanation or solution.
> > > Information about my settings are below.
> > >
> > > ReportManager : RSWebApplication.config
> > >
<ReportServerUrl>https://mycompanyserver/ReportServer</ReportServerUrl>
> > >
> > > ReportServer : RSReportServer.config
> > > <Add Key="SecureConnectionLevel" Value="3"/>
> > > <UrlRoot>https://mycompanyserver/ReportServer</UrlRoot>
> > >
> > > Default Website, Reports (Report Manager), and ReportServer site all
> > > have Require secure channel (SSL) - checked.
> > >
> > > Error Message is:
> > > The underlying connection was closed: Could not establish secure
> > > channel for SSL/TLS.
> > >
> > > Explanation/Solution? Thank you!|||I have checked the URL and certificate. The URL in
RSWebApplication.config is:
https://reports.mydomain.com/ReportServer. The certificate was
granted to: reports.mydomain.com
When I change <Add Key="SecureConnectionLevel" Value="3"/> to a Value
of 2, I do not get the error, but all my top links are wrong... http
instead of https.
I found a related article "Consuming Webservices over HTTPS" that
describes this issue. However, since I am only working with
configuration settings rather than code, I obviously have missed
something in the setup.
I appreciate your help!
"Tudor Trufinescu \(MSFT\)" <tudortr@.ms.com> wrote in message news:<eaDs7TvXEHA.952@.TK2MSFTNGP10.phx.gbl>...
> Make sure the URL in RSWebApplication.config contains the same server name
> as the one to which the certificate was granted to.
> --
> Tudor Trufinescu
> Dev Lead
> Sql Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "swruble" <swruble@.alogistics.com> wrote in message
> news:de0fd1d1.0406292104.4648e20f@.posting.google.com...
> > Tudor, thanks for your response. Everything looks OK with the
> > certificate with the site configuration. I find that
> > https://mycompanyserver/ReportServer allows me to browse the
> > directory. Opening a folder and selecting a report allows me to view
> > reports fine. I get the original error message whenever I attempt to
> > access https://mycompanyserver/Reports.
> >
> >
> > "Tudor Trufinescu \(MSFT\)" <tudortr@.ms.com> wrote in message
> news:<OQ3TwuTXEHA.2964@.TK2MSFTNGP09.phx.gbl>...
> > > I've seen this happening when the name for which the certificate was
> > > requested does not match the name of the URL, or has expired, or is
> > > otherwise invalid. If you navigate to
> https://mycompanyserver/ReportServer
> > > and get a warning dialog-box in IE, the SOAP calls will fail with the
> > > message you describe.
> > >
> > > --
> > > Tudor Trufinescu
> > > Dev Lead
> > > Sql Server Reporting Services
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > >
> > > "swruble" <swruble@.alogistics.com> wrote in message
> > > news:de0fd1d1.0406280355.2aeb382e@.posting.google.com...
> > > > I've seen posts for this error, but real explanation or solution.
> > > > Information about my settings are below.
> > > >
> > > > ReportManager : RSWebApplication.config
> > > >
> <ReportServerUrl>https://mycompanyserver/ReportServer</ReportServerUrl>
> > > >
> > > > ReportServer : RSReportServer.config
> > > > <Add Key="SecureConnectionLevel" Value="3"/>
> > > > <UrlRoot>https://mycompanyserver/ReportServer</UrlRoot>
> > > >
> > > > Default Website, Reports (Report Manager), and ReportServer site all
> > > > have Require secure channel (SSL) - checked.
> > > >
> > > > Error Message is:
> > > > The underlying connection was closed: Could not establish secure
> > > > channel for SSL/TLS.
> > > >
> > > > Explanation/Solution? Thank you!|||The related article mentioned in my other post is:
http://weblogs.asp.net/jan/archive/2003/12/04/41154.aspx
"Tudor Trufinescu \(MSFT\)" <tudortr@.ms.com> wrote in message news:<eaDs7TvXEHA.952@.TK2MSFTNGP10.phx.gbl>...
> Make sure the URL in RSWebApplication.config contains the same server name
> as the one to which the certificate was granted to.
> --
> Tudor Trufinescu
> Dev Lead
> Sql Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "swruble" <swruble@.alogistics.com> wrote in message
> news:de0fd1d1.0406292104.4648e20f@.posting.google.com...
> > Tudor, thanks for your response. Everything looks OK with the
> > certificate with the site configuration. I find that
> > https://mycompanyserver/ReportServer allows me to browse the
> > directory. Opening a folder and selecting a report allows me to view
> > reports fine. I get the original error message whenever I attempt to
> > access https://mycompanyserver/Reports.
> >
> >
> > "Tudor Trufinescu \(MSFT\)" <tudortr@.ms.com> wrote in message
> news:<OQ3TwuTXEHA.2964@.TK2MSFTNGP09.phx.gbl>...
> > > I've seen this happening when the name for which the certificate was
> > > requested does not match the name of the URL, or has expired, or is
> > > otherwise invalid. If you navigate to
> https://mycompanyserver/ReportServer
> > > and get a warning dialog-box in IE, the SOAP calls will fail with the
> > > message you describe.
> > >
> > > --
> > > Tudor Trufinescu
> > > Dev Lead
> > > Sql Server Reporting Services
> > > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > >
> > >
> > > "swruble" <swruble@.alogistics.com> wrote in message
> > > news:de0fd1d1.0406280355.2aeb382e@.posting.google.com...
> > > > I've seen posts for this error, but real explanation or solution.
> > > > Information about my settings are below.
> > > >
> > > > ReportManager : RSWebApplication.config
> > > >
> <ReportServerUrl>https://mycompanyserver/ReportServer</ReportServerUrl>
> > > >
> > > > ReportServer : RSReportServer.config
> > > > <Add Key="SecureConnectionLevel" Value="3"/>
> > > > <UrlRoot>https://mycompanyserver/ReportServer</UrlRoot>
> > > >
> > > > Default Website, Reports (Report Manager), and ReportServer site all
> > > > have Require secure channel (SSL) - checked.
> > > >
> > > > Error Message is:
> > > > The underlying connection was closed: Could not establish secure
> > > > channel for SSL/TLS.
> > > >
> > > > Explanation/Solution? Thank you!

Sunday, February 19, 2012

Could not allocate space because the 'DEFAULT' filegroup is full.

We are getting the error below when trying to attach a MS SQL 2005 Express
Database with a size of around 2GB.
The database had some issues before we detached the database and now we can
not attach.
There are a number of other databases in the primary filegroup but they are
all very small i.e. no more than 100Mb total in size.
Is this a configuration issue of some sort or a database corruption issue.
==================
TITLE: Microsoft SQL Server Management Studio Express
Attach database failed for Server 'ONLINE-INT'.
(Microsoft.SqlServer.Express.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)
Could not allocate space for object 'events' in database 'port' because the
'DEFAULT' filegroup is full.
Error while undoing logged operation in database 'port'. Error at log record
ID (11807:19741:34).
Could not open new database 'port'. CREATE DATABASE is aborted.
1 transactions rolled forward in database 'port' (10). (Microsoft SQL
Server, Error: 1105)
PSernz
Hi
Do you have free space on the filesystem ?
"PSernz" <PSernz@.discussions.microsoft.com> wrote in message
news:E2EAFD34-01F0-4887-A7D0-134D73EEC501@.microsoft.com...
> We are getting the error below when trying to attach a MS SQL 2005 Express
> Database with a size of around 2GB.
> The database had some issues before we detached the database and now we
> can
> not attach.
> There are a number of other databases in the primary filegroup but they
> are
> all very small i.e. no more than 100Mb total in size.
> Is this a configuration issue of some sort or a database corruption issue.
>
> ==================
> TITLE: Microsoft SQL Server Management Studio Express
> --
> Attach database failed for Server 'ONLINE-INT'.
> (Microsoft.SqlServer.Express.Smo)
> --
> ADDITIONAL INFORMATION:
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.Express.ConnectionInfo)
> --
> Could not allocate space for object 'events' in database 'port' because
> the
> 'DEFAULT' filegroup is full.
> Error while undoing logged operation in database 'port'. Error at log
> record
> ID (11807:19741:34).
> Could not open new database 'port'. CREATE DATABASE is aborted.
> 1 transactions rolled forward in database 'port' (10). (Microsoft SQL
> Server, Error: 1105)
>
>
> PSernz
|||Yes I have 5Gb free on the disk that contains all Primary files.
PSernz
"Uri Dimant" wrote:

> Hi
> Do you have free space on the filesystem ?
>
>
> "PSernz" <PSernz@.discussions.microsoft.com> wrote in message
> news:E2EAFD34-01F0-4887-A7D0-134D73EEC501@.microsoft.com...
>
>
|||Hi
Do you have valid BACKUP of the database? Have you tried RESTORE?
"PSernz" <PSernz@.discussions.microsoft.com> wrote in message
news:0F6C0960-F410-46D5-87AE-8890D3163D55@.microsoft.com...[vbcol=seagreen]
> Yes I have 5Gb free on the disk that contains all Primary files.
>
> --
> PSernz
>
> "Uri Dimant" wrote:
|||Unfortunately not and hence we are hopeful that this is a config issue and
not a data integrity issue.
PSernz
"Uri Dimant" wrote:

> Hi
> Do you have valid BACKUP of the database? Have you tried RESTORE?
>
>
> "PSernz" <PSernz@.discussions.microsoft.com> wrote in message
> news:0F6C0960-F410-46D5-87AE-8890D3163D55@.microsoft.com...
>
>

Could not allocate space because the 'DEFAULT' filegroup is full.

We are getting the error below when trying to attach a MS SQL 2005 Express
Database with a size of around 2GB.
The database had some issues before we detached the database and now we can
not attach.
There are a number of other databases in the primary filegroup but they are
all very small i.e. no more than 100Mb total in size.
Is this a configuration issue of some sort or a database corruption issue.
==================
TITLE: Microsoft SQL Server Management Studio Express
--
Attach database failed for Server 'ONLINE-INT'.
(Microsoft.SqlServer.Express.Smo)
--
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)
--
Could not allocate space for object 'events' in database 'port' because the
'DEFAULT' filegroup is full.
Error while undoing logged operation in database 'port'. Error at log record
ID (11807:19741:34).
Could not open new database 'port'. CREATE DATABASE is aborted.
1 transactions rolled forward in database 'port' (10). (Microsoft SQL
Server, Error: 1105)
PSernzHi
Do you have free space on the filesystem ?
"PSernz" <PSernz@.discussions.microsoft.com> wrote in message
news:E2EAFD34-01F0-4887-A7D0-134D73EEC501@.microsoft.com...
> We are getting the error below when trying to attach a MS SQL 2005 Express
> Database with a size of around 2GB.
> The database had some issues before we detached the database and now we
> can
> not attach.
> There are a number of other databases in the primary filegroup but they
> are
> all very small i.e. no more than 100Mb total in size.
> Is this a configuration issue of some sort or a database corruption issue.
>
> ==================> TITLE: Microsoft SQL Server Management Studio Express
> --
> Attach database failed for Server 'ONLINE-INT'.
> (Microsoft.SqlServer.Express.Smo)
> --
> ADDITIONAL INFORMATION:
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.Express.ConnectionInfo)
> --
> Could not allocate space for object 'events' in database 'port' because
> the
> 'DEFAULT' filegroup is full.
> Error while undoing logged operation in database 'port'. Error at log
> record
> ID (11807:19741:34).
> Could not open new database 'port'. CREATE DATABASE is aborted.
> 1 transactions rolled forward in database 'port' (10). (Microsoft SQL
> Server, Error: 1105)
>
>
> PSernz|||Yes I have 5Gb free on the disk that contains all Primary files.
PSernz
"Uri Dimant" wrote:
> Hi
> Do you have free space on the filesystem ?
>
>
> "PSernz" <PSernz@.discussions.microsoft.com> wrote in message
> news:E2EAFD34-01F0-4887-A7D0-134D73EEC501@.microsoft.com...
> > We are getting the error below when trying to attach a MS SQL 2005 Express
> > Database with a size of around 2GB.
> >
> > The database had some issues before we detached the database and now we
> > can
> > not attach.
> >
> > There are a number of other databases in the primary filegroup but they
> > are
> > all very small i.e. no more than 100Mb total in size.
> >
> > Is this a configuration issue of some sort or a database corruption issue.
> >
> >
> > ==================> >
> > TITLE: Microsoft SQL Server Management Studio Express
> > --
> >
> > Attach database failed for Server 'ONLINE-INT'.
> > (Microsoft.SqlServer.Express.Smo)
> >
> > --
> > ADDITIONAL INFORMATION:
> >
> > An exception occurred while executing a Transact-SQL statement or batch.
> >
> > (Microsoft.SqlServer.Express.ConnectionInfo)
> >
> > --
> >
> > Could not allocate space for object 'events' in database 'port' because
> > the
> > 'DEFAULT' filegroup is full.
> > Error while undoing logged operation in database 'port'. Error at log
> > record
> > ID (11807:19741:34).
> > Could not open new database 'port'. CREATE DATABASE is aborted.
> > 1 transactions rolled forward in database 'port' (10). (Microsoft SQL
> > Server, Error: 1105)
> >
> >
> >
> >
> > PSernz
>
>|||Hi
Do you have valid BACKUP of the database? Have you tried RESTORE?
"PSernz" <PSernz@.discussions.microsoft.com> wrote in message
news:0F6C0960-F410-46D5-87AE-8890D3163D55@.microsoft.com...
> Yes I have 5Gb free on the disk that contains all Primary files.
>
> --
> PSernz
>
> "Uri Dimant" wrote:
>> Hi
>> Do you have free space on the filesystem ?
>>
>>
>> "PSernz" <PSernz@.discussions.microsoft.com> wrote in message
>> news:E2EAFD34-01F0-4887-A7D0-134D73EEC501@.microsoft.com...
>> > We are getting the error below when trying to attach a MS SQL 2005
>> > Express
>> > Database with a size of around 2GB.
>> >
>> > The database had some issues before we detached the database and now we
>> > can
>> > not attach.
>> >
>> > There are a number of other databases in the primary filegroup but they
>> > are
>> > all very small i.e. no more than 100Mb total in size.
>> >
>> > Is this a configuration issue of some sort or a database corruption
>> > issue.
>> >
>> >
>> > ==================>> >
>> > TITLE: Microsoft SQL Server Management Studio Express
>> > --
>> >
>> > Attach database failed for Server 'ONLINE-INT'.
>> > (Microsoft.SqlServer.Express.Smo)
>> >
>> > --
>> > ADDITIONAL INFORMATION:
>> >
>> > An exception occurred while executing a Transact-SQL statement or
>> > batch.
>> >
>> > (Microsoft.SqlServer.Express.ConnectionInfo)
>> >
>> > --
>> >
>> > Could not allocate space for object 'events' in database 'port' because
>> > the
>> > 'DEFAULT' filegroup is full.
>> > Error while undoing logged operation in database 'port'. Error at log
>> > record
>> > ID (11807:19741:34).
>> > Could not open new database 'port'. CREATE DATABASE is aborted.
>> > 1 transactions rolled forward in database 'port' (10). (Microsoft SQL
>> > Server, Error: 1105)
>> >
>> >
>> >
>> >
>> > PSernz
>>|||Unfortunately not and hence we are hopeful that this is a config issue and
not a data integrity issue.
--
PSernz
"Uri Dimant" wrote:
> Hi
> Do you have valid BACKUP of the database? Have you tried RESTORE?
>
>
> "PSernz" <PSernz@.discussions.microsoft.com> wrote in message
> news:0F6C0960-F410-46D5-87AE-8890D3163D55@.microsoft.com...
> > Yes I have 5Gb free on the disk that contains all Primary files.
> >
> >
> > --
> > PSernz
> >
> >
> > "Uri Dimant" wrote:
> >
> >> Hi
> >> Do you have free space on the filesystem ?
> >>
> >>
> >>
> >>
> >> "PSernz" <PSernz@.discussions.microsoft.com> wrote in message
> >> news:E2EAFD34-01F0-4887-A7D0-134D73EEC501@.microsoft.com...
> >> > We are getting the error below when trying to attach a MS SQL 2005
> >> > Express
> >> > Database with a size of around 2GB.
> >> >
> >> > The database had some issues before we detached the database and now we
> >> > can
> >> > not attach.
> >> >
> >> > There are a number of other databases in the primary filegroup but they
> >> > are
> >> > all very small i.e. no more than 100Mb total in size.
> >> >
> >> > Is this a configuration issue of some sort or a database corruption
> >> > issue.
> >> >
> >> >
> >> > ==================> >> >
> >> > TITLE: Microsoft SQL Server Management Studio Express
> >> > --
> >> >
> >> > Attach database failed for Server 'ONLINE-INT'.
> >> > (Microsoft.SqlServer.Express.Smo)
> >> >
> >> > --
> >> > ADDITIONAL INFORMATION:
> >> >
> >> > An exception occurred while executing a Transact-SQL statement or
> >> > batch.
> >> >
> >> > (Microsoft.SqlServer.Express.ConnectionInfo)
> >> >
> >> > --
> >> >
> >> > Could not allocate space for object 'events' in database 'port' because
> >> > the
> >> > 'DEFAULT' filegroup is full.
> >> > Error while undoing logged operation in database 'port'. Error at log
> >> > record
> >> > ID (11807:19741:34).
> >> > Could not open new database 'port'. CREATE DATABASE is aborted.
> >> > 1 transactions rolled forward in database 'port' (10). (Microsoft SQL
> >> > Server, Error: 1105)
> >> >
> >> >
> >> >
> >> >
> >> > PSernz
> >>
> >>
> >>
>
>

Could not allocate space because the 'DEFAULT' filegroup is full.

We are getting the error below when trying to attach a MS SQL 2005 Express
Database with a size of around 2GB.
The database had some issues before we detached the database and now we can
not attach.
There are a number of other databases in the primary filegroup but they are
all very small i.e. no more than 100Mb total in size.
Is this a configuration issue of some sort or a database corruption issue.
==================
TITLE: Microsoft SQL Server Management Studio Express
--
Attach database failed for Server 'ONLINE-INT'.
(Microsoft.SqlServer.Express.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.Express.ConnectionInfo)
Could not allocate space for object 'events' in database 'port' because the
'DEFAULT' filegroup is full.
Error while undoing logged operation in database 'port'. Error at log record
ID (11807:19741:34).
Could not open new database 'port'. CREATE DATABASE is aborted.
1 transactions rolled forward in database 'port' (10). (Microsoft SQL
Server, Error: 1105)
PSernzHi
Do you have free space on the filesystem ?
"PSernz" <PSernz@.discussions.microsoft.com> wrote in message
news:E2EAFD34-01F0-4887-A7D0-134D73EEC501@.microsoft.com...
> We are getting the error below when trying to attach a MS SQL 2005 Express
> Database with a size of around 2GB.
> The database had some issues before we detached the database and now we
> can
> not attach.
> There are a number of other databases in the primary filegroup but they
> are
> all very small i.e. no more than 100Mb total in size.
> Is this a configuration issue of some sort or a database corruption issue.
>
> ==================
> TITLE: Microsoft SQL Server Management Studio Express
> --
> Attach database failed for Server 'ONLINE-INT'.
> (Microsoft.SqlServer.Express.Smo)
> --
> ADDITIONAL INFORMATION:
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.Express.ConnectionInfo)
> --
> Could not allocate space for object 'events' in database 'port' because
> the
> 'DEFAULT' filegroup is full.
> Error while undoing logged operation in database 'port'. Error at log
> record
> ID (11807:19741:34).
> Could not open new database 'port'. CREATE DATABASE is aborted.
> 1 transactions rolled forward in database 'port' (10). (Microsoft SQL
> Server, Error: 1105)
>
>
> PSernz