Tuesday, March 27, 2012
Auto Backup on SQL 2005 Express
2005 Express?
On Feb 28, 2:43 pm, b...@.nascospg.com
<bhaynascospg...@.discussions.microsoft.com> wrote:
> Is there a way to setup an automatic function to backup the databases in SQL
> 2005 Express?
You have to use the Windows scheduler to run the BACKUP DATABASE
command via SQLCMD.
|||what would be the syntax, i have not performed this before or used the SQLCMD?
thansk
"Tracy McKibben" wrote:
> On Feb 28, 2:43 pm, b...@.nascospg.com
> <bhaynascospg...@.discussions.microsoft.com> wrote:
> You have to use the Windows scheduler to run the BACKUP DATABASE
> command via SQLCMD.
>
|||Automating Database maintenance in SQL 2005 Express Edition Part I
http://www.sqldbatips.com/showarticle.asp?ID=27
Automating Database maintenance in SQL 2005 Express Edition Part II
http://www.sqldbatips.com/showarticle.asp?ID=29
"bhay@.nascospg.com" <bhaynascospgcom@.discussions.microsoft.com> wrote in
message news:861F5C58-F9C0-4D5C-BEA2-727BF73E7BD8@.microsoft.com...[vbcol=seagreen]
> what would be the syntax, i have not performed this before or used the
> SQLCMD?
> thansk
>
> "Tracy McKibben" wrote:
Auto Backup on SQL 2005 Express
2005 Express?On Feb 28, 2:43 pm, b...@.nascospg.com
<bhaynascospg...@.discussions.microsoft.com> wrote:
> Is there a way to setup an automatic function to backup the databases in S
QL
> 2005 Express?
You have to use the Windows scheduler to run the BACKUP DATABASE
command via SQLCMD.|||what would be the syntax, i have not performed this before or used the SQLCM
D?
thansk
"Tracy McKibben" wrote:
> On Feb 28, 2:43 pm, b...@.nascospg.com
> <bhaynascospg...@.discussions.microsoft.com> wrote:
> You have to use the Windows scheduler to run the BACKUP DATABASE
> command via SQLCMD.
>|||Automating Database maintenance in SQL 2005 Express Edition Part I
http://www.sqldbatips.com/showarticle.asp?ID=27
Automating Database maintenance in SQL 2005 Express Edition Part II
http://www.sqldbatips.com/showarticle.asp?ID=29
"bhay@.nascospg.com" <bhaynascospgcom@.discussions.microsoft.com> wrote in
message news:861F5C58-F9C0-4D5C-BEA2-727BF73E7BD8@.microsoft.com...[vbcol=seagreen]
> what would be the syntax, i have not performed this before or used the
> SQLCMD?
> thansk
>
> "Tracy McKibben" wrote:
>
Tuesday, March 20, 2012
Authentication IIS and SSRS
I have web app using ReportViewer on IIS Server to view reports on SQL
Server SSRS.
Both servers are on domain1.
Authentication was not working so on IIS web app in web.config in system.web
I say identity impersonate="true" userName="domain1\username"
password="password" then it works fine -- but is this correct way to do? I
don't like to have to have an account in there that has admin privs -- I
thought it should be just impersonate="true" and not have to send a domain
username/password?
I read many things on nntp about this topic but was unable to finad anything
to work except for the way I have it above.
Thank you!Why dont you enable anonymouse access and give everyone access in the
report server.
dev648237923 wrote:
> I have two servers IIS Server and SQL2005.
> I have web app using ReportViewer on IIS Server to view reports on SQL
> Server SSRS.
> Both servers are on domain1.
> Authentication was not working so on IIS web app in web.config in system.web
> I say identity impersonate="true" userName="domain1\username"
> password="password" then it works fine -- but is this correct way to do? I
> don't like to have to have an account in there that has admin privs -- I
> thought it should be just impersonate="true" and not have to send a domain
> username/password?
> I read many things on nntp about this topic but was unable to finad anything
> to work except for the way I have it above.
> Thank you!|||The Report Server is not exposed to the Internet -- only my web application
can get at it -- more secure that way (so my IIS server is public but the
SQL is not). I followed what Steve said and it worked great!
Thanks.
"sunil.jaikumar" <sunil.jaikumar@.gmail.com> wrote in message
news:1152863352.300856.43580@.m73g2000cwd.googlegroups.com...
> Why dont you enable anonymouse access and give everyone access in the
> report server.
> dev648237923 wrote:
>> I have two servers IIS Server and SQL2005.
>> I have web app using ReportViewer on IIS Server to view reports on SQL
>> Server SSRS.
>> Both servers are on domain1.
>> Authentication was not working so on IIS web app in web.config in
>> system.web
>> I say identity impersonate="true" userName="domain1\username"
>> password="password" then it works fine -- but is this correct way to do?
>> I
>> don't like to have to have an account in there that has admin privs -- I
>> thought it should be just impersonate="true" and not have to send a
>> domain
>> username/password?
>> I read many things on nntp about this topic but was unable to finad
>> anything
>> to work except for the way I have it above.
>> Thank you!
>|||" I followed what Steve said and it worked great!"
Does this refer to using local reports, as was stated in your other
post?
I've been prototyping using the impersonation and it works, but I don't
know what the security requirement is eventually going to be. I don't
mind cutting the RS server out of the equation.
dev648237923 wrote:
> The Report Server is not exposed to the Internet -- only my web application
> can get at it -- more secure that way (so my IIS server is public but the
> SQL is not). I followed what Steve said and it worked great!
> Thanks.
> "sunil.jaikumar" <sunil.jaikumar@.gmail.com> wrote in message
> news:1152863352.300856.43580@.m73g2000cwd.googlegroups.com...
> > Why dont you enable anonymouse access and give everyone access in the
> > report server.
> >
> > dev648237923 wrote:
> >> I have two servers IIS Server and SQL2005.
> >> I have web app using ReportViewer on IIS Server to view reports on SQL
> >> Server SSRS.
> >> Both servers are on domain1.
> >>
> >> Authentication was not working so on IIS web app in web.config in
> >> system.web
> >> I say identity impersonate="true" userName="domain1\username"
> >> password="password" then it works fine -- but is this correct way to do?
> >> I
> >> don't like to have to have an account in there that has admin privs -- I
> >> thought it should be just impersonate="true" and not have to send a
> >> domain
> >> username/password?
> >>
> >> I read many things on nntp about this topic but was unable to finad
> >> anything
> >> to work except for the way I have it above.
> >>
> >> Thank you!
> >|||> Does this refer to using local reports, as was stated in your other
> post?
I followed what Steve said to get IIS authentication working to SSRS server.
I'm not using local Reports anymore (reason is that I need to be able to use
some of the features only available in Report Server -- see below for some
goo dlinks comparing).
Some links on Local vs Report Server:
http://msdn2.microsoft.com/en-us/library/ms251704.aspx
http://www.devx.com/dotnet/Article/30424/0/page/4|||Anonymous access seems like it would work but wait until you try to
administer RS. Since you are anonymous there is no such thing as
administrator rights. Oops. So then to administer it you have to switch off
of anonymous and then turn it back on. Most people would not want to do
that.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"sunil.jaikumar" <sunil.jaikumar@.gmail.com> wrote in message
news:1152863352.300856.43580@.m73g2000cwd.googlegroups.com...
> Why dont you enable anonymouse access and give everyone access in the
> report server.
> dev648237923 wrote:
>> I have two servers IIS Server and SQL2005.
>> I have web app using ReportViewer on IIS Server to view reports on SQL
>> Server SSRS.
>> Both servers are on domain1.
>> Authentication was not working so on IIS web app in web.config in
>> system.web
>> I say identity impersonate="true" userName="domain1\username"
>> password="password" then it works fine -- but is this correct way to do?
>> I
>> don't like to have to have an account in there that has admin privs -- I
>> thought it should be just impersonate="true" and not have to send a
>> domain
>> username/password?
>> I read many things on nntp about this topic but was unable to finad
>> anything
>> to work except for the way I have it above.
>> Thank you!
>
Friday, February 24, 2012
Attn TSQL Challenge Seekers
Hi Folks - Well this is going to be a fun ride. I have a simple table that I need to do some slightly not so simple logic on. I am using SQL2005 and this happens in a stored proc. I need to do this in straight T-SQL and w/o using a cursor, you can use a CTE if needed.
I need to a variation on select cat, sum(thevalue) from TABLE1 group by cat
which results in
the wrinkle is that each item in the group by (A,B,C) needs to consider 1 row from each parentid. in other words if the system is calculating the C row, and a parentid is missing a C entry then the system needs to use the B entry for that parentid.
so to calculate the A row we simply do. this is simple because there is an A row for every parentid
the C row is the tricky part. there is no C for parentid 3, so in that case I need to use the next lower ranked item, which is a B
so after all is said and done the final result needs to look like this
Try:
Code Snippet
use tempdb
go
create table dbo.t1 (
ID int not null,
PARENTID int not null,
CAT char(1) not null,
CATRANK int not null,
THEVALUE int not null
)
go
insert into dbo.t1 values(1, 1, 'A', 0, 11)
insert into dbo.t1 values(2, 1, 'B', 1, 22)
insert into dbo.t1 values(3, 1, 'C', 2, 33)
insert into dbo.t1 values(4, 2, 'A', 0, 44)
insert into dbo.t1 values(5, 2, 'B', 1, 55)
insert into dbo.t1 values(6, 2, 'C', 2, 66)
insert into dbo.t1 values(7, 3, 'A', 0, 12)
insert into dbo.t1 values(8, 3, 'B', 1, 13)
insert into dbo.t1 values(9, 4, 'A', 0, 14)
insert into dbo.t1 values(10, 4, 'B', 1, 15)
insert into dbo.t1 values(11, 4, 'C', 2, 16)
go
select
c.cat,
sum(d.thevalue) as sum_thevalue
from
(
select
parentid,
cat,
catrank
from
(
select distinct
cat, catrank
from
dbo.t1
) as a
cross join
(
select distinct
parentid
from
dbo.t1
) as b
) as c
inner join
dbo.t1 as d
on d.parentid = c.parentid
and d.catrank = (
select max(e.catrank)
from dbo.t1 as e
where e.parentid = c.parentid and e.catrank <= c.catrank
)
group by
c.cat
order by
c.cat
go
drop table dbo.t1
go
AMB
|||Oh Snap! that was fast ... ty I will look at this