Tuesday, March 27, 2012
Change how command runs
DBID number instead of the database name to run the process. The
current loop does not keep the order if you add or remove databases
beecuse i am using the min() function.
DECLARE @.sql varchar(4000)
DECLARE @.db varchar(64)
SET @.db=''
SELECT @.db=min(name)
FROM master.dbo.sysdatabases
WHERE dbid > 4 and name > @.db
WHILE @.db is not null
BEGIN
SET @.sql='use ' +@.db + ' exec dbo.sp_UD_RebuildIndexes 30, 100'
EXEC (@.sql)
SELECT @.db=min(name)
FROM master.dbo.sysdatabases
WHERE dbid > 4 and name > @.db
END
Thanks
-Matt-not sure what are you exactly looking for.
but if you want to loop through the databases on the basis of DBID rather
than database name , then you can try following procedural code.
DECLARE @.sql varchar(4000)
DECLARE @.db int
SELECT @.db=min(dbid)
FROM master.dbo.sysdatabases
WHERE dbid > 4
WHILE @.db is not null
BEGIN
select @.sql='use ' + name + ' exec dbo.sp_UD_RebuildIndexes 30, 100'
from master..sysdatabases where dbid =@.db
EXEC (@.sql)
SELECT @.db=min(dbid)
FROM master.dbo.sysdatabases
WHERE dbid > @.db
END
"MKruer@.gmail.com" wrote:
> This should be an easy one. I want to change the command to use the
> DBID number instead of the database name to run the process. The
> current loop does not keep the order if you add or remove databases
> beecuse i am using the min() function.
> DECLARE @.sql varchar(4000)
> DECLARE @.db varchar(64)
> SET @.db=''
> SELECT @.db=min(name)
> FROM master.dbo.sysdatabases
> WHERE dbid > 4 and name > @.db
> WHILE @.db is not null
> BEGIN
> SET @.sql='use ' +@.db + ' exec dbo.sp_UD_RebuildIndexes 30, 100'
> EXEC (@.sql)
> SELECT @.db=min(name)
> FROM master.dbo.sysdatabases
> WHERE dbid > 4 and name > @.db
> END
> Thanks
> -Matt-
>|||That was it. The Query is to run a stored procedure that auto reindex
the entire Database. The only problem with the stored procedure is that
it only works on the database that it was executed on. This is more or
a temporary work around. Ideally I want to be able to specify
individual indexes directly using a table.
Creating a Stored Procedure to collect DB information and then run
another Stored Procedure using that information
http://groups.google.com/group/micr...bdb43d49fed239e
Query for Database, Table, Index name all on one list.
http://groups.google.com/group/micr...17098a35404820c|||That was it. The Query is to run a stored procedure that auto reindex
the entire Database. The only problem with the stored procedure is that
it only works on the database that it was executed on. This is more or
a temporary work around. Ideally I want to be able to specify
individual indexes directly using a table.
Creating a Stored Procedure to collect DB information and then run
another Stored Procedure using that information
http://groups.google.com/group/micr...bdb43d49fed239e
Query for Database, Table, Index name all on one list.
http://groups.google.com/group/micr...17098a35404820csql
change HH from 24 hrs to 12 hrs
hours(military time)
DATEPART(HH,@.ACTTIME)
How do I get 1 - 12 and instead of 0-23?Client side? Wouldn't it be nicer to let the end user choose how he/she
prefers to read the time?
Otherwise lookup the style parameter options on the CONVERT function.
David Portas
SQL Server MVP
--|||I hope the following helps you.
Declare @.ActTime DateTime
Set @.ActTime = '01/01/2005 11:15 PM'
Select Case
When DatePart(hh, @.ACTTIME) <= 12 Then DatePart(hh,@.ACTTIME)
ELSE DatePart(hh,@.ACTTIME) - 12
End
"LP" wrote:
> I have a time value that I want to display in 12 hours instead of 24
> hours(military time)
> DATEPART(HH,@.ACTTIME)
> How do I get 1 - 12 and instead of 0-23?
>|||It is called ISO-8601 and not "Military Time" and it is used in a ton
of ISO standards. Why do you wish to destroy the portability of your
data and violate standards?
The basic priniciple of a tiered architecture is that the applications
do the display work, not the database.|||No server side. It's for a static dimension table. I don't see the utility
in it but the client request pays the bills. I have most of it compete.
I'll include it tomorrow.
Thanks
"David Portas" wrote:
> Client side? Wouldn't it be nicer to let the end user choose how he/she
> prefers to read the time?
> Otherwise lookup the style parameter options on the CONVERT function.
> --
> David Portas
> SQL Server MVP
> --
>
>|||No destruction in mind. Simply fulfilling a client request for a static
dimension table. The utility of this field is a bit in question...but it
pays the bills.
Thanks
"--CELKO--" wrote:
> It is called ISO-8601 and not "Military Time" and it is used in a ton
> of ISO standards. Why do you wish to destroy the portability of your
> data and violate standards?
> The basic priniciple of a tiered architecture is that the applications
> do the display work, not the database.
>|||Thanks for getting back with me. I found another way around the issue and
I'll post it tomotrrow because it might be helpfull for others.
Thanks again.
LP
"satheeshks" wrote:
> I hope the following helps you.
> Declare @.ActTime DateTime
> Set @.ActTime = '01/01/2005 11:15 PM'
> Select Case
> When DatePart(hh, @.ACTTIME) <= 12 Then DatePart(hh,@.ACTTIME)
> ELSE DatePart(hh,@.ACTTIME) - 12
> End
> "LP" wrote:
>
Thursday, March 22, 2012
Change Default Filename with Export?
format (e.g. PDF), when I choose "Save" (instead of Open) the default
filename is listed as "ThisReportName.pdf". I need to have the "Save As"
name to be very specific (e.g. include the date and the customer ID, like
EN12345-9-27-07.pdf) and ready to save without any typing by the end-user.
I cannot find a URL parameter that will change the default filename (to be
saved) for an exported PDF. Is this possible with SSRS?
Thanks for any help or direction.On Sep 27, 12:10 pm, "Don Miller" <nos...@.nospam.com> wrote:
> When I use URL Access to render a report with specified parameters and a
> format (e.g. PDF), when I choose "Save" (instead of Open) the default
> filename is listed as "ThisReportName.pdf". I need to have the "Save As"
> name to be very specific (e.g. include the date and the customer ID, like
> EN12345-9-27-07.pdf) and ready to save without any typing by the end-user.
> I cannot find a URL parameter that will change the default filename (to be
> saved) for an exported PDF. Is this possible with SSRS?
> Thanks for any help or direction.
I believe that I answered this question in your other posting.
Regards,
Enrique Martinez
Sr. Software Consultant
Change default DATEFIRST in SQL2000
How do I change sql server default DATEFIRST = 7 setting for SQL 2000 to
DATEFIRST = 1?
I am asing to do it globally instead of doing SET DATEFIRST = 1 in sp.
Thank you in advance.
ShaileshHi Shailesh, the SET commands are used at session level not server level.
DATEFIRST inherits it setting from SET LANGUAGE, this in turn gets it from
the language specified for the login. The defualt language for each login
can be changed via sp_configure.
Changing the language for each login may acheive what you're after, however
i would just use SET DATEFIRST in your procs / batches
HTH. Ryan
"Shailesh Patel" <shailesh@.urnerbarry.com> wrote in message
news:ucADm1UFGHA.516@.TK2MSFTNGP15.phx.gbl...
> Hi,
> How do I change sql server default DATEFIRST = 7 setting for SQL 2000 to
> DATEFIRST = 1?
> I am asing to do it globally instead of doing SET DATEFIRST = 1 in sp.
> Thank you in advance.
> Shailesh
>sql
Monday, March 19, 2012
change current database in stored procedure
Instead of going into each of them and change the table names to fully
qualified name, is there a command that I can set the current database? I
know USE does not work in sp. Any help will be highly appreciated!
USE will work in dynamic SQL I think, e.g.
EXEC('USE somedb; EXEC someproc;')
However, if you're going to bother going in and putting USE statements or
something similar, why not just go in and put in the fully qualified name?
I don't see what you will be saving by NOT putting in the fully qualified
names...
"Ed" <Ed@.discussions.microsoft.com> wrote in message
news:41263B68-0B3A-4472-9FFE-54BF6CF9066C@.microsoft.com...
>I am trying to move whole bunch of stored procedures from 1 db to another.
> Instead of going into each of them and change the table names to fully
> qualified name, is there a command that I can set the current database? I
> know USE does not work in sp. Any help will be highly appreciated!
|||Thanks for your response, Chew. It was just because we have too many stored
procedures that we need to move. Each of them uses so many tables. Going
into each of them and change the table names will literally kill me.
However, I do think change them to fully qualified names is the right thing
to do. At the mean time, we just want a quick solution. I tried doing
exec('use db') and it did not work.
alter procedure junk
as
begin
exec ('use abc')
select * from iv00101 where itemnmbr = '12345'
end
"Foo Man Chew" wrote:
> USE will work in dynamic SQL I think, e.g.
> EXEC('USE somedb; EXEC someproc;')
> However, if you're going to bother going in and putting USE statements or
> something similar, why not just go in and put in the fully qualified name?
> I don't see what you will be saving by NOT putting in the fully qualified
> names...
>
> "Ed" <Ed@.discussions.microsoft.com> wrote in message
> news:41263B68-0B3A-4472-9FFE-54BF6CF9066C@.microsoft.com...
>
>
|||1. Move all the stored procecures from DatabaseA to DatabaseB
2. Create views in databaseB with same name as in DatabaseA
Database A
=======
TableA
CREATE PROC Proc1
AS
SELECT * FROM TableA
DatabaseB
create a View
CREATE VIEW TableA
AS
SELECT * FROM DatabaseA.dbo.TableA
Move the Procedures
This way you don't have to touch you code. All you need to do create buch of
views
Thanks
Ravi
"Ed" wrote:
[vbcol=seagreen]
> Thanks for your response, Chew. It was just because we have too many stored
> procedures that we need to move. Each of them uses so many tables. Going
> into each of them and change the table names will literally kill me.
> However, I do think change them to fully qualified names is the right thing
> to do. At the mean time, we just want a quick solution. I tried doing
> exec('use db') and it did not work.
> alter procedure junk
> as
> begin
> exec ('use abc')
> select * from iv00101 where itemnmbr = '12345'
> end
> "Foo Man Chew" wrote:
|||Ed wrote:[vbcol=seagreen]
> Thanks for your response, Chew. It was just because we have too many
> stored procedures that we need to move. Each of them uses so many
> tables. Going into each of them and change the table names will
> literally kill me. However, I do think change them to fully qualified
> names is the right thing to do. At the mean time, we just want a
> quick solution. I tried doing exec('use db') and it did not work.
> alter procedure junk
> as
> begin
> exec ('use abc')
> select * from iv00101 where itemnmbr = '12345'
> end
> "Foo Man Chew" wrote:
EXEC runs in its own context. Just fully qualify using DB.OWNER.SPNAME.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||> exec('use db') and it did not work.
Because that is not what I said to do.
You need to do everything inside a single EXEC.
EXEC('Use somedb; EXEC someproc')
change current database in stored procedure
Instead of going into each of them and change the table names to fully
qualified name, is there a command that I can set the current database? I
know USE does not work in sp. Any help will be highly appreciated!USE will work in dynamic SQL I think, e.g.
EXEC('USE somedb; EXEC someproc;')
However, if you're going to bother going in and putting USE statements or
something similar, why not just go in and put in the fully qualified name?
I don't see what you will be saving by NOT putting in the fully qualified
names...
"Ed" <Ed@.discussions.microsoft.com> wrote in message
news:41263B68-0B3A-4472-9FFE-54BF6CF9066C@.microsoft.com...
>I am trying to move whole bunch of stored procedures from 1 db to another.
> Instead of going into each of them and change the table names to fully
> qualified name, is there a command that I can set the current database? I
> know USE does not work in sp. Any help will be highly appreciated!|||Thanks for your response, Chew. It was just because we have too many stored
procedures that we need to move. Each of them uses so many tables. Going
into each of them and change the table names will literally kill me.
However, I do think change them to fully qualified names is the right thing
to do. At the mean time, we just want a quick solution. I tried doing
exec('use db') and it did not work.
alter procedure junk
as
begin
exec ('use abc')
select * from iv00101 where itemnmbr = '12345'
end
"Foo Man Chew" wrote:
> USE will work in dynamic SQL I think, e.g.
> EXEC('USE somedb; EXEC someproc;')
> However, if you're going to bother going in and putting USE statements or
> something similar, why not just go in and put in the fully qualified name?
> I don't see what you will be saving by NOT putting in the fully qualified
> names...
>
> "Ed" <Ed@.discussions.microsoft.com> wrote in message
> news:41263B68-0B3A-4472-9FFE-54BF6CF9066C@.microsoft.com...
> >I am trying to move whole bunch of stored procedures from 1 db to another.
> > Instead of going into each of them and change the table names to fully
> > qualified name, is there a command that I can set the current database? I
> > know USE does not work in sp. Any help will be highly appreciated!
>
>|||1. Move all the stored procecures from DatabaseA to DatabaseB
2. Create views in databaseB with same name as in DatabaseA
Database A
=======TableA
CREATE PROC Proc1
AS
SELECT * FROM TableA
DatabaseB
create a View
CREATE VIEW TableA
AS
SELECT * FROM DatabaseA.dbo.TableA
Move the Procedures
This way you don't have to touch you code. All you need to do create buch of
views
Thanks
Ravi
"Ed" wrote:
> Thanks for your response, Chew. It was just because we have too many stored
> procedures that we need to move. Each of them uses so many tables. Going
> into each of them and change the table names will literally kill me.
> However, I do think change them to fully qualified names is the right thing
> to do. At the mean time, we just want a quick solution. I tried doing
> exec('use db') and it did not work.
> alter procedure junk
> as
> begin
> exec ('use abc')
> select * from iv00101 where itemnmbr = '12345'
> end
> "Foo Man Chew" wrote:
> > USE will work in dynamic SQL I think, e.g.
> >
> > EXEC('USE somedb; EXEC someproc;')
> >
> > However, if you're going to bother going in and putting USE statements or
> > something similar, why not just go in and put in the fully qualified name?
> > I don't see what you will be saving by NOT putting in the fully qualified
> > names...
> >
> >
> > "Ed" <Ed@.discussions.microsoft.com> wrote in message
> > news:41263B68-0B3A-4472-9FFE-54BF6CF9066C@.microsoft.com...
> > >I am trying to move whole bunch of stored procedures from 1 db to another.
> > > Instead of going into each of them and change the table names to fully
> > > qualified name, is there a command that I can set the current database? I
> > > know USE does not work in sp. Any help will be highly appreciated!
> >
> >
> >|||Ed wrote:
> Thanks for your response, Chew. It was just because we have too many
> stored procedures that we need to move. Each of them uses so many
> tables. Going into each of them and change the table names will
> literally kill me. However, I do think change them to fully qualified
> names is the right thing to do. At the mean time, we just want a
> quick solution. I tried doing exec('use db') and it did not work.
> alter procedure junk
> as
> begin
> exec ('use abc')
> select * from iv00101 where itemnmbr = '12345'
> end
> "Foo Man Chew" wrote:
>> USE will work in dynamic SQL I think, e.g.
>> EXEC('USE somedb; EXEC someproc;')
>> However, if you're going to bother going in and putting USE
>> statements or something similar, why not just go in and put in the
>> fully qualified name? I don't see what you will be saving by NOT
>> putting in the fully qualified names...
>>
>> "Ed" <Ed@.discussions.microsoft.com> wrote in message
>> news:41263B68-0B3A-4472-9FFE-54BF6CF9066C@.microsoft.com...
>> I am trying to move whole bunch of stored procedures from 1 db to
>> another. Instead of going into each of them and change the table
>> names to fully qualified name, is there a command that I can set
>> the current database? I know USE does not work in sp. Any help
>> will be highly appreciated!
EXEC runs in its own context. Just fully qualify using DB.OWNER.SPNAME.
--
David Gugick
Quest Software
www.imceda.com
www.quest.com|||> exec('use db') and it did not work.
Because that is not what I said to do.
You need to do everything inside a single EXEC.
EXEC('Use somedb; EXEC someproc')
change current database in stored procedure
Instead of going into each of them and change the table names to fully
qualified name, is there a command that I can set the current database? I
know USE does not work in sp. Any help will be highly appreciated!USE will work in dynamic SQL I think, e.g.
EXEC('USE somedb; EXEC someproc;')
However, if you're going to bother going in and putting USE statements or
something similar, why not just go in and put in the fully qualified name?
I don't see what you will be saving by NOT putting in the fully qualified
names...
"Ed" <Ed@.discussions.microsoft.com> wrote in message
news:41263B68-0B3A-4472-9FFE-54BF6CF9066C@.microsoft.com...
>I am trying to move whole bunch of stored procedures from 1 db to another.
> Instead of going into each of them and change the table names to fully
> qualified name, is there a command that I can set the current database? I
> know USE does not work in sp. Any help will be highly appreciated!|||Thanks for your response, Chew. It was just because we have too many stored
procedures that we need to move. Each of them uses so many tables. Going
into each of them and change the table names will literally kill me.
However, I do think change them to fully qualified names is the right thing
to do. At the mean time, we just want a quick solution. I tried doing
exec('use db') and it did not work.
alter procedure junk
as
begin
exec ('use abc')
select * from iv00101 where itemnmbr = '12345'
end
"Foo Man Chew" wrote:
> USE will work in dynamic SQL I think, e.g.
> EXEC('USE somedb; EXEC someproc;')
> However, if you're going to bother going in and putting USE statements or
> something similar, why not just go in and put in the fully qualified name?
'
> I don't see what you will be saving by NOT putting in the fully qualified
> names...
>
> "Ed" <Ed@.discussions.microsoft.com> wrote in message
> news:41263B68-0B3A-4472-9FFE-54BF6CF9066C@.microsoft.com...
>
>|||1. Move all the stored procecures from DatabaseA to DatabaseB
2. Create views in databaseB with same name as in DatabaseA
Database A
=======
TableA
CREATE PROC Proc1
AS
SELECT * FROM TableA
DatabaseB
create a View
CREATE VIEW TableA
AS
SELECT * FROM DatabaseA.dbo.TableA
Move the Procedures
This way you don't have to touch you code. All you need to do create buch of
views
Thanks
Ravi
"Ed" wrote:
[vbcol=seagreen]
> Thanks for your response, Chew. It was just because we have too many stor
ed
> procedures that we need to move. Each of them uses so many tables. Going
> into each of them and change the table names will literally kill me.
> However, I do think change them to fully qualified names is the right thin
g
> to do. At the mean time, we just want a quick solution. I tried doing
> exec('use db') and it did not work.
> alter procedure junk
> as
> begin
> exec ('use abc')
> select * from iv00101 where itemnmbr = '12345'
> end
> "Foo Man Chew" wrote:
>|||Ed wrote:[vbcol=seagreen]
> Thanks for your response, Chew. It was just because we have too many
> stored procedures that we need to move. Each of them uses so many
> tables. Going into each of them and change the table names will
> literally kill me. However, I do think change them to fully qualified
> names is the right thing to do. At the mean time, we just want a
> quick solution. I tried doing exec('use db') and it did not work.
> alter procedure junk
> as
> begin
> exec ('use abc')
> select * from iv00101 where itemnmbr = '12345'
> end
> "Foo Man Chew" wrote:
>
EXEC runs in its own context. Just fully qualify using DB.OWNER.SPNAME.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||> exec('use db') and it did not work.
Because that is not what I said to do.
You need to do everything inside a single EXEC.
EXEC('Use somedb; EXEC someproc')
Change CSV export to TAB delimited
I want to change the CSV export to TAB delimited instead of comma delimited
in order Excel to open it properly without defining the delimiter each time I
open the export. I define the following in rsreportserver.config:
<Extension Name="CSV-TAB"
Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
<OverrideNames>
<Name Language="en-US">CSV - TAB Delimited</Name>
</OverrideNames>
<Configuration>
<DeviceInfo>
<FieldDelimiter> </FieldDelimiter>
</DeviceInfo>
</Configuration>
</Extension>
but I still get comma delimited file.
Thanks,
Ronen Fidel
UnisfairI have never tried this, but perhaps you need to use \t ?
=-Chris
"FidelR" <fidelr@.newsgroups.nospam> wrote in message
news:7CC6BBEB-95AA-4205-8426-646A07974B51@.microsoft.com...
> Hi,
> I want to change the CSV export to TAB delimited instead of comma
> delimited
> in order Excel to open it properly without defining the delimiter each
> time I
> open the export. I define the following in rsreportserver.config:
> <Extension Name="CSV-TAB"
> Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
> <OverrideNames>
> <Name Language="en-US">CSV - TAB Delimited</Name>
> </OverrideNames>
> <Configuration>
> <DeviceInfo>
> <FieldDelimiter> </FieldDelimiter>
> </DeviceInfo>
> </Configuration>
> </Extension>
> but I still get comma delimited file.
> Thanks,
> Ronen Fidel
> Unisfair|||I tried \t and %09 but I still get comma delimited file. There are notes in
some web forums that claim that this is a known bug. Can you or anyone else
confirm that?
Thanks,
Ronen Fidel
Unisfair
"Chris Conner" wrote:
> I have never tried this, but perhaps you need to use \t ?
> =-Chris
> "FidelR" <fidelr@.newsgroups.nospam> wrote in message
> news:7CC6BBEB-95AA-4205-8426-646A07974B51@.microsoft.com...
> > Hi,
> >
> > I want to change the CSV export to TAB delimited instead of comma
> > delimited
> > in order Excel to open it properly without defining the delimiter each
> > time I
> > open the export. I define the following in rsreportserver.config:
> > <Extension Name="CSV-TAB"
> > Type="Microsoft.ReportingServices.Rendering.CsvRenderer.CsvReport,Microsoft.ReportingServices.CsvRendering">
> > <OverrideNames>
> > <Name Language="en-US">CSV - TAB Delimited</Name>
> > </OverrideNames>
> > <Configuration>
> > <DeviceInfo>
> > <FieldDelimiter> </FieldDelimiter>
> > </DeviceInfo>
> > </Configuration>
> > </Extension>
> > but I still get comma delimited file.
> >
> > Thanks,
> > Ronen Fidel
> > Unisfair
>
>
Thursday, March 8, 2012
Change an instance of SQL Server 2005
Hi All,
I have two drive, C and D. When first time I installed SQL Server 2005, I think that I point to C drive which is having only 10 GB, instead of drive D which has bigger space. Now, I have a problem of restoring my database due to lack of space on my C drive. Can anyone guide me to change the instance of database from drive C to drive D.
TIA
I am afraid you want to move data from C: to D: .
Stop sqlserver and move your data file from C: to D: .Default data file locates in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA
Start sql server and delete old database and right Databases ->choose attach ->choose add and select data file on D: ->click ok to finish.
Hope it helps.
|||Or simply sepecify a new location on D drive when restoring the database, just make sure the "Overwrite the existing database" option is checked.|||Thank you guys. It works and I don't have not enough space problem anymore.Saturday, February 25, 2012
certification question
on page 27, it says:
"INSTEAD OF triggers are useful when a DML operation is unsuccessful."
I think this is nonsense. Any comments?Ford Desperado (ford_desperado@.yahoo.com) writes:
> I am reading Administering SQL Server, a study guide for 70-228
> on page 27, it says:
> "INSTEAD OF triggers are useful when a DML operation is unsuccessful."
> I think this is nonsense. Any comments?
Without any context at all, the sentence certainly looks funny. It reminds
of what I once read in a manual from DEC: "Frequently, unexpected errors are
entirely unpredictable."
I guess what they are trying to say is that when you cannot insert, update
or delete directly on a view, because the view does not live up to the
rules, then you can achieve this with an INSTEAD OF trigger.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||>Without any context at all, the sentence certainly looks funny.
well there isn't any more context.
Thanks Erland|||It's certainly a strange comment in the absence of any context, as
Erland says. Another possible explanation might be that if you have to
INSERT data into a table where you know that some data will violate
constraints, an INSTEAD OF trigger could be used to INSERT only the
good data, and flag or log the bad data; if you did a single INSERT,
then it would all be rolled back.
Simon|||One more nonsense:
the book claims that db_denydatawriter " Can deny the write permissions
on any object"
According to BOL, db_denydatawriter Cannot modify any data in any user
table in the database, and BOL seems to be correct
I think the author, Joyjit Mukherjee, screwed it up|||It sounds like he took a guess based on the group name, rather than
look it up in BOL, which would make me wonder about the quality of the
rest of the book. I've seen the official MS Press MCDBA study guides,
and they seem to be quite good, but then I suppose they should be.
Incidentally, sp_dbfixedrolepermission gives quite a detailed (and
accurate) list of each role's permissions - it's a bit clearer than the
comments in BOL.
Simon
Thursday, February 16, 2012
Catching report exceptions
have built a custom ASP.NET report interface that launches reports using URL
access. When there is a problem displaying a report, I get the usual
reporting services error, but I would like to redirect to a custom report
page. How do I do that ?
Thanks, Craig"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:A040A3CA-2A55-4D2A-8410-75E2B353566D@.microsoft.com...
> Instead of using the Report Manager that comes with Reporting Services, I
> have built a custom ASP.NET report interface that launches reports using
> URL
> access. When there is a problem displaying a report, I get the usual
> reporting services error, but I would like to redirect to a custom report
> page. How do I do that ?
> Thanks, Craig
You can use web service Render method to catch an error, but if you want to
use URL approach, than
grab your's url output by using System.Net.HttpWebRequest ( or WebRequest)
class.
If the output is text based (HTML, CSV) - just convert returned by
WebResponse byte array to - char - string and check it for specific error
messages. If the output has to be binary (PDF, EXCEL, etc.) -just check
ContentType of your System.Net.WebResponse class and if it is "text/html" -
the error has occured ( you can always parse byte array to be sure as I
proposed above).