Showing posts with label sample. Show all posts
Showing posts with label sample. Show all posts

Tuesday, March 27, 2012

Downloading sample SQL Server Studio Express Database

I'm looking for a sample Database that is well set up to learn from. Does anyone know where I can download one from?SeeSQL Server 2005 Samples and Sample Databases.

Downloading sample databases

I am trying to download the sample databases for SQL Server 2005 and SQL
Server 2008.
As I often find to be the case, http://www.codeplex.com is not available. I
have reported this on the codeplex forums in the past. It does not appear
that there has ever been an improvement in the availability of this site.
When I need something from that site, it seems to be unavailable more than it
is available.
Here is the result of running tracert on the site, showing that the problem
is internal within Microsoft's own network:
P:\>tracert www.codeplex.com
Tracing route to www.codeplex.com [207.46.208.126]
over a maximum of 30 hops:
1 <1 ms 1 ms <1 ms myrouter-name is company
confidential[xxx.xxx.xxx.xxx]
2 <1 ms <1 ms <1 ms myfirewall-name is company
confidential[xxx.xxx.xxx.xxx]
3 1 ms <1 ms 1 ms myrouter-name is company
confidential[xxx.xxx.xxx.xxx]
4 10 ms 10 ms 9 ms POS1-3.GW6.DFW9.ALTER.NET [xxx.xxx.xxx.xxx]
5 12 ms 11 ms 11 ms 158.at-5-0-0.XR1.DFW9.ALTER.NET
[xxx.xxx.xxx.xxx]
6 13 ms 11 ms 9 ms 0.so-2-1-0.XT3.DFW9.ALTER.NET [152.63.101.249]
7 75 ms 75 ms 76 ms 0.so-7-0-0.XL1.SEA4.ALTER.NET [152.63.104.194]
8 76 ms 75 ms 75 ms 0.so-6-0-0.GW1.SEA4.ALTER.NET [152.63.107.249]
9 76 ms 75 ms 76 ms msft-oc48.customer.alter.net [157.130.177.254]
10 77 ms 78 ms 76 ms ge-5-2-0-54.tuk-64cb-1a.ntwk.msn.net
[207.46.45.
69]
11 * * * Request timed out.
12 * 79 ms 76 ms po1.tuk-6ns-mcs-2a.ntwk.msn.net [207.46.39.33]
13 * * * Request timed out.
14 * po1.tuk-6ns-mcs-2b.ntwk.msn.net [207.46.39.45] reports:
Destinati
on net unreachable.
Trace complete.
Firstly, I would like to suggest/request that the important developer
downloads that have been moved to codeplex.com, such as enterprise library
and sql server sample databases, be made available in the MSDN subscriber
downloads.
Secondly, and more important right now, is that I need those downloads and
the site is not available. I am trying to understand some code from MSDN and
BOL that uses the sample databases. Before I can understand that code so
that I can use the information from BOL in the task I am working on today, I
need to have the sample databases for SQL Server 2005 for certain and,
hopefully, SQL Server 2008. As a MSDN subscriber, please tell me where I can
get those downloads other than the unavailable codeplex.com site.
Thanks,
Dale
Thank you for your uresponse, Gail. I did finally get the samples
downloaded. I attached them to my developer version of SQL Server 2005 by
copying the mdf and ldf files from the default installation in Express
Edition.
*Big sigh of relief*... That was two hours waisted. It probably would not
have been so frustrating if the issues with CodePlex availability didn't
happen so often.
Thanks again for your quick response.
Dale
"Gail Erickson [MS]" wrote:

> Hi Dale,
> I've forwarded your post to the samples team so that they are aware of your
> on-going problem with Codeplex. I notice that you provided similar feedback
> on the Sample Databases page in Codeplex
> (http://www.codeplex.com/MSFTDBProdSamples) today. I assume that means you
> were finally able to download the sample databases. If that's not the case,
> let me know.
> If you have a version of SQL Server 2005 other than the Express or Compact
> editions, you can install the sample databases by re-running setup.See the
> section "Installation After Setup" in the BOL topic "Running Setup to
> Install AdventureWorks Sample Databases and Samples". Cut/paste this URL
> to get to that topic:
> ms-help://sql90/instsql9/html/8c4c2af8-f2ed-4559-b5d2-984a9f7ce5ca.htm
> Right now there is no significant difference between AdventureWorks for 2005
> and AdventureWorks for 2008, so you should be able to use the database for
> either versions of SQL Server.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
> "Dale" <dale0973@.nospam.nospam> wrote in message
> news:83FEED8D-9360-4CF8-BEFC-4AC632E5B077@.microsoft.com...
>
>
sql

Wednesday, March 7, 2012

Dont know how to stop the duplication

Hi, Im still quite new to Crystal, and cant quite get my head around this one.. I'm using CR9

Ive attached a sample report to help demonstrate the problem.

I have three tables using the following fields:

Customers Tbl: DOB, Address 1, Address 2, Address 3, City + Postcode.

Folder Items Tbl: Voucher No, Tvl Date, Code, Client Name, Client Paid, Redeem Date.

Credit Card Tbl: Card Type, Card No.

Im trying to establish how many vouchers this client has ordered. On the example shown hes actually ordered 3 vouchers, but because he has two different credit cards listed in his profile, each item is duplicated, so it looks like hes made 6 orders.

If the card type equals DC, then we need to show what the card number is. If its any other card type, then we just show the two letter card code, and no other info. Which works fine when theres only one card in the profile.

I need to somehow say if there are two cards present only show the first one, and always select card type DC if there are two or more different types

Does anyone have any ideas? At the moment, I'm exporting the data into excell so I can delete the duplicates before submitting them, but the reports is getting bigger each week, and it's going to get out of hand very soon.

Thanks
LisaIn your Crystal query, use Distinct Keyword

Select Distinct columns from yourTable

Sunday, February 26, 2012

Don't get Service Broker to Work

Hi,

I'm not able to get Service Broker to work. I've created the following sample and would excpect to get some data from "PreisanfrageQueue" or "PreisanfrageRequestorQueue". But both they are emtpy.

What do I do wrong?

Regards,

Manfred

create message type Preisanfrage
validation = well_formed_xml;

create message type PreisanfrageAntwort
validation = well_formed_xml;

create contract PreisanfrageContract
(
Preisanfrage sent by initiator,
PreisanfrageAntwort sent by target
);

create queue PreisanfrageRequestorQueue with
status=on;

create queue PreisanfrageQueue;

create service PreisanfrageRequestorService
on queue PreisanfrageRequestorQueue ( PreisanfrageContract );


create service PreisanfrageService
on queue PreisanfrageQueue (PreisanfrageContract );

create table debug_table;
create table debug_table (id int primary key identity(1,1), msg varchar(100));

create procedure PreisanfrageAction
as
declare @.conversation uniqueidentifier
declare @.msg nvarchar(max)
declare @.msgType nvarchar(256)
declare @.answer xml;

insert into debug_table(msg) values('1');

;receive top(1)
@.conversation = conversation_handle,
@.msg = message_body,
@.msgType = message_type_name
from PreisanfrageQueue;

insert into debug_table(msg) values('2');

-- Preisanfrage bearbeiten


set @.answer = '<preis>1</preis>';
;send on conversation @.conversation
message type PreisanfrageAntwort (@.answer);

end conversation @.conversation;

insert into debug_table(msg) values('3');

alter queue PreisanfrageQueue
with
status=on,
activation (
status=on,
PROCEDURE_NAME = PreisanfrageAction,
max_queue_readers = 100,
EXECUTE AS OWNER
);


-- Dialog starten

declare @.conversation uniqueidentifier;

begin dialog conversation @.conversation
from service [PreisanfrageRequestorService]
to service 'PreisanfrageService'
on contract [PreisanfrageContract];

declare @.request xml;

set @.request = '<?xml version="1.0" encoding="UTF-8"?><Preisanfrage xmlns="4711101'">http://www.xyz.at/samples/Preisanfrage"><KundenId>4711</KundenId><ProduktId>10</ProduktId><Anzahl>1</Anzahl></Preisanfrage>';

;send on conversation @.conversation
message type Preisanfrage ( @.request );

receive * from PreisanfrageQueue;

receive * from PreisanfrageRequestorQueue;


select * from debug_table


1. Please double check you have created the master key in this database.

create master key

encryption by password='asdfasdf'

2. query the system table to check the message’s transmission status.

select * from sys.transmission_queue

3. Don’t use

receive * from PreisanfrageQueue;

receive * from PreisanfrageRequestorQueue;

To check the queue's messenger, because this will remove the message from

the queue and but the conversation open

|||

Hi,

thanks - it was the missing master key.

Did I get it right, that thouse activation procedures are polling the queue ?
If yes - is there a way to use some kind of notification so that the activation procedure is just called every time when a message is enqueued ?

Best whishes,
Manfred

|||You did it correctly, but your messages are getting taken off as soon as you put them on there, through your receive * statements. You should try to receive one at a time and do something with those records.

Tuesday, February 14, 2012

Does the Report Manager use the RS WebService?

If the Report Manager uses the SOAP API to build the website, is there a way to find the code for this? This is a great working sample and I would like to see that code to help in my understanding and building of a proprietary site. There are a lot of snippets of code to show how to do things individually, but when you put them all together, it is very slow (Item Properties, Methods, etc.). //Report Mangaer does use the SOAP API to the Report Server web service, but we don't make the Report Manager source code publicly available.|||

Thanks for the response. If that is the case, I've been looking for good examples for retrieving the Report Name, Description and Parameters. When I piece together from other resources I can get it to work great! HOWEVER, it is very slow, especially the GetProperties Method!

Thanks.