Showing posts with label based. Show all posts
Showing posts with label based. Show all posts

Friday, March 30, 2012

Pros and Cons

Hi,
I'm writing a proposal for a DR solution for a SQL based application. I've
been looking at clustering, database mirroring, etc. Has anyone come across
any documentation discussing the pro's and cons of the various options
available?
Thanks
Clustering has a distance limitation. Database mirroring is not scalable
beyond 10 or so databases but has no clustering limitation. Clustering
requires expensive hardware. Database Mirroring does not. Database
Mirroring is available on developer and Enterprise and above versions of SQL
Server 2005. Clustering is available on EE versions of SQL 7 and above, and
also on SQL Server Standard in SQL 2005.
Database Mirroring does add some latency to each transaction and as it is
hostbased it works best for low loads on SQL Server. If you have high cpu
utilization your database mirroring solution is likely to fail.
You neglect to mention log shipping and replication in your list of DR
solutions. Both of these word well as well. Log shipping does increase your
exposure to data loss, and is not really scalable beyond a certain size and
number of databases. Replication replicates on an object level and has no
limitation. Failback can be complex.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Hardmandez" <Hardmandez@.discussions.microsoft.com> wrote in message
news:F2DB4016-3D90-4438-B49D-B7B4F76CE03D@.microsoft.com...
> Hi,
> I'm writing a proposal for a DR solution for a SQL based application.
> I've
> been looking at clustering, database mirroring, etc. Has anyone come
> across
> any documentation discussing the pro's and cons of the various options
> available?
> Thanks
>
|||Also check out Stretch Clustering, which can be configured for SQL Server
failover clusters. This can extend the distance limitation mentioned
previously.
http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/hasog05.mspx
Anthony Thomas
"Hardmandez" <Hardmandez@.discussions.microsoft.com> wrote in message
news:7E081208-21B9-43D1-A241-A2B15E118575@.microsoft.com...
> Thanks for that Hilary, some good points there. Still to get to log
shipping
> and replication in my proposal. SQL isn't really my area of expertease so
> one more question, does SQL come with replication capabilities out of the
box[vbcol=seagreen]
> or when you talking about replication are you refering to products like
> Neverfail?
> "Hilary Cotter" wrote:
SQL[vbcol=seagreen]
and[vbcol=seagreen]
is[vbcol=seagreen]
cpu[vbcol=seagreen]
your[vbcol=seagreen]
and[vbcol=seagreen]
no[vbcol=seagreen]
|||I also have heard that rumor that Neverfail licenses their replication
from DoubleTake, however, this post from the VP of Product Management
from Neverfail denies that is the case. How long ago did Neverfail
tell you they licensed from DoubleTake? I suppose it may have been
true at one point, but apparently no longer.
[url]http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/375548336a1c2343/f7328f5f4ef3dfc1?lnk=st&q=Neverfail+DoubleTake&rnu m=5&hl=en#f7328f5f4ef3dfc1[/url]
If you ever compare the two products in terms of performance of the
replication, I think you will find that Neverfail's replication is much
more efficient. It is surprising that DoubleTake, being one of the
oldest data replication products around, really is behind everyone else
in terms of performance of their replication IMHO.
David A. Bermingham, MCSE, MCSA:Messaging
Senior Systems Engineer
www.steeleye.com
Hilary Cotter wrote:[vbcol=seagreen]
> Hi David.
> Last time I spoke with Neverfail they told me they licensed their technology
> from Doubletake. You are correct about DFS and Doubletake. My mistake, DFS
> does provide very similar services to Doubletake, and in some cases DFS is a
> better choice than Doubletake (for example in file replication).
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "daveberm" <david.bermingham@.steeleye.com> wrote in message
> news:1161871846.621466.57800@.m7g2000cwm.googlegrou ps.com...

Monday, March 12, 2012

Programmatically Specify SqlDataSource Parameters

I have a GridView bound to a SqlDataSource. On page load I would like to programmatically specify a SelectParameter value based on the role of the user. This SelectParameter will be used in my WHERE clause. The closest post I can find ishttp://forums.asp.net/thread/1233258.aspx but no answer was posted.

What code would I use to modify a SelectParameters value? Is it possible to reference a parameter by name (SqlDataSource1.SelectParameters["usertype"]) or does it have to be by index? (SqlDataSource1.SelectParameters[0])

Alternatively, perhaps I'm going about this in the wrong way, is there a better way to have dynamic GridView content based on the role of the user?

Thank you very much for your help.

Yes, you can set the value of a select parameters by name, for example
SqlDataSource1.SelectParameters["usertype"].DefaultValue ="role"
|||

Both parameter name and index are working here.

protected

void Page_Load(object sender,EventArgs e)

{

SqlDataSource1.SelectParameters[0].DefaultValue=

"yourvalue";

or

SqlDataSource1.SelectParameters["usertype"].DefaultValue="yourvalue";

}

|||

You can also set the value in the SqlDataSource_Selecting event via the e parameter:

Private Sub SqlDataSource1_Selecting(stuff)

e.command.paramter("param1").value=something

end sub

Friday, March 9, 2012

Programmatically hiding chart on the report page.

I need to show or hide a chart on my my report based on the result of the
dataset.
I tied to assign an expression to Visible.Hidden property of the chart like
that "=First(Fields.Visible.value)" WHERE I assigned 0 or 1 to the 'Visible'
column of my dataset. It did not work. Is there a way to do that?
Thank you,The result of the Visibility.Hidden expression has to be a boolean value and
not an integer value.
Try this instead:
=(0 = First(Fields.Visible.value))
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Simon Gold" <SimonGold@.discussions.microsoft.com> wrote in message
news:A7C5B8B9-5D26-43EE-B82B-0EAF7418AA7F@.microsoft.com...
>I need to show or hide a chart on my my report based on the result of the
> dataset.
> I tied to assign an expression to Visible.Hidden property of the chart
> like
> that "=First(Fields.Visible.value)" WHERE I assigned 0 or 1 to the
> 'Visible'
> column of my dataset. It did not work. Is there a way to do that?
> Thank you,
>

Programmatically doing new role assignments

Hello everyone -
A friend of mine is having some trouble using the browser based method
of assigning roles and I suggested that we do it programmatically just
in case errors were being suppressed by IE. So far I've seen a lot of
code that creates roles but none that assigns the role to a Windows
group. So for example, I've seen code that can build a role called FOO
with tasks A,B,C associated but how can I assign WINDOMAIN\Users to
that role?
Thanks much,
David SeruyangeJust in case anyone else runs into this, it is done with a policy
object - a short snippet of code like this will do the trick:
MyRS.ReportingService tmp = new MyRS.ReportingService();
// below the NetworkCredential class accepts 3 arguments:
// USERNAME, PASSWORD, DOMAIN
// this is to connect to ReportServer so use an admin account
tmp.Credentials = new NetworkCredential("myusername", "mypassword",
"MYDOMAIN");
try{
Role[] roles = tmp.ListRoles();
foreach(Role r in roles){
if(r.Name == "Browser"){
// modify 'r'
bool bInherit;
Policy[] polis = tmp.GetPolicies("/", out bInherit);
Policy[] pcopy = new Policy[polis.Length + 1];
Array.Copy(polis, pcopy, polis.Length);
Policy np = new Policy();
// MAKE THIS USERNAME CORRESPOND WITH A
// DOMAIN ACCOUNT
np.GroupUserName = @."DOMAIN\User";
np.Roles = new Role[]{r};
pcopy[pcopy.Length -1] = np;
// ASSIGN THIS to the FOLDER that contains
// your report off the ROOT "/"
tmp.SetPolicies("/REPORTFOLDER",pcopy);
Console.Write("Policy assignment has been made.");
}
}
}
catch(Exception ex){
Console.WriteLine(ex.ToString());
}|||david.seruyange@.gmail.com wrote:
> group. So for example, I've seen code that can build a role called
> FOO with tasks A,B,C associated but how can I assign WINDOMAIN\Users
> to that role?
David,
look at bryan's blog under http://blogs.msdn.com/bryanke/articles/91726.aspx
You will find a really good example-script
regards
Frank

Wednesday, March 7, 2012

Programmatically create a Report Model

Hello,

What we'd like to do is programmatically generate and maintain a report model based on how the individual install is configured. I've found some documentation that makes me believe this is possible, but I'm hoping someone can nudge me in the right direction. The ReportingServices2005 class has several model related methods (CreateModel) and I found the .xsd for the semantic model XML file
(http://schemas.microsoft.com/sqlserver/2004/10/semanticmodeling/SemanticModeling.xsd),
but no real documentation on how to put together a Report Model document from scratch. Looking at the files generated from BIDS is somewhat overwhelming and I have no idea where I'd pull most of the information.

Finally, I want to create Report Model(.smdl) file without Report Model Designer.

I want to Implement CreateModel Method to create new model, any source code sample..?


Any help that can be provided would be greatly appreciated. Thanks!

Sandip.

I am not positive but I don't think that the CreateModel method is for what you think it is for. I think it is for creating an instance of the model, uploading it to a ReportServer. IOW you read in an SMDL file and push it to a server, update it -- various management purposes.

Or I could be looking at a different part of the RS API than you are, and you could be right <s>.

IAC, fond as I am of reading schemas and creating XML files from scratch, this one is tough because of all the guids. Probably your best bet would be to start with a basic one and add nodes into it based on the privileges and configuration for an individual install or user, for example adjust the data sources or adding some fields.

>L<

|||

How can I update report models in the report server programmatically?

I was able to publish report models from one server to another using .rss file. I used the method ".createmodel". However, this doesn't have the overwrite parameter unlike ".createreport" method.

Is there a way or command to do this?

Any help would be greatly appreciated(",). Thanks.|||

To start with, I should say that I'm not clear enough about models to understand why you think there are associated parameters. I don't understand the connection, I'm not that familiar with models and didn't think they had parameters.

IAC, yes there is some scripting associated with models and the best advice I can give you is to become familiar with the scripting utilitiy you'll find here: http://www.sqldbatips.com/showarticle.asp?ID=62 It will interrogate your reporting services server and generate scripts for you (including models). And you will learn a lot from what it shows. There is an example of the script it generates here: http://www.sqldbatips.com/samples/code/RSScripter/readme.htm#_script_model

>L<

|||

Lisa,

Thanks. Actually, I was able to find the answer on the same site you've given me( http://www.sqldbatips.com/showarticle.asp?ID=62 ) ...

I downloaded the scripter, run rsscripter.exe, on the scripting options>data/model, i checked update existing model and generate the script. On the generated script, I noticed that they have used .SetModelDefinition method to do this. So, to sum up:

.SetModelDefinition - used to update report models in the report server

.CreateReport - used to create/add report models in the report server

Thanks again

Saturday, February 25, 2012

Programatically Show Hide Report Members?

Does anyone know how to programatically show hide members (specificallytextboxes) in a report based on whether another field is Null orEmpty? I have tried to do something to the effect of
<code>
Sub ShowBox()
If Len(Fields!itm.Formula.Value)>0 Then
Fields!textbox30.Visibility = True
End If
End Sub
</code>
I put this in the code section under report properties but I get an error to the effect of
References to a non-shared member require an object reference
and
Expression does not produce a value
I know i am doing this totally wrong, can someone help me out?

thanks

in the textbox expression you can do something like :

=IIF(Len(Fields!itm.Formula.Value)>0, Fields!itm.Formula.Value, "")

|||

ndinakar wrote:

in the textbox expression you can do something like :

=IIF(Len(Fields!itm.Formula.Value)>0, Fields!itm.Formula.Value, "")


Just wondering if any one got any more ideas:
I tried this way:

=IIF((Fields!group1.Value)=Group2,Fields!Isuue.Value,

Fields!Name.Value = False) does not work.(By the way, Issue is a varchar field)

The exception is thrown saying

Microsoft.ReportingServices.ReportProcessing.ReportProcessingException

=IIF((Fields!group1.Value)=Group2,Fields!Issue.Value,

Fields!Name.Value = "") doesn't give any error but doesn't work properly.

It shows the column, doesn't hide it.

Even if it hides the coulmn it doesn't delete the space for that column because

there are already some items in that column as shown below

Group1

Name Issue Marks

ss sds 90

gss pds 90

Group2

Name Marks

ss 90

gss 90

Marks Column should be printed in the place of Issue column under group2. Is that possible