Showing posts with label creating. Show all posts
Showing posts with label creating. Show all posts

Thursday, March 29, 2012

Datatype <uniqueidentifier>

When creating table, now we usually include the colunm(Id) whose datatype is uniqueidentifier.

My first question is why choosing datatype as uniqueidentifier instead of int[identity(1,1)] if no replication needed.

My 2nd question is for the uniqueidentifier column, which index is appropriate for the column, cluster or non-cluster?

And the third question is how to set the default for the uniqueidentifier.which function is better, NewID() or NEWSEQUENTIALID()?

Thanks in advance.

uniqueidentifier is a type of GUID which means that it is unique. It is larger than int style fields and unless you are using NEWSEQUENTIALID() the new values are going to be random (so don't cluster on it unless you use that - or your insertion point will be random in your index). Even with NEWSEQUENTIALID() the values will not normally be consecutive, just increasing.

Generally I would use an identity column for a single table with no multi-source issues (uniqueidentifier is good if you are taking records from various places and merging them). It is smaller (4bytes for int, 8bytes for bigint as opposed to 16bytes for uniqueidentifier), and it is much easier to type in a SQL statement. It is also easier for the processor and memory access to deal with as a value.

As noted it is not a good idea to cluster on an random uniqueidentifier. Even if it increasing why do you want to cluster on it. Generally you do not query by a range of GUIDs. As clustering determines the grouping of the records on disk it is normally better to cluster by something that matches your common querying - to minimise the amount of disk access to return the record. Single record access (if you do retrieve by GUID) is not really affected by clustering as you are only after one record on one datapage.

|||

Here is some additional information that will help you resolve your question. (Generally, avoid GUIDs in situations where Replication is not involved.

GUID -Identity and Primary Keys
http://sqlteam.com/item.asp?ItemID=2599

GUID -Is not Always GOOD
http://bloggingabout.net/blogs/wellink/archive/2004/03/15/598.aspx

GUID -The Cost of GUIDs as Primary Keys
http://www.informit.com/articles/article.asp?p=25862&rl=1

GUID -Uniqueidentifier vs. IDENTITY
http://sqlteam.com/item.asp?ItemID=283

|||

1. Identity is better to use if you never planned for replication. It is one of the biggest datatype (16 Bytes) in the sql server. If you are going to use to identitfy your row then better use it Identity (int/smallint/bigint,1,1) is more enough. But GUID allocates 16 Bytes on each row.

2. Creating a index on GUID is really bad idea unless its required. Since the datatype is huge the indexes will occupy more space and the manipulation also slow.

3. Setting default value ColumnName UniqueIdentifier Default NEWID()

Tuesday, March 27, 2012

Datasource to AnalysisServices

I have a question regarding creating a datasource that connects to an
Analysis Services Database. (AS and RS are both 2005 editions.)
If I create a (shared) datasource to an Analysis server, and Specify the IP
address (10.200.23.24) of that server, I have no problems.
However, if I want to connect via HTTP, I am having a few problems.
-In the connection properties, I specify the Server Name to the HTTP url
(http://10.200.23.24/OLAP/msmdpump.dll)
-I specify a username and password with permissions to see the cubes and
data.
-I am able to select the database name from the dropdown list. (So,
obviously it is hitting the AS server, and the AS server is sending back the
databases in which I have permission to see.)
-If I select test connection, it initially fails, but if I go to the
advanced options, and remove the SSPI, test connection succeeds.
-Press OK to save the datasource, and run (preview) the report.
When I go to run (preview) the report, I get the following error:
"Non-Windows user credentials were supplied for a non-http connection to
Analysis Services. The Microsoft SQL Server Analysis Services data extension
requires Windows Integrated Security unless connecting via http or https"
I don't understand why I am getting that error when I am connecting via
http. Is there another property somewhere I have to turn on, so that it
knows I am using http?
As a side note, I know the HTTP connection works, as I can connect via HTTP
with both proclarity, and management studio. The problem only seems to be in
reporting services.
Any ideas?
-RyanHello Ryan,
What credetial mode you chose in the shared data source?
And have you follow this article to configure the HTTP access to AS 2005?
Configuring HTTP Access to SQL Server 2005 Analysis Services on Microsoft
Windows Server 2003
http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||The credentials are set at "Use a specific username and password".
I have the username of a local machine account on the server, and it's
password.
I've also tried the username in the format of MACHINENAME\UserName. That
didn't work either.
I know the http is set up properly, as I can access the cubes on that server
via HTTP with proclarity, and management studio, so I do not believe that is
the issue.
Does it have anything to do with the fact the report was designed with the
datasource pointing to a direct tcp connection, and then wanting to change
it to HTTP after the fact?
-Ryan
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:rvJmMbUNHHA.2300@.TK2MSFTNGHUB02.phx.gbl...
> Hello Ryan,
> What credetial mode you chose in the shared data source?
> And have you follow this article to configure the HTTP access to AS 2005?
> Configuring HTTP Access to SQL Server 2005 Analysis Services on Microsoft
> Windows Server 2003
> http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Here's a little bit more information:
The "Type" of the datasource is set as "Microsoft SQL Server Analysis
Services" . This is where I am having the issue where it works fine with tcp
connection, but HTTP connection gives the error.
If I change the type to OLEDB, and build a connection string to connect to
my cubes, when I preview the report, I get no errors.
However, nothing shows up for any of the queries. Warnings that say:
"The data set 'DatasetName' contains a definition for the Field 'FieldName'.
The field is missing from the returned resultset from the datasource."
Followed by:
"The data set 'DatasetName' contains a definition for the Field 'FieldName'.
The data extension returned an error during the reading of the field. THere
is no data for the field at position 5."
Further, I watched the profiler in analysis services, and it looks like the
right queries are being executed.
My questions are:
1. Do I have to use an OLEDB connection to use HTTP?
-If so, how do I get rid of the above errors? (Are they due to the fact
the datasets were designed with the analysis services connection type, then
switched to oledb?)
2. If I can use HTTP on the direct "Microsoft SQL Server Analysis Services"
connection type, is there anything else (advanced properties) that needs to
be set to make it work?
3. Has anyone successfully created a report using TCP on the direct
provider, then tried switching it to HTTP after the report was complete?
Thanks,
-Ryan|||Hello Ryan,
The reason why you could not connect to the Analysis Service Via http in
Reporting Services is because of the credential.
If you have enabled the Integrated Authentication in IIS, you need to use
the domain account. Or you need to specify a same account in the server as
the one you use in the local machine.
Please try this and let me know if this could not resolve your issue.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Thursday, March 22, 2012

Dataset Run finds 24 results, Preview displays 1 results

Hello All,
I am a newbie here coming from a Crystal development background and
intermediate skills with SQL. I seem to have various issues creating
all sorts of RS reports. I'm trying to start with "more modest"
reports to ease myself into the groove of using RS, but some things
that seem simple stump me.
I have a simple query that brings back 24 results. I used the wizard
to create a simple layout using 1 group (I expect 12 "subsections" by
using this group) with the details displayed under each group.
For whatever odd reason, even tho' running the query finds the 24
results, the Preview shows 1 result. I even removed the group and ran
all the details (tried refreshing) and only 1 result again.
Any ideas?
Thank you in advance
-ColleenOn Apr 27, 10:58 am, Colleen <colleenleon...@.gmail.com> wrote:
> Hello All,
> I am a newbie here coming from a Crystal development background and
> intermediate skills with SQL. I seem to have various issues creating
> all sorts of RS reports. I'm trying to start with "more modest"
> reports to ease myself into the groove of using RS, but some things
> that seem simple stump me.
> I have a simple query that brings back 24 results. I used the wizard
> to create a simple layout using 1 group (I expect 12 "subsections" by
> using this group) with the details displayed under each group.
> For whatever odd reason, even tho' running the query finds the 24
> results, the Preview shows 1 result. I even removed the group and ran
> all the details (tried refreshing) and only 1 result again.
> Any ideas?
> Thank you in advance
> -Colleen
It sounds kind-of like your group had the Property 'Page break at end'
set. Also, make sure you don't have a filter set. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||I think grouping has done with 1 row than 24
what you do is create a new project->report and place the same query and see
whether you get the same results. ofcourse place a table control and just
drag and drop a couple of fields and see whether you get 24 rows.?
Amarnath
"Colleen" wrote:
> Hello All,
> I am a newbie here coming from a Crystal development background and
> intermediate skills with SQL. I seem to have various issues creating
> all sorts of RS reports. I'm trying to start with "more modest"
> reports to ease myself into the groove of using RS, but some things
> that seem simple stump me.
> I have a simple query that brings back 24 results. I used the wizard
> to create a simple layout using 1 group (I expect 12 "subsections" by
> using this group) with the details displayed under each group.
> For whatever odd reason, even tho' running the query finds the 24
> results, the Preview shows 1 result. I even removed the group and ran
> all the details (tried refreshing) and only 1 result again.
> Any ideas?
> Thank you in advance
> -Colleen
>|||My guess is that you dragged and dropped your fields onto an empty canvas.
If you do this you will see only one record because you did not put either a
table or list control on the canvas first.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Colleen" <colleenleonard@.gmail.com> wrote in message
news:1177689534.303004.210340@.r30g2000prh.googlegroups.com...
> Hello All,
> I am a newbie here coming from a Crystal development background and
> intermediate skills with SQL. I seem to have various issues creating
> all sorts of RS reports. I'm trying to start with "more modest"
> reports to ease myself into the groove of using RS, but some things
> that seem simple stump me.
> I have a simple query that brings back 24 results. I used the wizard
> to create a simple layout using 1 group (I expect 12 "subsections" by
> using this group) with the details displayed under each group.
> For whatever odd reason, even tho' running the query finds the 24
> results, the Preview shows 1 result. I even removed the group and ran
> all the details (tried refreshing) and only 1 result again.
> Any ideas?
> Thank you in advance
> -Colleen
>|||Other things to check might be that you are not pulling the "first" value in your expression. In your Datasets drill down it may only offer the choice to pull your first value.
From http://www.developmentnow.com/g/115_2007_4_0_0_964026/Dataset-Run-finds-24-results-Preview-displays-1-results.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com|||On Apr 29, 8:45 pm, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
wrote:
> My guess is that you dragged and dropped your fields onto an empty canvas.
> If you do this you will see only one record because you did not put either a
> table or list control on the canvas first.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Colleen" <colleenleon...@.gmail.com> wrote in message
> news:1177689534.303004.210340@.r30g2000prh.googlegroups.com...
>
> > Hello All,
> > I am a newbie here coming from a Crystal development background and
> > intermediate skills with SQL. I seem to have various issues creating
> > all sorts of RS reports. I'm trying to start with "more modest"
> > reports to ease myself into the groove of using RS, but some things
> > that seem simple stump me.
> > I have a simple query that brings back 24 results. I used the wizard
> > to create a simple layout using 1 group (I expect 12 "subsections" by
> > using this group) with the details displayed under each group.
> > For whatever odd reason, even tho' running the query finds the 24
> > results, the Preview shows 1result. I even removed the group and ran
> > all the details (tried refreshing) and only 1resultagain.
> > Any ideas?
> > Thank you in advance
> > -Colleen- Hide quoted text -
> - Show quoted text -|||On Apr 29, 8:45 pm, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
wrote:
> My guess is that you dragged and dropped your fields onto an empty canvas.
> If you do this you will see only one record because you did not put either a
> table or list control on the canvas first.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Colleen" <colleenleon...@.gmail.com> wrote in message
> news:1177689534.303004.210340@.r30g2000prh.googlegroups.com...
>
> > Hello All,
> > I am a newbie here coming from a Crystal development background and
> > intermediate skills with SQL. I seem to have various issues creating
> > all sorts of RS reports. I'm trying to start with "more modest"
> > reports to ease myself into the groove of using RS, but some things
> > that seem simple stump me.
> > I have a simple query that brings back 24 results. I used the wizard
> > to create a simple layout using 1 group (I expect 12 "subsections" by
> > using this group) with the details displayed under each group.
> > For whatever odd reason, even tho' running the query finds the 24
> > results, the Preview shows 1result. I even removed the group and ran
> > all the details (tried refreshing) and only 1resultagain.
> > Any ideas?
> > Thank you in advance
> > -Colleen- Hide quoted text -
> - Show quoted text -
---
Not sure how to reply to ALL here... thank you ALL for your help.
I could not find evidence that I selected pulling the "first" value in
the expression
I did not populate my report on an "empty canvas" as I have been using
the Report Wizard for now until I become more acclimated.
I DID try and recreate my report from scratch and did not use the
group feature in the Report Wizard and *got the desired results*. I
didn't even set up the parameter and magically somehow the report
picked it up on its own (I've has issues with other reports that even
forcefully adding the parameters to the report still doesn't seem to
"use" them). So I added the group after I had all the details
displayed and so far it works, the output looks a little different
creating the group after you create the report vs creating the group
in the wizard, but I can't be picky at this point. 280+ report left
to convert!
Thank you all very much for your ideas... I wish I understood better
how to fix the problem vs starting over, but if that is what works
then so be it.
Thanks again
-Colleen|||One point to be aware of when testing.
When you preview the report in development it will cache the data and reuse
that unless a parameter value changes. This can cause you to see something
different in preview versus deployment. If you look at where your rdl files
are you will see a .data file. This file can be deleted to force it to hit
the server for the data. Or, if your report has a parameter then just pick a
different value.
Just a heads up.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Colleen" <colleenleonard@.gmail.com> wrote in message
news:1178028225.392190.64460@.c35g2000hsg.googlegroups.com...
> On Apr 29, 8:45 pm, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
> wrote:
>> My guess is that you dragged and dropped your fields onto an empty
>> canvas.
>> If you do this you will see only one record because you did not put
>> either a
>> table or list control on the canvas first.
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Colleen" <colleenleon...@.gmail.com> wrote in message
>> news:1177689534.303004.210340@.r30g2000prh.googlegroups.com...
>>
>> > Hello All,
>> > I am a newbie here coming from a Crystal development background and
>> > intermediate skills with SQL. I seem to have various issues creating
>> > all sorts of RS reports. I'm trying to start with "more modest"
>> > reports to ease myself into the groove of using RS, but some things
>> > that seem simple stump me.
>> > I have a simple query that brings back 24 results. I used the wizard
>> > to create a simple layout using 1 group (I expect 12 "subsections" by
>> > using this group) with the details displayed under each group.
>> > For whatever odd reason, even tho' running the query finds the 24
>> > results, the Preview shows 1result. I even removed the group and ran
>> > all the details (tried refreshing) and only 1resultagain.
>> > Any ideas?
>> > Thank you in advance
>> > -Colleen- Hide quoted text -
>> - Show quoted text -
> ---
> Not sure how to reply to ALL here... thank you ALL for your help.
> I could not find evidence that I selected pulling the "first" value in
> the expression
> I did not populate my report on an "empty canvas" as I have been using
> the Report Wizard for now until I become more acclimated.
> I DID try and recreate my report from scratch and did not use the
> group feature in the Report Wizard and *got the desired results*. I
> didn't even set up the parameter and magically somehow the report
> picked it up on its own (I've has issues with other reports that even
> forcefully adding the parameters to the report still doesn't seem to
> "use" them). So I added the group after I had all the details
> displayed and so far it works, the output looks a little different
> creating the group after you create the report vs creating the group
> in the wizard, but I can't be picky at this point. 280+ report left
> to convert!
> Thank you all very much for your ideas... I wish I understood better
> how to fix the problem vs starting over, but if that is what works
> then so be it.
> Thanks again
> -Colleen
>

Dataset problems with Stored Procedures.

I've noticed that SP:s that are more complex than just a simple
SELECT-statement don't work correctly when creating new datasets. The dataset
can't seem to populate the Fields when the SP does some additional work
before the SELECT. I know it's possible to create all the Fields manually,
but that isn't an option for us since we have a ton of reports with lots and
lots of fields. Is there another workaround for this? Maybe in SQL Server
2005?No answers? Is there really no way to solve this? This problem could be a
real show stopper for our current project...
"Patrik Ylén" wrote:
> I've noticed that SP:s that are more complex than just a simple
> SELECT-statement don't work correctly when creating new datasets. The dataset
> can't seem to populate the Fields when the SP does some additional work
> before the SELECT. I know it's possible to create all the Fields manually,
> but that isn't an option for us since we have a ton of reports with lots and
> lots of fields. Is there another workaround for this? Maybe in SQL Server
> 2005?|||Have you tried the refresh fields button (to the right of the ...)?
I have SP that do a lot (put data into multiple temp tables etc). The very
last statement is the select. So having stuff above the select matters not
at all. Sometimes I have to click on the refresh fields.
How are you calling the SP (i.e. are you doing an exec or have you set the
command type to stored procedure).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Patrik Ylén" <PatrikYln@.discussions.microsoft.com> wrote in message
news:FB603E2E-CBD1-4773-BF3C-7B4EC6B328A6@.microsoft.com...
> No answers? Is there really no way to solve this? This problem could be a
> real show stopper for our current project...
> "Patrik Ylén" wrote:
>> I've noticed that SP:s that are more complex than just a simple
>> SELECT-statement don't work correctly when creating new datasets. The
>> dataset
>> can't seem to populate the Fields when the SP does some additional work
>> before the SELECT. I know it's possible to create all the Fields
>> manually,
>> but that isn't an option for us since we have a ton of reports with lots
>> and
>> lots of fields. Is there another workaround for this? Maybe in SQL Server
>> 2005?|||Hmm, it works now. I don't know what I did when I tried it the last time, but
it must've been wrong! :-)
Thanks,
Patrik
"Bruce L-C [MVP]" wrote:
> Have you tried the refresh fields button (to the right of the ...)?
> I have SP that do a lot (put data into multiple temp tables etc). The very
> last statement is the select. So having stuff above the select matters not
> at all. Sometimes I have to click on the refresh fields.
> How are you calling the SP (i.e. are you doing an exec or have you set the
> command type to stored procedure).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Patrik Ylén" <PatrikYln@.discussions.microsoft.com> wrote in message
> news:FB603E2E-CBD1-4773-BF3C-7B4EC6B328A6@.microsoft.com...
> > No answers? Is there really no way to solve this? This problem could be a
> > real show stopper for our current project...
> >
> > "Patrik Ylén" wrote:
> >
> >> I've noticed that SP:s that are more complex than just a simple
> >> SELECT-statement don't work correctly when creating new datasets. The
> >> dataset
> >> can't seem to populate the Fields when the SP does some additional work
> >> before the SELECT. I know it's possible to create all the Fields
> >> manually,
> >> but that isn't an option for us since we have a ton of reports with lots
> >> and
> >> lots of fields. Is there another workaround for this? Maybe in SQL Server
> >> 2005?
>
>|||"Bruce L-C [MVP]" wrote:
> Have you tried the refresh fields button (to the right of the ...)?
> I have SP that do a lot (put data into multiple temp tables etc). The very
> last statement is the select. So having stuff above the select matters not
> at all. Sometimes I have to click on the refresh fields.
> How are you calling the SP (i.e. are you doing an exec or have you set the
> command type to stored procedure).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Patrik Ylén" <PatrikYln@.discussions.microsoft.com> wrote in message
> news:FB603E2E-CBD1-4773-BF3C-7B4EC6B328A6@.microsoft.com...
> > No answers? Is there really no way to solve this? This problem could be a
> > real show stopper for our current project...
> >
> > "Patrik Ylén" wrote:
> >
> >> I've noticed that SP:s that are more complex than just a simple
> >> SELECT-statement don't work correctly when creating new datasets. The
> >> dataset
> >> can't seem to populate the Fields when the SP does some additional work
> >> before the SELECT. I know it's possible to create all the Fields
> >> manually,
> >> but that isn't an option for us since we have a ton of reports with lots
> >> and
> >> lots of fields. Is there another workaround for this? Maybe in SQL Server
> >> 2005?
> HI!
>I have a related problem. My stored procedure returns a different dataset based on an entered parameter - it returns a particular set of data for display in the report detail (@.showdetail) and another set for display in the report footer (@.showfooter)
When I call the stored procedure from within reporting services (either by
exec spname @.parameter as a text entry, or by referencing it's name) I can
retrieve the 2 separate datasets fine (ie the results sets show up in the
grid). HOWEVER, changing the parameter to 'showfooter' instead of
'showdetail' does not update the associated field list. Which means I can't
drag the second dataset's fields onto my layout.
Any ideas?|||RS only supports one dataset being returned from the SP. If you have a
single stored procedure that returns multiple datasets then you either need
to modify the stored procedure to return the appropriate dataset based on a
parameter or you need to split it into two stored procedure.
Note that you can have many many datasets in your report. You just cannot
have a stored procedure return more than one dataset. And, no, this has not
changed with 2005.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"GavinMc" <GavinMc@.discussions.microsoft.com> wrote in message
news:28DDEFA3-2903-4E8B-B56E-15757E303832@.microsoft.com...
>
> "Bruce L-C [MVP]" wrote:
>> Have you tried the refresh fields button (to the right of the ...)?
>> I have SP that do a lot (put data into multiple temp tables etc). The
>> very
>> last statement is the select. So having stuff above the select matters
>> not
>> at all. Sometimes I have to click on the refresh fields.
>> How are you calling the SP (i.e. are you doing an exec or have you set
>> the
>> command type to stored procedure).
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Patrik Ylén" <PatrikYln@.discussions.microsoft.com> wrote in message
>> news:FB603E2E-CBD1-4773-BF3C-7B4EC6B328A6@.microsoft.com...
>> > No answers? Is there really no way to solve this? This problem could be
>> > a
>> > real show stopper for our current project...
>> >
>> > "Patrik Ylén" wrote:
>> >
>> >> I've noticed that SP:s that are more complex than just a simple
>> >> SELECT-statement don't work correctly when creating new datasets. The
>> >> dataset
>> >> can't seem to populate the Fields when the SP does some additional
>> >> work
>> >> before the SELECT. I know it's possible to create all the Fields
>> >> manually,
>> >> but that isn't an option for us since we have a ton of reports with
>> >> lots
>> >> and
>> >> lots of fields. Is there another workaround for this? Maybe in SQL
>> >> Server
>> >> 2005?
>> HI!
>>I have a related problem. My stored procedure returns a different dataset
>>based on an entered parameter - it returns a particular set of data for
>>display in the report detail (@.showdetail) and another set for display in
>>the report footer (@.showfooter)
> When I call the stored procedure from within reporting services (either by
> exec spname @.parameter as a text entry, or by referencing it's name) I can
> retrieve the 2 separate datasets fine (ie the results sets show up in the
> grid). HOWEVER, changing the parameter to 'showfooter' instead of
> 'showdetail' does not update the associated field list. Which means I
> can't
> drag the second dataset's fields onto my layout.
> Any ideas?|||Thanks Bruce
My stored procedure is actually coded to return an appropriate dataset based
on a parameter which is supplied when calling the sp in RS. It returns the
appropriate dataset to the results grid fine in RS using the supplier
parameters. The fields returned in both datasets are completely different.
The problem is that the field list is not updated when I change the
parameter, it remains the list associated with the first parameter supplied
even if click 'refresh fields' after changing the parameter
I need my report to use the two separate datasets without having to re-write
the sp which is pages long.
Is this related to the fact that you can't have a sp return more than one
dataset in rs'|||Logically, you are returning two datasets. Depending on the parameter you
get a different field list. What you need to do is call the SP two times in
design mode with different parameters to get the different field list. Then
design your form with these and hide the one you don't want based on the
parameter.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"GavinMc" <GavinMc@.discussions.microsoft.com> wrote in message
news:F34F84BB-226F-4A34-A0ED-551137DCA065@.microsoft.com...
> Thanks Bruce
> My stored procedure is actually coded to return an appropriate dataset
> based
> on a parameter which is supplied when calling the sp in RS. It returns
> the
> appropriate dataset to the results grid fine in RS using the supplier
> parameters. The fields returned in both datasets are completely different.
> The problem is that the field list is not updated when I change the
> parameter, it remains the list associated with the first parameter
> supplied
> even if click 'refresh fields' after changing the parameter
> I need my report to use the two separate datasets without having to
> re-write
> the sp which is pages long.
> Is this related to the fact that you can't have a sp return more than one
> dataset in rs'sql

DataSet Problems

Hi,
We have noticed a problem with following:
1. creating a new report
2. adding a DataSet which pulls from a shared data source and displays
information correctly
3. choosing 'Save' and not pulling the fields into the layout form
When we open the report again the dataset is there but all references to the
table we selected are gone.
Is this supposed to happen? We have tried this on 2 separate installations,
one with SP2 and one without.
Any suggestions?Sometimes RS does not recognize that anything has changed in the data tab
and does not save. Just go to the layout tab and click on save all and you
will be good to go.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"KDogg" <KDogg@.discussions.microsoft.com> wrote in message
news:B3D6B39F-12D0-4F95-A998-1CF4A83B231F@.microsoft.com...
> Hi,
> We have noticed a problem with following:
> 1. creating a new report
> 2. adding a DataSet which pulls from a shared data source and displays
> information correctly
> 3. choosing 'Save' and not pulling the fields into the layout form
> When we open the report again the dataset is there but all references to
> the
> table we selected are gone.
> Is this supposed to happen? We have tried this on 2 separate
> installations,
> one with SP2 and one without.
> Any suggestions?|||Bruce - Thank you, that worked! Would this be fixed in a future release?
Although we were working on a small dataset I would hate to have lost
development time on a larger query?!
"Bruce L-C [MVP]" wrote:
> Sometimes RS does not recognize that anything has changed in the data tab
> and does not save. Just go to the layout tab and click on save all and you
> will be good to go.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "KDogg" <KDogg@.discussions.microsoft.com> wrote in message
> news:B3D6B39F-12D0-4F95-A998-1CF4A83B231F@.microsoft.com...
> > Hi,
> > We have noticed a problem with following:
> > 1. creating a new report
> > 2. adding a DataSet which pulls from a shared data source and displays
> > information correctly
> > 3. choosing 'Save' and not pulling the fields into the layout form
> > When we open the report again the dataset is there but all references to
> > the
> > table we selected are gone.
> > Is this supposed to happen? We have tried this on 2 separate
> > installations,
> > one with SP2 and one without.
> >
> > Any suggestions?
>
>|||I have no idea. I have lost work so I do this compulsively now. I'll
probably keep doing it when the bug no longer exists.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"KDogg" <KDogg@.discussions.microsoft.com> wrote in message
news:DC256683-1D12-4C55-B578-8A4440F1B41E@.microsoft.com...
> Bruce - Thank you, that worked! Would this be fixed in a future release?
> Although we were working on a small dataset I would hate to have lost
> development time on a larger query?!
> "Bruce L-C [MVP]" wrote:
>> Sometimes RS does not recognize that anything has changed in the data tab
>> and does not save. Just go to the layout tab and click on save all and
>> you
>> will be good to go.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "KDogg" <KDogg@.discussions.microsoft.com> wrote in message
>> news:B3D6B39F-12D0-4F95-A998-1CF4A83B231F@.microsoft.com...
>> > Hi,
>> > We have noticed a problem with following:
>> > 1. creating a new report
>> > 2. adding a DataSet which pulls from a shared data source and displays
>> > information correctly
>> > 3. choosing 'Save' and not pulling the fields into the layout form
>> > When we open the report again the dataset is there but all references
>> > to
>> > the
>> > table we selected are gone.
>> > Is this supposed to happen? We have tried this on 2 separate
>> > installations,
>> > one with SP2 and one without.
>> >
>> > Any suggestions?
>>

Wednesday, March 21, 2012

Dataset filtering... how?

Hi all,

I want to create a summary page for one of my report, depending on a
parameter, I would like to filter the dataset before creating the summary
fields.

I cannot figure out how to perform this filtering, my approach has been to
insert a Table control and map it to my dataset, then try and do some
filtering via the properties. When i then put something like

=sum(Fields!Sales.Value)

into the header (such that it is shown only once, not repeated), I get the
sum for the full dataset, not the filtered one.

Please help, is there any easier way todo this?

Lastly, I can't filter at the SQL level as the dataset is being used to
populate a chart below the summary.

Advice welcome.

Please help
Taz

Put the filter directly on the table (by opening the table properties dialog and selecting the filter tab).

Small sample report is attached at the bottom.

-- Robert

============================================================

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="AdventureWorks">
<DataSourceReference>AdventureWorks</DataSourceReference>
<rd:DataSourceID>c2dc0e71-020b-48e3-9005-53286c923eb2</rd:DataSourceID>
</DataSource>
</DataSources>
<BottomMargin>1in</BottomMargin>
<RightMargin>1in</RightMargin>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>8.5in</InteractiveWidth>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Body>
<ReportItems>
<Table Name="table1">
<Footer>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox7">
<rd:DefaultName>textbox7</rd:DefaultName>
<ZIndex>3</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>Sum</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="value_1">
<rd:DefaultName>value_1</rd:DefaultName>
<ZIndex>2</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Sum(Fields!value.Value)</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Footer>
<Filters>
<Filter>
<Operator>NotEqual</Operator>
<FilterValues>
<FilterValue>=2</FilterValue>
</FilterValues>
<FilterExpression>=Fields!id.Value</FilterExpression>
</Filter>
</Filters>
<DataSetName>DataSet1</DataSetName>
<Top>0.125in</Top>
<Width>4.33333in</Width>
<Details>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="id">
<rd:DefaultName>id</rd:DefaultName>
<ZIndex>1</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!id.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="value">
<rd:DefaultName>value</rd:DefaultName>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>=Fields!value.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Details>
<Header>
<TableRows>
<TableRow>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox1">
<rd:DefaultName>textbox1</rd:DefaultName>
<ZIndex>5</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>id</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<rd:DefaultName>textbox2</rd:DefaultName>
<ZIndex>4</ZIndex>
<Style>
<TextAlign>Right</TextAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
</Style>
<CanGrow>true</CanGrow>
<Value>value</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
<Height>0.25in</Height>
</TableRow>
</TableRows>
</Header>
<TableColumns>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
<TableColumn>
<Width>2.16667in</Width>
</TableColumn>
</TableColumns>
<Height>0.75in</Height>
</Table>
</ReportItems>
<Height>1in</Height>
</Body>
<rd:ReportID>427ef1de-ff4a-42ab-96eb-9b4fbdc898e0</rd:ReportID>
<LeftMargin>1in</LeftMargin>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
<CommandText>select 1 as id, 5 as value union
select 2, 6 union
select 3, 7</CommandText>
<DataSourceName>AdventureWorks</DataSourceName>
</Query>
<Fields>
<Field Name="id">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>id</DataField>
</Field>
<Field Name="value">
<rd:TypeName>System.Int32</rd:TypeName>
<DataField>value</DataField>
</Field>
</Fields>
</DataSet>
</DataSets>
<Width>4.5in</Width>
<InteractiveHeight>11in</InteractiveHeight>
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>

Dataset filtering... how?

Hi all,
I want to create a summary page for one of my report, depending on a
parameter, I would like to filter the dataset before creating the summary
fields.
I cannot figure out how to perform this filtering, my approach has been to
insert a Table control and map it to my dataset, then try and do some
filtering via the properties. When i then put something like
=sum(Fields!Sales.Value)
into the header (such that it is shown only once, not repeated), I get the
sum for the full dataset, not the filtered one.
Please help, is there any easier way todo this?
Lastly, I can't filter at the SQL level as the dataset is being used to
populate a chart below the summary.
Advice welcome.
Please help
TazIn the table properties you need to go to the Filter tab. You will then be
able to select the dataset field you want from the drop-down list and then
set what value(s) you want to include in the table.
HTH, Magendo_man
"Tarun Mistry" wrote:
> Hi all,
> I want to create a summary page for one of my report, depending on a
> parameter, I would like to filter the dataset before creating the summary
> fields.
> I cannot figure out how to perform this filtering, my approach has been to
> insert a Table control and map it to my dataset, then try and do some
> filtering via the properties. When i then put something like
> =sum(Fields!Sales.Value)
> into the header (such that it is shown only once, not repeated), I get the
> sum for the full dataset, not the filtered one.
> Please help, is there any easier way todo this?
> Lastly, I can't filter at the SQL level as the dataset is being used to
> populate a chart below the summary.
> Advice welcome.
> Please help
> Taz
>
>|||Thanks for ther reply.
I found that actually filtering directly on the dataset was my best option
(within the Data tab). My charts are working correctly on the condensed
data.
Taz
"magendo_man" <magendoman@.discussions.microsoft.com> wrote in message
news:C9DCDE28-059B-472C-BC4B-EDEC09C4E1B7@.microsoft.com...
> In the table properties you need to go to the Filter tab. You will then be
> able to select the dataset field you want from the drop-down list and then
> set what value(s) you want to include in the table.
> HTH, Magendo_man
> "Tarun Mistry" wrote:
>> Hi all,
>> I want to create a summary page for one of my report, depending on a
>> parameter, I would like to filter the dataset before creating the summary
>> fields.
>> I cannot figure out how to perform this filtering, my approach has been
>> to
>> insert a Table control and map it to my dataset, then try and do some
>> filtering via the properties. When i then put something like
>> =sum(Fields!Sales.Value)
>> into the header (such that it is shown only once, not repeated), I get
>> the
>> sum for the full dataset, not the filtered one.
>> Please help, is there any easier way todo this?
>> Lastly, I can't filter at the SQL level as the dataset is being used to
>> populate a chart below the summary.
>> Advice welcome.
>> Please help
>> Taz
>>

Dataset Confusion in Reporting Services 2005

I'm creating a report that gets its data from a dataset returned from a
webservice call. I've supplied the URL for the webservice and in my Dataset
dialog (in Visual Studio), I've indicated the Comnand Type as 'Text' and my
Query String as follows:
<Query>
<SoapAction>Federation/GetAll</SoapAction>
<ElementPath />
</Query>
Where: 'Federation' is my namespace and 'GetAll' is the method which gets
consumed from the webservice.
When I click the Run button on the report Design screen, the webservice is
called correctly but what I get back is one row for each field in my dataset
instead of one row for each record in the dataset. IOW, my dataset has 20
fields in it and what I get returned is a table with 20 records in it, one
for each field, instead of the actual data.
Can someone tell me what I'm doing wrong?
Amos."Amos Soma" wrote:
> I'm creating a report that gets its data from a dataset returned from a
> webservice call. I've supplied the URL for the webservice and in my Dataset
> dialog (in Visual Studio), I've indicated the Comnand Type as 'Text' and my
> Query String as follows:
> <Query>
> <SoapAction>Federation/GetAll</SoapAction>
> <ElementPath />
> </Query>
> Where: 'Federation' is my namespace and 'GetAll' is the method which gets
> consumed from the webservice.
> When I click the Run button on the report Design screen, the webservice is
> called correctly but what I get back is one row for each field in my dataset
> instead of one row for each record in the dataset. IOW, my dataset has 20
> fields in it and what I get returned is a table with 20 records in it, one
> for each field, instead of the actual data.
> Can someone tell me what I'm doing wrong?
> Amos.
I am having the same problem. Any answers yet? I am messing around with the
Element Path attribute, but since the BOL is pretty thin, and I'm a newbie to
XML & Web Services the going is slow.|||Same problem!....please help!
Tito Perez wrote:
> "Amos Soma" wrote:
> > I'm creating a report that gets its data from a dataset returned from a
> > webservice call. I've supplied the URL for the webservice and in my Dataset
> > dialog (in Visual Studio), I've indicated the Comnand Type as 'Text' and my
> > Query String as follows:
> >
> > <Query>
> > <SoapAction>Federation/GetAll</SoapAction>
> > <ElementPath />
> > </Query>
> >
> > Where: 'Federation' is my namespace and 'GetAll' is the method which gets
> > consumed from the webservice.
> >
> > When I click the Run button on the report Design screen, the webservice is
> > called correctly but what I get back is one row for each field in my dataset
> > instead of one row for each record in the dataset. IOW, my dataset has 20
> > fields in it and what I get returned is a table with 20 records in it, one
> > for each field, instead of the actual data.
> >
> > Can someone tell me what I'm doing wrong?
> >
> > Amos.
> I am having the same problem. Any answers yet? I am messing around with the
> Element Path attribute, but since the BOL is pretty thin, and I'm a newbie to
> XML & Web Services the going is slow.|||Can someone please help with this?|||Try this... I was having the same problem but found another example. Here is
what I did and it worked for me - Notice the changes to the "ElementPath".
<Query>
<SoapAction>Federation/GetAll</SoapAction>
<ElementPath
IgnoreNamespaces="True">GetAllResponse/GetAllResult/diffgram/NewDataSet/Table</ElementPath>
</Query>
Note: If you only want certain columns returned, add your column name(s)
seperated by commas in brackets "{} " after "Table" (eg. <ElementPath
IgnoreNamespaces="True">GetAllResponse/GetAllResult/diffgram/NewDataSet/Table{column1_name,column2_name}</ElementPath>)
Hope this helps!
"Kays" wrote:
> Same problem!....please help!
> Tito Perez wrote:
> > "Amos Soma" wrote:
> > > I'm creating a report that gets its data from a dataset returned from a
> > > webservice call. I've supplied the URL for the webservice and in my Dataset
> > > dialog (in Visual Studio), I've indicated the Comnand Type as 'Text' and my
> > > Query String as follows:
> > >
> > > <Query>
> > > <SoapAction>Federation/GetAll</SoapAction>
> > > <ElementPath />
> > > </Query>
> > >
> > > Where: 'Federation' is my namespace and 'GetAll' is the method which gets
> > > consumed from the webservice.
> > >
> > > When I click the Run button on the report Design screen, the webservice is
> > > called correctly but what I get back is one row for each field in my dataset
> > > instead of one row for each record in the dataset. IOW, my dataset has 20
> > > fields in it and what I get returned is a table with 20 records in it, one
> > > for each field, instead of the actual data.
> > >
> > > Can someone tell me what I'm doing wrong?
> > >
> > > Amos.
> >
> > I am having the same problem. Any answers yet? I am messing around with the
> > Element Path attribute, but since the BOL is pretty thin, and I'm a newbie to
> > XML & Web Services the going is slow.
>

Monday, March 19, 2012

datamodelling

Hi,
I'm designing a database where i have some tables about contacts. What i
would like to know is what the best design is for creating contacts.
I have a table relations where i store persons name and company names. Now
to determine the relation where who is related to who, e.g. a company and
their contacts or a family with their family members, i need some sort of a
recursive table/query.
Can anyone help me with this or is what i want not the right way?
First of all you have to know what are your entities an their atributes,
after that need to know what kind of relation you want, then you determine
the cardinality of it, and only at the end of work you will see if is
necessary some other indexes or special constraints and can evaluate the
performance.
Ex:
The entitys and atributes are:
Family (familyid, familyname) and Family members (memberid, membername)
If you want a family have various members and a member is on only one
family, then it is a 1 to N relation.
Then you will model your tables (2 tables and 1 relation) like:
Family (familyid as PK, familyname) <- Family members (memberid as PK,
familyid as PK and FK, membername)
If you want a family have various members and a member is on more than one
family, then it is a N to N relation.
Then you will model your tables (3 tables and 2 relations) like:
Family (familyid as PK, familyname) <- Familymembers (memberid as PK and FK,
familyid as PK and FK)
Members (memberid as PK, membername) <- Familymembers (memberid as PK and
FK, familyid as PK and FK)
It seems you need to study a little about normalization. ; )
Regards
BMartins (Brazil)
"Jason" <jlewis@.homail.com> escreveu na mensagem
news:OiGcCjJNFHA.2680@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I'm designing a database where i have some tables about contacts. What i
> would like to know is what the best design is for creating contacts.
> I have a table relations where i store persons name and company names. Now
> to determine the relation where who is related to who, e.g. a company and
> their contacts or a family with their family members, i need some sort of
a
> recursive table/query.
> Can anyone help me with this or is what i want not the right way?
>

datamodelling

Hi,
I'm designing a database where i have some tables about contacts. What i
would like to know is what the best design is for creating contacts.
I have a table relations where i store persons name and company names. Now
to determine the relation where who is related to who, e.g. a company and
their contacts or a family with their family members, i need some sort of a
recursive table/query.
Can anyone help me with this or is what i want not the right way?First of all you have to know what are your entities an their atributes,
after that need to know what kind of relation you want, then you determine
the cardinality of it, and only at the end of work you will see if is
necessary some other indexes or special constraints and can evaluate the
performance.
Ex:
The entitys and atributes are:
Family (familyid, familyname) and Family members (memberid, membername)
If you want a family have various members and a member is on only one
family, then it is a 1 to N relation.
Then you will model your tables (2 tables and 1 relation) like:
Family (familyid as PK, familyname) <- Family members (memberid as PK,
familyid as PK and FK, membername)
If you want a family have various members and a member is on more than one
family, then it is a N to N relation.
Then you will model your tables (3 tables and 2 relations) like:
Family (familyid as PK, familyname) <- Familymembers (memberid as PK and FK,
familyid as PK and FK)
Members (memberid as PK, membername) <- Familymembers (memberid as PK and
FK, familyid as PK and FK)
It seems you need to study a little about normalization. ; )
--
Regards
BMartins (Brazil)
"Jason" <jlewis@.homail.com> escreveu na mensagem
news:OiGcCjJNFHA.2680@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I'm designing a database where i have some tables about contacts. What i
> would like to know is what the best design is for creating contacts.
> I have a table relations where i store persons name and company names. Now
> to determine the relation where who is related to who, e.g. a company and
> their contacts or a family with their family members, i need some sort of
a
> recursive table/query.
> Can anyone help me with this or is what i want not the right way?
>

datamodelling

Hi,
I'm designing a database where i have some tables about contacts. What i
would like to know is what the best design is for creating contacts.
I have a table relations where i store persons name and company names. Now
to determine the relation where who is related to who, e.g. a company and
their contacts or a family with their family members, i need some sort of a
recursive table/query.
Can anyone help me with this or is what i want not the right way?First of all you have to know what are your entities an their atributes,
after that need to know what kind of relation you want, then you determine
the cardinality of it, and only at the end of work you will see if is
necessary some other indexes or special constraints and can evaluate the
performance.
Ex:
The entitys and atributes are:
Family (familyid, familyname) and Family members (memberid, membername)
If you want a family have various members and a member is on only one
family, then it is a 1 to N relation.
Then you will model your tables (2 tables and 1 relation) like:
Family (familyid as PK, familyname) <- Family members (memberid as PK,
familyid as PK and FK, membername)
If you want a family have various members and a member is on more than one
family, then it is a N to N relation.
Then you will model your tables (3 tables and 2 relations) like:
Family (familyid as PK, familyname) <- Familymembers (memberid as PK and FK,
familyid as PK and FK)
Members (memberid as PK, membername) <- Familymembers (memberid as PK and
FK, familyid as PK and FK)
It seems you need to study a little about normalization. ; )
Regards
BMartins (Brazil)
"Jason" <jlewis@.homail.com> escreveu na mensagem
news:OiGcCjJNFHA.2680@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I'm designing a database where i have some tables about contacts. What i
> would like to know is what the best design is for creating contacts.
> I have a table relations where i store persons name and company names. Now
> to determine the relation where who is related to who, e.g. a company and
> their contacts or a family with their family members, i need some sort of
a
> recursive table/query.
> Can anyone help me with this or is what i want not the right way?
>

Thursday, March 8, 2012

DataFile and Log File

I want to know the datafile and log file for the given input parameter. I am
basically creating function and the input parameter would be database name
and that will return me DataFile and the LogFile.
Can anybody tell me which query I have to used in the function. I have to
used to get the DataFile and LogFile
Have a look at the sys.database_files catalog view in BOL.
Andrew J. Kelly SQL MVP
"Rogers" <naissani@.hotmail.com> wrote in message
news:OsKzR7QiHHA.5008@.TK2MSFTNGP02.phx.gbl...
>I want to know the datafile and log file for the given input parameter. I
>am basically creating function and the input parameter would be database
>name and that will return me DataFile and the LogFile.
> Can anybody tell me which query I have to used in the function. I have to
> used to get the DataFile and LogFile
>
|||In SQL Server 2000?
Thanks
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OGIt1IRiHHA.392@.TK2MSFTNGP06.phx.gbl...
> Have a look at the sys.database_files catalog view in BOL.
> --
> Andrew J. Kelly SQL MVP
> "Rogers" <naissani@.hotmail.com> wrote in message
> news:OsKzR7QiHHA.5008@.TK2MSFTNGP02.phx.gbl...
>
|||On Sat, 28 Apr 2007 10:42:15 -0400, Roger wrote:

>In SQL Server 2000?
Hi Roger,
A more polite way to write this would have been; "Oh, I'm sorry I forgot
to include in my original post that I'm using SQL Server 2000. Is there
an alternative method for that version?"
The answer to that question would have been to check the sysfiles system
table in Books Online.
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

Wednesday, March 7, 2012

Data-Driven Subscription Error

I working through the 'Creating a Data-Driven Subscription' walkthrough
supplied as part of the BOL documentation, using Report Server File
Share as the delivery method. It cannot generate the report using the
three sets of dummy user details. The resulting status is: 'Done: 3
processed of 3 total: 3 errors'. How can I resolve this error?Sounds like possibly there was an error in writing out the files to the
file share (...since 3 of 3 procesed).
Open the ReportSever_ error log (C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\LogFiles), and do a Find on 'Success:
False' to locate errors in the log, using the timestamps to narrow
down the entries you look at. Errors could include illegal file names
or permissions on file share etc.
Matt A

Friday, February 24, 2012

DATABASEPROPERYEX is not a recognised function name

I am trying to write a report in reporting services 2000 which access a sql server 7 database. It all workes fine with the connection and creating a dataset but I cannot seem to get the results displayed in the preview section. I get the following error:

"An error occured during report processing query execution failed for dataset XXXX DATABASEPROPERYEX is not a recognised function name "

Any help greatly appreciated

Your are running RS 2000 RTM - you have two options:

* install RS 2000 SP1 or SP2 on both the report server and the report designer machines. The service packs contain the fix.

* Alternatively, in report designer go to the "Data Options" tab of the "Dataset"
dialog. On the Data Options tab you will see that all settings contain "Auto" (and report server would therefore try to auto-detect the collation settings from the database server). Replace the Auto-settings with the following settings (e.g. if your SQL 7.0
database collation is "SQL_Latin1_General_CP1_CI_AS"):
Collation = Latin1_General
Case sensitivity = false
Kanatype sensitivity = false
Width sensitivity = false
Accent sensitivity = true

-- Robert

DATABASEPROPERTYEX Error but not using this function...

Hi Everyone,
I'm creating a Report in Visual Studio.Net 2005 using an MS SQL 7.0 database
as the datasource. My SQL statement isn't anything crazy, just a Left Outer
Join between two tables (see below), but when I go into Preview mode on the
report I get the following error:
An error has occurred during report processing.
Query execution failed for data set 'MyDatasource'.
'DATABASEPROPERTYEX' is not a recognized function name.
I'm not using the DATABASEPROPERTYEX function in my SQL statement... Any
suggestions?
Datasource: MS SQL 7.0
Report created on VS.Net 2003
To be published on MS SQL 2005 Reporting Server
And here is my SQL statement:
SELECT MASTER.asset_no, MASTER.b_name, MASTER.UPP, PAYHIST.post_date,
PAYHIST.effective_date, PAYHIST.amount, PAYHIST.principal,
PAYHIST.interest, PAYHIST.late_fee, PAYHIST.suspense,
PAYHIST.trans
FROM MASTER LEFT OUTER JOIN
PAYHIST ON MASTER.asset_no = PAYHIST.asset_no
ORDER BY MASTER.asset_no, PAYHIST.post_date
I used a wizard to create this report, so does VS.Net 2003 do something
wierd in the background that MS SQL 7.0 might not like? Just curious ...
Thanks --
AlexHi. Mistake in my last post, I initially said I was using Visual Studio.Net
2005, but it's actually 2003. I corrected this at the bottom of the
message, but forgot to at the top. So to correct, this is being done under
VS.Net 2003 as opposed to 2005.
Sorry 'bout that .. Alex
"Alex" <samalex@.gmail.com> wrote in message
news:%23WjB7MR2HHA.5164@.TK2MSFTNGP05.phx.gbl...
> Hi Everyone,
> I'm creating a Report in Visual Studio.Net 2005 using an MS SQL 7.0
> database as the datasource. My SQL statement isn't anything crazy, just a
> Left Outer Join between two tables (see below), but when I go into Preview
> mode on the report I get the following error:
> An error has occurred during report processing.
> Query execution failed for data set 'MyDatasource'.
> 'DATABASEPROPERTYEX' is not a recognized function name.
> I'm not using the DATABASEPROPERTYEX function in my SQL statement... Any
> suggestions?
> Datasource: MS SQL 7.0
> Report created on VS.Net 2003
> To be published on MS SQL 2005 Reporting Server
> And here is my SQL statement:
> SELECT MASTER.asset_no, MASTER.b_name, MASTER.UPP, PAYHIST.post_date,
> PAYHIST.effective_date, PAYHIST.amount, PAYHIST.principal,
> PAYHIST.interest, PAYHIST.late_fee, PAYHIST.suspense,
> PAYHIST.trans
> FROM MASTER LEFT OUTER JOIN
> PAYHIST ON MASTER.asset_no = PAYHIST.asset_no
> ORDER BY MASTER.asset_no, PAYHIST.post_date
> I used a wizard to create this report, so does VS.Net 2003 do something
> wierd in the background that MS SQL 7.0 might not like? Just curious ...
> Thanks --
> Alex
>
>|||Solution Found...
After searching more in Google Groups I found an older post with the fix.
Here it is for anyone who might run across this issue in the future:
You are accessing a SQL Server 7.0 or older, correct? Just install SP1 of RS
2000 on report server and report designer machines and it will work.
The workaround for RS 2000 _without_ SP1 is as follows: Go to the "Data
Options" tab of the "Dataset" dialog in report designer. On the Data Options
tab you will see that all settings contain "Auto" (and report server would
therefore try to auto-detect the collation settings from the database
server). Replace the Auto-settings with the following settings (e.g. if your
SQL 7.0 database collation is "SQL_Latin1_General_CP1_CI_AS"):
Collation = Latin1_General
Case sensitivity = false
Kanatype sensitivity = false
Width sensitivity = false
Accent sensitivity = true
Take care -- Alex
"Alex" <samalex@.gmail.com> wrote in message
news:%23$GDP9R2HHA.140@.TK2MSFTNGP02.phx.gbl...
> Hi. Mistake in my last post, I initially said I was using Visual
> Studio.Net 2005, but it's actually 2003. I corrected this at the bottom
> of the message, but forgot to at the top. So to correct, this is being
> done under VS.Net 2003 as opposed to 2005.
> Sorry 'bout that .. Alex
> "Alex" <samalex@.gmail.com> wrote in message
> news:%23WjB7MR2HHA.5164@.TK2MSFTNGP05.phx.gbl...
>> Hi Everyone,
>> I'm creating a Report in Visual Studio.Net 2005 using an MS SQL 7.0
>> database as the datasource. My SQL statement isn't anything crazy, just
>> a Left Outer Join between two tables (see below), but when I go into
>> Preview mode on the report I get the following error:
>> An error has occurred during report processing.
>> Query execution failed for data set 'MyDatasource'.
>> 'DATABASEPROPERTYEX' is not a recognized function name.
>> I'm not using the DATABASEPROPERTYEX function in my SQL statement... Any
>> suggestions?
>> Datasource: MS SQL 7.0
>> Report created on VS.Net 2003
>> To be published on MS SQL 2005 Reporting Server
>> And here is my SQL statement:
>> SELECT MASTER.asset_no, MASTER.b_name, MASTER.UPP, PAYHIST.post_date,
>> PAYHIST.effective_date, PAYHIST.amount, PAYHIST.principal,
>> PAYHIST.interest, PAYHIST.late_fee,
>> PAYHIST.suspense, PAYHIST.trans
>> FROM MASTER LEFT OUTER JOIN
>> PAYHIST ON MASTER.asset_no = PAYHIST.asset_no
>> ORDER BY MASTER.asset_no, PAYHIST.post_date
>> I used a wizard to create this report, so does VS.Net 2003 do something
>> wierd in the background that MS SQL 7.0 might not like? Just curious ...
>> Thanks --
>> Alex
>>
>

Sunday, February 19, 2012

Database work

Hello!I'm new here on the forum!
I have a work to do on a class which consists on creating a database and this's a work by checkpoints,which means,I have a limit date to give away part of the work I've done until the next checkpoint.The prob lem is,I don't know where to start!The first thing I'm asked to do is to propose a theme(Managing a bar was what I had in mind) and have its preliminary specification.What do they want to say with 'preliminary specification'?Next I'm supposed to give away the inicial specification and the applicational funcionalities that uses this database...Again I'm not sure what they mean by that...Any help is extremely appreciated!Which school is it? Full name and address, please.

Why? Perhaps someone (among Forum members) goes to that school, or even works there. Then it will be easier to answer such a question. Because, if YOU, who attend those classes (or, at least, you are supposed to) don't have a clue what your teacher wants, how do you expect US to read his mind?

Whatever we think "preliminary specificatons" or "functionalities" are, it is your teacher who EXACTLY knows what he wants you to do. Therefore, I'd suggest you to take a walk, knock on his door and get all required information there.

Then return back and show what you've already done, explain problems you have and someone will surely help you. But, it is a little bit impolite to expect Forum members to do your school assignment from the beginning. Gosh, you don't even know how to start!

"Managing a bar" could be OK if you know to manage a bar (it is not just "a barman pours a drink into my glass"), i.e. know business rules. If not, you'll have to spend some time to get into the business - you can't design something you don't know at all. Therefore, choose a theme you are familiar with.|||To make things easier for you, select a data model here (http://www.databaseanswers.org/). ;)

PS: You may need to mention the site/author in the 'bibliography' or 'references' section of your paper.|||At least you can explain all the time you spend in the bar as "research".

It could have been worse. The assignment could have been for a sewage treatment plant.|||Well we are freely to choose a theme we like...|||After giving some more thought to the "Bar management" theme I've decided to change themes,not only because I'm on a tight schedule and I need to send the theme by mail to the teacher until Monday, but also because it would involve lots of research(and field research) and it's not one of the most easiest subjects to deal with.Also the teacher values originality and a database about a bar is something overused this days(at least I see it that way).
After someone suggested to speak with the teacher about what he really wanted to say with "preliminar specification" ,I mailed my teacher with the question and got a response:

"A preliminar specification could be,for example,

'Caf Management Application' will allow:

- do the stock management of all products(inserting shops and sales,deliveries,invoices,etc.)
- staff management(personal data,contracts,prizes,remunerations)

'Caf Management Application' should have:

- an application of POS(cash register) to be used by the waiter
- a backoffice application to be used by the cafe manager"

My new theme deals with 'Dog's house management'.This's what I've got so far concerning my preliminar specification:

'Management application of a dog's house' will allow:

- when the owners are away the dog's house would be their new home.
- register the dogs' breed and type
- manage the the type of treatments and medical care needed
- register information about the dogs(name,age,color,gender,etc.)
- manage the dogs' family details(name,adress,city,state,contact,etc.)
- manage the vacancies and reservations

Does this preliminar specification looks ok?Should I include something more?Also, what does the term "backoffice" means?
Any help on this is greatly appreciated!Thanks in advance!:)|||Any help,please?

Friday, February 17, 2012

Database Version Logging

Hi i just planning to creating a database version logging, where the
idea is this application running every night give me detail about table
schema change , new sproc , alter/drop sproc and other database
schema changes.
One of difficulty that i facing right now is how to get the username
that change the database schema ( alter sproc , etc ) , do anyone have
any recommendation how i able to get this information ? ThanksWhat version of SQL Server are you using? (2000/2005)
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
> Hi i just planning to creating a database version logging, where the
> idea is this application running every night give me detail about table
> schema change , new sproc , alter/drop sproc and other database
> schema changes.
> One of difficulty that i facing right now is how to get the username
> that change the database schema ( alter sproc , etc ) , do anyone have
> any recommendation how i able to get this information ? Thanks
>|||If you are using SQL Server 2005 you can easily accomplish this by using DDL
Triggers.
There is not easy solution for SQL Server 2000.
Ben Nevarez, MCDBA, OCP
Database Administrator
"kwangsa" wrote:
> Hi i just planning to creating a database version logging, where the
> idea is this application running every night give me detail about table
> schema change , new sproc , alter/drop sproc and other database
> schema changes.
> One of difficulty that i facing right now is how to get the username
> that change the database schema ( alter sproc , etc ) , do anyone have
> any recommendation how i able to get this information ? Thanks
>|||Hi i m using sql server 2000 , hmm for the "not easy solution" , any
recommendation '
I thinking of using DBCC Log but which field that showing the userid.
Thanks.
Ben Nevarez wrote:
> If you are using SQL Server 2005 you can easily accomplish this by using DDL
> Triggers.
> There is not easy solution for SQL Server 2000.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "kwangsa" wrote:
> > Hi i just planning to creating a database version logging, where the
> > idea is this application running every night give me detail about table
> > schema change , new sproc , alter/drop sproc and other database
> > schema changes.
> >
> > One of difficulty that i facing right now is how to get the username
> > that change the database schema ( alter sproc , etc ) , do anyone have
> > any recommendation how i able to get this information ? Thanks
> >
> >|||Before you spend much time trying to code a solution, look at the various
third party tools used for SarBox and HIPPA compliance logging. It may be
less expensive to get something that is made for the job and taking the time
to kludge something together.
Check out Quest, Idera, Lumigent, SQL AuditPro, and many more I'm sure.
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152857175.914841.230840@.b28g2000cwb.googlegroups.com...
> Hi i m using sql server 2000 , hmm for the "not easy solution" , any
> recommendation '
> I thinking of using DBCC Log but which field that showing the userid.
> Thanks.
> Ben Nevarez wrote:
>> If you are using SQL Server 2005 you can easily accomplish this by using
>> DDL
>> Triggers.
>> There is not easy solution for SQL Server 2000.
>> Ben Nevarez, MCDBA, OCP
>> Database Administrator
>>
>> "kwangsa" wrote:
>> > Hi i just planning to creating a database version logging, where the
>> > idea is this application running every night give me detail about table
>> > schema change , new sproc , alter/drop sproc and other database
>> > schema changes.
>> >
>> > One of difficulty that i facing right now is how to get the username
>> > that change the database schema ( alter sproc , etc ) , do anyone have
>> > any recommendation how i able to get this information ? Thanks
>> >
>> >
>|||hi,
checkout this tools for auditing
http://www.lumigent.com/Downloads
Amol Lembhe
MCDBA
"Arnie Rowland" wrote:
> What version of SQL Server are you using? (2000/2005)
> --
> Arnie Rowland*
> "To be successful, your heart must accompany your knowledge."
>
> "kwangsa" <SareCrow@.gmail.com> wrote in message
> news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
> > Hi i just planning to creating a database version logging, where the
> > idea is this application running every night give me detail about table
> > schema change , new sproc , alter/drop sproc and other database
> > schema changes.
> >
> > One of difficulty that i facing right now is how to get the username
> > that change the database schema ( alter sproc , etc ) , do anyone have
> > any recommendation how i able to get this information ? Thanks
> >
>
>|||Hi thx for the sugestion to using 3rd party tools but what i planning
to do is only a simple database logging , and this is just personal
project so i really interested to make a tools like that.
Do anyone know any DBCC log result mean , i mean any documentation
would be really helfpul. THx
Amol Lembhe wrote:
> hi,
> checkout this tools for auditing
> http://www.lumigent.com/Downloads
> Amol Lembhe
> MCDBA
> "Arnie Rowland" wrote:
> > What version of SQL Server are you using? (2000/2005)
> >
> > --
> > Arnie Rowland*
> > "To be successful, your heart must accompany your knowledge."
> >
> >
> >
> > "kwangsa" <SareCrow@.gmail.com> wrote in message
> > news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
> > > Hi i just planning to creating a database version logging, where the
> > > idea is this application running every night give me detail about table
> > > schema change , new sproc , alter/drop sproc and other database
> > > schema changes.
> > >
> > > One of difficulty that i facing right now is how to get the username
> > > that change the database schema ( alter sproc , etc ) , do anyone have
> > > any recommendation how i able to get this information ? Thanks
> > >
> >
> >
> >|||You could have a Profiler trace running (from a second server) , restricted
to DDL activities only, and then have sprocs that harvest the information
you seek from the trace table.
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152873932.402525.309830@.h48g2000cwc.googlegroups.com...
> Hi thx for the sugestion to using 3rd party tools but what i planning
> to do is only a simple database logging , and this is just personal
> project so i really interested to make a tools like that.
> Do anyone know any DBCC log result mean , i mean any documentation
> would be really helfpul. THx
>
> Amol Lembhe wrote:
>> hi,
>> checkout this tools for auditing
>> http://www.lumigent.com/Downloads
>> Amol Lembhe
>> MCDBA
>> "Arnie Rowland" wrote:
>> > What version of SQL Server are you using? (2000/2005)
>> >
>> > --
>> > Arnie Rowland*
>> > "To be successful, your heart must accompany your knowledge."
>> >
>> >
>> >
>> > "kwangsa" <SareCrow@.gmail.com> wrote in message
>> > news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
>> > > Hi i just planning to creating a database version logging, where the
>> > > idea is this application running every night give me detail about
>> > > table
>> > > schema change , new sproc , alter/drop sproc and other database
>> > > schema changes.
>> > >
>> > > One of difficulty that i facing right now is how to get the username
>> > > that change the database schema ( alter sproc , etc ) , do anyone
>> > > have
>> > > any recommendation how i able to get this information ? Thanks
>> > >
>> >
>> >
>> >
>

Database Version Logging

Hi i just planning to creating a database version logging, where the
idea is this application running every night give me detail about table
schema change , new sproc , alter/drop sproc and other database
schema changes.
One of difficulty that i facing right now is how to get the username
that change the database schema ( alter sproc , etc ) , do anyone have
any recommendation how i able to get this information ? ThanksWhat version of SQL Server are you using? (2000/2005)
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
> Hi i just planning to creating a database version logging, where the
> idea is this application running every night give me detail about table
> schema change , new sproc , alter/drop sproc and other database
> schema changes.
> One of difficulty that i facing right now is how to get the username
> that change the database schema ( alter sproc , etc ) , do anyone have
> any recommendation how i able to get this information ? Thanks
>|||If you are using SQL Server 2005 you can easily accomplish this by using DDL
Triggers.
There is not easy solution for SQL Server 2000.
Ben Nevarez, MCDBA, OCP
Database Administrator
"kwangsa" wrote:

> Hi i just planning to creating a database version logging, where the
> idea is this application running every night give me detail about table
> schema change , new sproc , alter/drop sproc and other database
> schema changes.
> One of difficulty that i facing right now is how to get the username
> that change the database schema ( alter sproc , etc ) , do anyone have
> any recommendation how i able to get this information ? Thanks
>|||Hi i m using sql server 2000 , hmm for the "not easy solution" , any
recommendation '
I thinking of using DBCC Log but which field that showing the userid.
Thanks.
Ben Nevarez wrote:[vbcol=seagreen]
> If you are using SQL Server 2005 you can easily accomplish this by using D
DL
> Triggers.
> There is not easy solution for SQL Server 2000.
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
> "kwangsa" wrote:
>|||Before you spend much time trying to code a solution, look at the various
third party tools used for SarBox and HIPPA compliance logging. It may be
less expensive to get something that is made for the job and taking the time
to kludge something together.
Check out Quest, Idera, Lumigent, SQL AuditPro, and many more I'm sure.
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152857175.914841.230840@.b28g2000cwb.googlegroups.com...
> Hi i m using sql server 2000 , hmm for the "not easy solution" , any
> recommendation '
> I thinking of using DBCC Log but which field that showing the userid.
> Thanks.
> Ben Nevarez wrote:
>|||hi,
checkout this tools for auditing
http://www.lumigent.com/Downloads
Amol Lembhe
MCDBA
"Arnie Rowland" wrote:

> What version of SQL Server are you using? (2000/2005)
> --
> Arnie Rowland*
> "To be successful, your heart must accompany your knowledge."
>
> "kwangsa" <SareCrow@.gmail.com> wrote in message
> news:1152843749.295919.186540@.35g2000cwc.googlegroups.com...
>
>|||Hi thx for the sugestion to using 3rd party tools but what i planning
to do is only a simple database logging , and this is just personal
project so i really interested to make a tools like that.
Do anyone know any DBCC log result mean , i mean any documentation
would be really helfpul. THx
Amol Lembhe wrote:[vbcol=seagreen]
> hi,
> checkout this tools for auditing
> http://www.lumigent.com/Downloads
> Amol Lembhe
> MCDBA
> "Arnie Rowland" wrote:
>|||You could have a Profiler trace running (from a second server) , restricted
to DDL activities only, and then have sprocs that harvest the information
you seek from the trace table.
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
"kwangsa" <SareCrow@.gmail.com> wrote in message
news:1152873932.402525.309830@.h48g2000cwc.googlegroups.com...
> Hi thx for the sugestion to using 3rd party tools but what i planning
> to do is only a simple database logging , and this is just personal
> project so i really interested to make a tools like that.
> Do anyone know any DBCC log result mean , i mean any documentation
> would be really helfpul. THx
>
> Amol Lembhe wrote:
>