Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Friday, March 30, 2012

Multi-value parameter default values not working

I have a parameter that gets it's available values from a dataset.

I use this exact same data to populate the default values.

When I run the report, the available values get populated; however the default values are not being selected.

This works on other parameters on the same report. However, on this parameter, it is not working.

I have tried ltrim/rtrim (Been burned with that before when the field type is a char)

I change the data field in the query, without changing the parameter setup, and it works...

Here is my query:

Code Snippet

Select distinct
CityName

from dimHotel dH (NOLOCK)
Inner join factHotel fH (NOLOCK)
on dh.HotelKey = fH.HotelKey

Where dH.CityName <> ''
and dH.CityName is not null
and fH.ClientKey in (@.ClientID)

Order by CityName

The parameter is setup correctly, and matches the setup of another parameter on the same report that is working fine.

I have tried deleting the parameter and re-adding it. This did not work.

I also deleted and re-added the query. No luck.

Any ideas?

Thanks!!

Thanks

Ok, this is weird...

If I change the query to:

Code Snippet

Select distinct
Replace(CityName,'','') as CityName

It works fine.

If I do a lower or upper, it works fine.

Convert or l/rtrim do not work.

Anyone have any ideas?

At this point I am thinking that there is a character in one of the fields that shouldnt be in there... I am looking at that now.

BobP

|||

Ok, it's an intermittent problem.

Sometimes the replace works, sometimes it doesn't.

Still trying to figure out why...

Does anyone know if there are any characters that could be in the data field, and prevent the default parameters from populating?

Thanks

|||

This same query populates a multi value drop down on a totally different report and it does not work there, either.

I am thinking it is data related.

Can anyone think of a reason why the multi select drop down would be populated, but the defaults not be set?

There are only 360 rows, so it's not a row number issue.

Any ideas would be very welcomed.

Thanks

BobP

Multi-value parameter default values not working

I have a parameter that gets it's available values from a dataset.

I use this exact same data to populate the default values.

When I run the report, the available values get populated; however the default values are not being selected.

This works on other parameters on the same report. However, on this parameter, it is not working.

I have tried ltrim/rtrim (Been burned with that before when the field type is a char)

I change the data field in the query, without changing the parameter setup, and it works...

Here is my query:

Code Snippet

Select distinct
CityName

from dimHotel dH (NOLOCK)
Inner join factHotel fH (NOLOCK)
on dh.HotelKey = fH.HotelKey

Where dH.CityName <> ''
and dH.CityName is not null
and fH.ClientKey in (@.ClientID)

Order by CityName

The parameter is setup correctly, and matches the setup of another parameter on the same report that is working fine.

I have tried deleting the parameter and re-adding it. This did not work.

I also deleted and re-added the query. No luck.

Any ideas?

Thanks!!

Thanks

Ok, this is weird...

If I change the query to:

Code Snippet

Select distinct
Replace(CityName,'','') as CityName

It works fine.

If I do a lower or upper, it works fine.

Convert or l/rtrim do not work.

Anyone have any ideas?

At this point I am thinking that there is a character in one of the fields that shouldnt be in there... I am looking at that now.

BobP

|||

Ok, it's an intermittent problem.

Sometimes the replace works, sometimes it doesn't.

Still trying to figure out why...

Does anyone know if there are any characters that could be in the data field, and prevent the default parameters from populating?

Thanks

|||

This same query populates a multi value drop down on a totally different report and it does not work there, either.

I am thinking it is data related.

Can anyone think of a reason why the multi select drop down would be populated, but the defaults not be set?

There are only 360 rows, so it's not a row number issue.

Any ideas would be very welcomed.

Thanks

BobP

sql

Wednesday, March 28, 2012

Multi-user environment

Hi,
I’m working on a project that has MSDE installed on a Server (Windows Small
Business Server 2003 Standard with Veritas Backup V.9.1) for the back-end
database and for the front-end an Access Project (.adp) which I plan to have
on each user's computer.
The Server Administrator is pushing for an update to SBS 2003 Premium with 5
licenses as the only solution. Personally I think MSDE would do the job…
There are few things I’m not so sure:
- How many users can access the server at the same time with MSDE?
- Is there a way to let the user know if a record is being used? Like
displaying a message before any changes are made?
- I’ve created a table for users with username, password and group they
belong to. Is there a way to integrate this with the MSDE Groups and
Permissions or Transact-SQL? So Users, passwords and Groups can be setup from
a form in the front-end.
I’m doing some research on Veritas and see if it would backup the Instance
of MSDE.
Any help on this matter would be greatly appreciated
gaba
hi,
gaba wrote:
> - How many users can access the server at the same time with MSDE?
it's not a matter of users but concurrent batches... a study by Microsoft
indicates a magic number of 25, but it really depends on the application
type/design, database type/design...
of course bad ADO serverside cursors design will be worse then excellent
clientside disconnected design code...
but actually there's no limit, just the buuilt-in Workloads Gevernor that
kicks in when more then 8 concurrent batches are in progress... you can have
a look at
http://msdn.microsoft.com/library/?u...asp?frame=true
fro further info about that governor...

> - Is there a way to let the user know if a record is being used? Like
> displaying a message before any changes are made?
actually not... you have to test saving and trap the relative exception...

> - I've created a table for users with username, password and group
> they belong to. Is there a way to integrate this with the MSDE Groups
> and Permissions or Transact-SQL? So Users, passwords and Groups can
> be setup from a form in the front-end.
I think you've better drop your user tables and rely on the standard SQL
Server users and roles...you are duplicating all and incurring in troubles..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Andrea,
Thanks so much for your answer. I see I need to change directions in few
settings but I'm on the right track. A lot of information to catch up...
gaba
"gaba" wrote:

> Hi,
> I’m working on a project that has MSDE installed on a Server (Windows Small
> Business Server 2003 Standard with Veritas Backup V.9.1) for the back-end
> database and for the front-end an Access Project (.adp) which I plan to have
> on each user's computer.
> The Server Administrator is pushing for an update to SBS 2003 Premium with 5
> licenses as the only solution. Personally I think MSDE would do the job…
> There are few things I’m not so sure:
> - How many users can access the server at the same time with MSDE?
> - Is there a way to let the user know if a record is being used? Like
> displaying a message before any changes are made?
> - I’ve created a table for users with username, password and group they
> belong to. Is there a way to integrate this with the MSDE Groups and
> Permissions or Transact-SQL? So Users, passwords and Groups can be setup from
> a form in the front-end.
> I’m doing some research on Veritas and see if it would backup the Instance
> of MSDE.
> Any help on this matter would be greatly appreciated
> --
> gaba
sql

Multithreading SQL connections

Hi there
I am working on the design of a system that its’ main function will be to
talk to devices over TCP/IP. There can be up to 50,000 devices that I need t
o
talk to within an hour period.
There will be a Queue on SQL 2005 which will contain requests for these
devices. I will need to check this queue and depending on the information on
the queue I need to talk to the devices. There will be one request for each
device every hour, therefore I need to be able to process multiple
communications at one time.
Here is my question: Should I create independent threads which would read
SQL and do pretty much everything, having a collection of about 50 or so
threads doing this? I have heard that I should avoid this high number of
connections to SQL at one time.
The other solution that I came up with is to have one SQL reader and have
the communication sockets as the threads, so they do their job and return. I
n
this thread communication scenario should I destroy the thread once I am
done, or should I have thread communication and keep the thread alive and
just send new requests to it?
I know this is pretty broad, but any help would be appreciated.
Thank you,
Spike S50 connections at a time in SQL Server is not an issue at all. Especially
if you are using connection pooling. When you say Queue what exactly do you
mean? Is this a regular table or is this a Queue from Service Broker?
Andrew J. Kelly SQL MVP
"Spike Spiegel" <cbb_spike@.hotmail.com> wrote in message
news:8AFEA5E5-1E9B-4D23-BFD9-1AEB25230AF6@.microsoft.com...
> Hi there
> I am working on the design of a system that its' main function will be to
> talk to devices over TCP/IP. There can be up to 50,000 devices that I need
> to
> talk to within an hour period.
> There will be a Queue on SQL 2005 which will contain requests for these
> devices. I will need to check this queue and depending on the information
> on
> the queue I need to talk to the devices. There will be one request for
> each
> device every hour, therefore I need to be able to process multiple
> communications at one time.
> Here is my question: Should I create independent threads which would read
> SQL and do pretty much everything, having a collection of about 50 or so
> threads doing this? I have heard that I should avoid this high number of
> connections to SQL at one time.
> The other solution that I came up with is to have one SQL reader and have
> the communication sockets as the threads, so they do their job and return.
> In
> this thread communication scenario should I destroy the thread once I am
> done, or should I have thread communication and keep the thread alive and
> just send new requests to it?
> I know this is pretty broad, but any help would be appreciated.
> Thank you,
> Spike S|||Hi Andrew
Sorry, I should have not used the word queue. It is basically just a table
with a very log record, about 50 fields, my application would be pulling fro
m
it.
What do you mean by "connection pooling?"
Right I am running a test and basically I am opening a connection using the
System.Data.SqlClient.SqlConnection class, and reading my record with
SqlConnection + SqlDataReader and writing records with the SqlConnection.+
TSQL statement. Are these the most efficient/fastest way to do this? I am
very interested in speed here.
If I were to create a thread and send the SqlConnection to the thread for
them all to share the same connection, would that make the code more
efficient?
What would be a good threshold for number of threads? 100? 500? 1000? 10000?
Please let me know.
Thank you,
Spike S.|||> What do you mean by "connection pooling?"
I would google for more details but essentially it is used by .net to make
the process of connecting and disconnecting much more efficient. You retain
a pool of connections that stay connected all the time. These are then
handed out as the app requests new connections and instead of closing it
completely it just cleans it up and makes it ready for the next user. It's
the default behavior with .net.

> Right I am running a test and basically I am opening a connection using
> the
> System.Data.SqlClient.SqlConnection class, and reading my record with
> SqlConnection + SqlDataReader and writing records with the SqlConnection.+
> TSQL statement. Are these the most efficient/fastest way to do this? I am
> very interested in speed here.
Actually using stored procedures to read and write the data is the most
efficient way.

> What would be a good threshold for number of threads? 100? 500? 1000?
> 10000?
Testing is the only way to know for sure.
Andrew J. Kelly SQL MVP
"Spike Spiegel" <cbb_spike@.hotmail.com> wrote in message
news:96A7733E-31CD-4744-9DD9-FD8CF64278A0@.microsoft.com...
> Hi Andrew
> Sorry, I should have not used the word queue. It is basically just a table
> with a very log record, about 50 fields, my application would be pulling
> from
> it.
> What do you mean by "connection pooling?"
> Right I am running a test and basically I am opening a connection using
> the
> System.Data.SqlClient.SqlConnection class, and reading my record with
> SqlConnection + SqlDataReader and writing records with the SqlConnection.+
> TSQL statement. Are these the most efficient/fastest way to do this? I am
> very interested in speed here.
> If I were to create a thread and send the SqlConnection to the thread for
> them all to share the same connection, would that make the code more
> efficient?
> What would be a good threshold for number of threads? 100? 500? 1000?
> 10000?
> Please let me know.
> Thank you,
> Spike S.|||Hi Andrew
Thank you very much for all the information.
I did some testing, using the connection pooling, and it is exactly what I
was looking for, I can have around 50 threads before I see a performance hit
.
This is the first time I posted into a managed Microsoft newsgroup. From
this experience I will not think twice before checking the managed group
again.
Thank you again for all your help.
Take care,
Spike S.|||Please note that Andy doesn't have anything to do with the MSDN managed
newsgroup program/policy/whatever you want to call it. Andy doesn't work for
Microsoft and is out here helping everybody on his own dime. That, in my
opinion, means he deserves even more thanks. :-)
Sincerely,
Steve Dybing
This posting is provided "AS IS" with no warranties, and confers no rights.
"Spike Spiegel" <cbb_spike@.hotmail.com> wrote in message
news:74D54EA9-786B-45AE-8007-88804D2A4B56@.microsoft.com...
> Hi Andrew
> Thank you very much for all the information.
> I did some testing, using the connection pooling, and it is exactly what I
> was looking for, I can have around 50 threads before I see a performance
> hit.
> This is the first time I posted into a managed Microsoft newsgroup. From
> this experience I will not think twice before checking the managed group
> again.
> Thank you again for all your help.
> Take care,
> Spike S.|||Double thanks to Andrew then...|||Double you are welcome.
Andrew J. Kelly SQL MVP
"Spike Spiegel" <cbb_spike@.hotmail.com> wrote in message
news:A5A1E014-F5C1-43E4-8956-F9D19EA5C153@.microsoft.com...
> Double thanks to Andrew then...|||Ahhh gee Thanks Steve :)
Andrew J. Kelly SQL MVP
"Steve Dybing [MSFT]" <steve.dybing@.online.microsoft.com> wrote in message
news:eFQhpyFdGHA.3908@.TK2MSFTNGP04.phx.gbl...
> Please note that Andy doesn't have anything to do with the MSDN managed
> newsgroup program/policy/whatever you want to call it. Andy doesn't work
> for Microsoft and is out here helping everybody on his own dime. That, in
> my opinion, means he deserves even more thanks. :-)
> --
> Sincerely,
> Steve Dybing
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Spike Spiegel" <cbb_spike@.hotmail.com> wrote in message
> news:74D54EA9-786B-45AE-8007-88804D2A4B56@.microsoft.com...
>sql

Monday, March 26, 2012

Multiserver administratie on SQL2005

Hello,
does anyone has managed to get MultiServer jobs working on SQL2005.
I have installed 3 fresh win2003 servers with SP1. One is a DC, DHCP
server and DNS server. The two others are SQL2005, using the same
service account that has full administrative rights. I log on also as
administrator when I try to make one of the SQL2005 the master server.
During enlisting of the target server on the master server I get the
error that the target server could not logon on the master server
(altough its service account has full admin rights on the master server)
Any suggestions
Thanks a lot in advance
Marc MertensMarc
Do you mean to run a job on the source server that does the work on the
destination? Linked servers?
"Marc Mertens" <mertens.techdata@.gmail.com> wrote in message
news:upCqi06ZGHA.4580@.TK2MSFTNGP03.phx.gbl...
> Hello,
> does anyone has managed to get MultiServer jobs working on SQL2005. I
> have installed 3 fresh win2003 servers with SP1. One is a DC, DHCP server
> and DNS server. The two others are SQL2005, using the same service account
> that has full administrative rights. I log on also as administrator when I
> try to make one of the SQL2005 the master server. During enlisting of the
> target server on the master server I get the error that the target server
> could not logon on the master server (altough its service account has full
> admin rights on the master server)
> Any suggestions
> Thanks a lot in advance
> Marc Mertens|||No, MultiServer administration means that you create a multserver job on
a master server that is downloaded on target servers and executed there.
You enable multiserver administration by right clicking on the SQL
Server agent and choosing the correct menu entry in All Tasks. This is a
feature already available on a SQL2000 (where it worked without a
problem), but it does not seems to work anymore in SQL2005 (at least I
can not get it working).
Marc
Uri Dimant wrote:
> Marc
> Do you mean to run a job on the source server that does the work on the
> destination? Linked servers?
>
> "Marc Mertens" <mertens.techdata@.gmail.com> wrote in message
> news:upCqi06ZGHA.4580@.TK2MSFTNGP03.phx.gbl...
>

Multiserver administratie on SQL2005

Hello,
does anyone has managed to get MultiServer jobs working on SQL2005.
I have installed 3 fresh win2003 servers with SP1. One is a DC, DHCP
server and DNS server. The two others are SQL2005, using the same
service account that has full administrative rights. I log on also as
administrator when I try to make one of the SQL2005 the master server.
During enlisting of the target server on the master server I get the
error that the target server could not logon on the master server
(altough its service account has full admin rights on the master server)
Any suggestions
Thanks a lot in advance
Marc MertensMarc
Do you mean to run a job on the source server that does the work on the
destination? Linked servers?
"Marc Mertens" <mertens.techdata@.gmail.com> wrote in message
news:upCqi06ZGHA.4580@.TK2MSFTNGP03.phx.gbl...
> Hello,
> does anyone has managed to get MultiServer jobs working on SQL2005. I
> have installed 3 fresh win2003 servers with SP1. One is a DC, DHCP server
> and DNS server. The two others are SQL2005, using the same service account
> that has full administrative rights. I log on also as administrator when I
> try to make one of the SQL2005 the master server. During enlisting of the
> target server on the master server I get the error that the target server
> could not logon on the master server (altough its service account has full
> admin rights on the master server)
> Any suggestions
> Thanks a lot in advance
> Marc Mertens|||No, MultiServer administration means that you create a multserver job on
a master server that is downloaded on target servers and executed there.
You enable multiserver administration by right clicking on the SQL
Server agent and choosing the correct menu entry in All Tasks. This is a
feature already available on a SQL2000 (where it worked without a
problem), but it does not seems to work anymore in SQL2005 (at least I
can not get it working).
Marc
Uri Dimant wrote:
> Marc
> Do you mean to run a job on the source server that does the work on the
> destination? Linked servers?
>
> "Marc Mertens" <mertens.techdata@.gmail.com> wrote in message
> news:upCqi06ZGHA.4580@.TK2MSFTNGP03.phx.gbl...
>> Hello,
>> does anyone has managed to get MultiServer jobs working on SQL2005. I
>> have installed 3 fresh win2003 servers with SP1. One is a DC, DHCP server
>> and DNS server. The two others are SQL2005, using the same service account
>> that has full administrative rights. I log on also as administrator when I
>> try to make one of the SQL2005 the master server. During enlisting of the
>> target server on the master server I get the error that the target server
>> could not logon on the master server (altough its service account has full
>> admin rights on the master server)
>> Any suggestions
>> Thanks a lot in advance
>> Marc Mertens
>

Friday, March 23, 2012

Multiple Zip Search

I'm heaving a heck of a time to get a sql query working. I'm being passed a series of zip codes and I need to return a list of all the rows that match those zip codes in a database of about 40,000 leads.

Can someone clue me in to what the commandtext of my query should look like?

Thanks!

EXEC( 'SELECT * FROM YourTable where YourZip IN (''' + @.z + ''')' )

where @.z = list of zip codes.

hth|||Well if you are inclined to avoid D-SQL and are using SQL Server 2000, you can use a UDF
or many other techniques which would prove much better than D-SQL.|||My problem is that I'm a web guy with just enough SQL 2000 experience to be dangerous. I'm not exactly sure that the first answer given would help me because the zip codes are different for every query. I have a list of zip codes and I have a parameter set up in my dataadapter (@.zip), but I can't get any results. It's probably an issue with single or double quotes, but i'm not sure. I'm putting all the zip codes together into a session variable, trying to get something like this:

WHERE ZIP LIKE '%80000%' OR ZIP LIKE '%72322%' etc. There can be up to 75 zips in one query.

I really appreciate the help!|||A user defined function to create an query with IN ('zip,zip,etc') is your best bet.

Here is someting I wrote a long time ago but it was similar to what you could do.


IF EXISTS (SELECT 1 FROM sysobjects WHERE name = N'fnConvertListToStringTable')
DROP FUNCTION [dbo].[fnConvertListToStringTable]
GO

CREATE FUNCTION [dbo].[fnConvertListToStringTable] (
@.list varchar(1000)
)

RETURNS @.ListTable table (ItemID varchar(250) NULL)

AS

BEGIN

IF(SUBSTRING(@.list,LEN(@.list),1) <> ',')
BEGIN
SET @.list = @.list + ','
END

DECLARE @.StartLocation int
DECLARE@.Length int
SET @.StartLocation = 0
SET @.Length = 0

SELECT @.StartLocation = CHARINDEX(',',@.list,@.StartLocation+1)

WHILE @.StartLocation > 0
BEGIN

IF(LOWER(RTRIM(LTRIM(SUBSTRING(@.list,@.Length+1,(@.StartLocation-@.length) -1))))) = 'null'
INSERT INTO @.ListTable(ItemID) VALUES (Null)
ELSE
BEGIN
INSERT INTO @.ListTable(ItemID)
VALUES (RTRIM(LTRIM(SUBSTRING(@.list,@.Length+1,(@.StartLocation-@.length) -1))))
END
SET @.Length = @.StartLocation
SET @.StartLocation = CHARINDEX(',', @.list, @.StartLocation +1)
END

RETURN
END
GO

select * from dbo.fnConvertListToStringTable(' yjyj, 1345, 1234,NUll')

The code above actually put the values in a table and then used a where in (Select from that table) but in your case you can juse use the part that does the parsing at the beginning.sql

Monday, March 19, 2012

Multiple transactions not working in package

I have a package with two sequence containers, each containing two SQL tasks and a data flow task, executed in that order. I want to encapsulate the data flow task in a transaction but not the SQL tasks. I have the TransactionOption property set to 'required' on the data flow tasks and 'supported' on the SQL tasks and the sequence containers. When I run the package I get a distributed transaction error on the first SQL task of the second sequence container:

"[Execute SQL Task] Error: Executing the query "TRUNCATE TABLE DistTransTbl2" failed with the following error: "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."

The only way I can get the package to succeed is to set the TransactionOption = 'required' on the sequence containers and 'supported' on all subordinate tasks. This is not what I want, however. Any ideas?

Thanks,

Eric

Eric,

Can you please send me your package?

So far I couldn’t repro the problem.

|||

Eric, have you tried using a DELETE FROM statement instead of a truncate statement. Truncate doesn't log, so it's very fast, but is probably the reason you're blocking on your second task that's attempting to insert into the table.

K

|||

Hi

I am getting the EXACT same problem, but I am not using any TRUNCATE statements or similar.

Actually, I find that the problem only seems to exist when I try to enlist a Data Flow task in a transaction.

If I have 2 sequence containers, each containing an Execute SQL Task, everything works fine. If I try to replace one of these with a Data Flow Task, then I get the same error.

Does anyone have a solution to this?

|||I could not reproduce the issues reported.

Multiple transactions not working in package

I have a package with two sequence containers, each containing two SQL tasks and a data flow task, executed in that order. I want to encapsulate the data flow task in a transaction but not the SQL tasks. I have the TransactionOption property set to 'required' on the data flow tasks and 'supported' on the SQL tasks and the sequence containers. When I run the package I get a distributed transaction error on the first SQL task of the second sequence container:

"[Execute SQL Task] Error: Executing the query "TRUNCATE TABLE DistTransTbl2" failed with the following error: "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."

The only way I can get the package to succeed is to set the TransactionOption = 'required' on the sequence containers and 'supported' on all subordinate tasks. This is not what I want, however. Any ideas?

Thanks,

Eric

Eric,

Can you please send me your package?

So far I couldn’t repro the problem.

|||

Eric, have you tried using a DELETE FROM statement instead of a truncate statement. Truncate doesn't log, so it's very fast, but is probably the reason you're blocking on your second task that's attempting to insert into the table.

K

|||

Hi

I am getting the EXACT same problem, but I am not using any TRUNCATE statements or similar.

Actually, I find that the problem only seems to exist when I try to enlist a Data Flow task in a transaction.

If I have 2 sequence containers, each containing an Execute SQL Task, everything works fine. If I try to replace one of these with a Data Flow Task, then I get the same error.

Does anyone have a solution to this?

|||I could not reproduce the issues reported.

Multiple Threads and Licensing

Hello,
I am working on a project that will require the use of SQL Server 2005
Workgroup Edition. We were planning to use the version that comes with
5 CALs instead of the version that is licensed based on processors due
to the enormous cost difference.
The application I am working on is using c#. This program will spawn
multiple threads to communicate with instruments attached on the network
Each of these threads will have a connection to the db to save data. I
am being told that each thread will require a CAL. Is that correct? I
can not find anything in the licensing information that explicitly
states this. It was my understanding that a CAL is based on user or
device and could make as many connections to the db as needed.
ThanksIf you have only 5 instruments then you should be OK. Each instrument is a
user and can spawn multiple connections although I don't understand why it
would need to.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Patrick Brand" <"pbrand$NOSPAM$"@.ludlums.com> wrote in message
news:uvdvuKjlGHA.4792@.TK2MSFTNGP02.phx.gbl...
> Hello,
> I am working on a project that will require the use of SQL Server 2005
> Workgroup Edition. We were planning to use the version that comes with 5
> CALs instead of the version that is licensed based on processors due to
> the enormous cost difference.
> The application I am working on is using c#. This program will spawn
> multiple threads to communicate with instruments attached on the network
> Each of these threads will have a connection to the db to save data. I am
> being told that each thread will require a CAL. Is that correct? I can
> not find anything in the licensing information that explicitly states
> this. It was my understanding that a CAL is based on user or device and
> could make as many connections to the db as needed.
> Thanks|||If you have only 5 instruments then you should be OK. Each instrument is a
user and can spawn multiple connections although I don't understand why it
would need to.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Patrick Brand" <"pbrand$NOSPAM$"@.ludlums.com> wrote in message
news:uvdvuKjlGHA.4792@.TK2MSFTNGP02.phx.gbl...
> Hello,
> I am working on a project that will require the use of SQL Server 2005
> Workgroup Edition. We were planning to use the version that comes with 5
> CALs instead of the version that is licensed based on processors due to
> the enormous cost difference.
> The application I am working on is using c#. This program will spawn
> multiple threads to communicate with instruments attached on the network
> Each of these threads will have a connection to the db to save data. I am
> being told that each thread will require a CAL. Is that correct? I can
> not find anything in the licensing information that explicitly states
> this. It was my understanding that a CAL is based on user or device and
> could make as many connections to the db as needed.
> Thanks|||Hi Roger,
Thanks for replying.
I want to make sure I understand how this works. My program will be
running on the same computer as the SQL server. It will collect data
from up to 32 instruments in 32 threads. Based on this data, I will
save information to the database, 1 record for each instrument. Is this
considered multiplexing or pooling and that is why I would need 32 CALs?
If I used just 1 connection would 1 CAL be sufficient?
I will also have a couple of other computers that connect to this main
computer and view and edit the data. I know these will require separate
CALs.
I called MS Volume Licensing and was told that for each connection to
the database I needed a CAL period. If I have 1 user that opens up 5
connections (example 5 different programs) to the database that would
use 5 CALs. If I took 1 program that made a connection to the db and
ran it twice on the same computer that would require 2 CALS. Any
program I write needs a CAL for each connection to the database. To me
this seems like the CALs are based on connections and not users or
devices. Is that correct?
So I guess my real question is: Is a user or device CAL is only good
for 1 connection to the database? If the program this user is running
for whatever reason makes 2 connections to the database it requires 2
CALs even though its coming from the same user or device?
I have searched MS's website and have not found any solid information on
how this licensing is really suppose to work.
Thanks again
Roger Wolter[MSFT] wrote:
> If you have only 5 instruments then you should be OK. Each instrument is
a
> user and can spawn multiple connections although I don't understand why it
> would need to.
>|||Hi Roger,
Thanks for replying.
I want to make sure I understand how this works. My program will be
running on the same computer as the SQL server. It will collect data
from up to 32 instruments in 32 threads. Based on this data, I will
save information to the database, 1 record for each instrument. Is this
considered multiplexing or pooling and that is why I would need 32 CALs?
If I used just 1 connection would 1 CAL be sufficient?
I will also have a couple of other computers that connect to this main
computer and view and edit the data. I know these will require separate
CALs.
I called MS Volume Licensing and was told that for each connection to
the database I needed a CAL period. If I have 1 user that opens up 5
connections (example 5 different programs) to the database that would
use 5 CALs. If I took 1 program that made a connection to the db and
ran it twice on the same computer that would require 2 CALS. Any
program I write needs a CAL for each connection to the database. To me
this seems like the CALs are based on connections and not users or
devices. Is that correct?
So I guess my real question is: Is a user or device CAL is only good
for 1 connection to the database? If the program this user is running
for whatever reason makes 2 connections to the database it requires 2
CALs even though its coming from the same user or device?
I have searched MS's website and have not found any solid information on
how this licensing is really suppose to work.
Thanks again
Roger Wolter[MSFT] wrote:
> If you have only 5 instruments then you should be OK. Each instrument is
a
> user and can spawn multiple connections although I don't understand why it
> would need to.
>|||First, (disclaimer) I'm not a licensing expert.
As I understand your problem, you have one client program (where it executes
is immaterial -standalone or server).
That one client application has multiple threads connecting to various
input/output devices -including keyboard, mouse, etc.
That one client application obtains information from those input/output
devices, and then that one client saves data in SQL Server.
I believe you have one client requiring one CAL.
The various input/output devices are not connecting to SQL Server.
Consider other various input/output devices. Should you have a separate CAL
for keyboard, mouse, PLC, barcode reader, digital tablet, etc. I think you
can see where I'm going. If your various 'instruments' directly connected to
SQL Server, (and had the intelligence to use that connection) they would
require CALs -but they do not. You application is not serving as a 'proxy'
for these input/output devices (as a web server serves as proxy to
individual client sessions.)
If I have 10 (or whatever number) of client applications running on a single
computer, each running in its own thread, each connected to SQL Server, I
only need a single CAL (either device or user). Except of course, if by
using terminal services, or Citrix, my computer is serving as a proxy for
other computers -then each proxied connection requires its own CAL.
Let me know if this helps,
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Patrick Brand" <"pbrand$NOSPAM$"@.ludlums.com> wrote in message
news:uvdvuKjlGHA.4792@.TK2MSFTNGP02.phx.gbl...
> Hello,
> I am working on a project that will require the use of SQL Server 2005
> Workgroup Edition. We were planning to use the version that comes with 5
> CALs instead of the version that is licensed based on processors due to
> the enormous cost difference.
> The application I am working on is using c#. This program will spawn
> multiple threads to communicate with instruments attached on the network
> Each of these threads will have a connection to the db to save data. I am
> being told that each thread will require a CAL. Is that correct? I can
> not find anything in the licensing information that explicitly states
> this. It was my understanding that a CAL is based on user or device and
> could make as many connections to the db as needed.
> Thanks|||My interpretation is that you would need 32 CALs to cover your 32 devices
but I'm not a lawyer so you need to go with what the licensing people say.
To me, your situation is the same as 32 users connecting to a middle tier
application that opens up one or more connections to the database. In that
case you pay for 32 CALs because what counts is users of the database not
connections. Conversely, those same 32 users could each open 2 connections
to the database and still only require 32 CALs. I don't know if there's a
different policy if your users are really inanimate objects (I've had users
that were pretty inanimate but that's a different story) so you need to talk
to the licensing people.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Patrick Brand" <"pbrand$NOSPAM$"@.ludlums.com> wrote in message
news:%231sopWtlGHA.4076@.TK2MSFTNGP03.phx.gbl...[vbcol=seagreen]
> Hi Roger,
> Thanks for replying.
> I want to make sure I understand how this works. My program will be
> running on the same computer as the SQL server. It will collect data from
> up to 32 instruments in 32 threads. Based on this data, I will save
> information to the database, 1 record for each instrument. Is this
> considered multiplexing or pooling and that is why I would need 32 CALs?
> If I used just 1 connection would 1 CAL be sufficient?
> I will also have a couple of other computers that connect to this main
> computer and view and edit the data. I know these will require separate
> CALs.
> I called MS Volume Licensing and was told that for each connection to the
> database I needed a CAL period. If I have 1 user that opens up 5
> connections (example 5 different programs) to the database that would use
> 5 CALs. If I took 1 program that made a connection to the db and ran it
> twice on the same computer that would require 2 CALS. Any program I write
> needs a CAL for each connection to the database. To me this seems like
> the CALs are based on connections and not users or devices. Is that
> correct?
> So I guess my real question is: Is a user or device CAL is only good for
> 1 connection to the database? If the program this user is running for
> whatever reason makes 2 connections to the database it requires 2 CALs
> even though its coming from the same user or device?
> I have searched MS's website and have not found any solid information on
> how this licensing is really suppose to work.
> Thanks again
> Roger Wolter[MSFT] wrote:|||As I said before, I'm not a licensing expert. I have engaged in lengthly
conversations with legal staff at several major manufacturing 'partners'
about my concerns in regards to licensing. I'm relating to what I have been
told and observed to be in actual practice.
There are a number of products in the process control field that serve to
collect input from PLC devices in manfacturing, and then store that input in
database servers such as SQL Server. Those products collect the data,
perhaps 'massage' it in some way, and then save the data in a data server.
Logically, it's really not much different than using a keyboard as an input
device -and often with as little 'intelligence' as a keyboard.
According to your logic, every major manufacturer is out of complicance
since they are not buying a CAL for each and every production line input
device. (Of course, Microsoft would like that, but the very large
manfacturing user base would be extremely uncomfortable with that analysis.)
I think the key is "Can (or) Does the device directly use the connection
with or without the 'middleman' application? If so, as in the case of any
middle tier (COM server, Web server, etc.) application, a CAL is required.
It seems that if the device could never use a connection with/or without the
'middleman' application, it 'may' not require a CAL. (Note the
equivocation -I'm not a licensing specialist. And sometimes when chatting
with VL phone folks, it takes a bit of explaining (sometimes over and over)
to be clearly understood -after all, their job is to sell licenses -not help
the customer avoid unneeded licenses!)
Perhaps Patrict needed assistance in understanding how to more clearly
communicate the issues to the VL folks. If so, I hope I helped. If I muddied
the waters, I offer my regrets.
However, as always, since everything changes so fast and so much, I am open
to my continued education...(And I'm backing out of this conversation
leaving it to more learned hands.)
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:OhoxvVxlGHA.4100@.TK2MSFTNGP05.phx.gbl...
> My interpretation is that you would need 32 CALs to cover your 32 devices
> but I'm not a lawyer so you need to go with what the licensing people say.
> To me, your situation is the same as 32 users connecting to a middle tier
> application that opens up one or more connections to the database. In
> that case you pay for 32 CALs because what counts is users of the database
> not connections. Conversely, those same 32 users could each open 2
> connections to the database and still only require 32 CALs. I don't know
> if there's a different policy if your users are really inanimate objects
> (I've had users that were pretty inanimate but that's a different story)
> so you need to talk to the licensing people.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Patrick Brand" <"pbrand$NOSPAM$"@.ludlums.com> wrote in message
> news:%231sopWtlGHA.4076@.TK2MSFTNGP03.phx.gbl...
>|||First, (disclaimer) I'm not a licensing expert.
As I understand your problem, you have one client program (where it executes
is immaterial -standalone or server).
That one client application has multiple threads connecting to various
input/output devices -including keyboard, mouse, etc.
That one client application obtains information from those input/output
devices, and then that one client saves data in SQL Server.
I believe you have one client requiring one CAL.
The various input/output devices are not connecting to SQL Server.
Consider other various input/output devices. Should you have a separate CAL
for keyboard, mouse, PLC, barcode reader, digital tablet, etc. I think you
can see where I'm going. If your various 'instruments' directly connected to
SQL Server, (and had the intelligence to use that connection) they would
require CALs -but they do not. You application is not serving as a 'proxy'
for these input/output devices (as a web server serves as proxy to
individual client sessions.)
If I have 10 (or whatever number) of client applications running on a single
computer, each running in its own thread, each connected to SQL Server, I
only need a single CAL (either device or user). Except of course, if by
using terminal services, or Citrix, my computer is serving as a proxy for
other computers -then each proxied connection requires its own CAL.
Let me know if this helps,
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Patrick Brand" <"pbrand$NOSPAM$"@.ludlums.com> wrote in message
news:uvdvuKjlGHA.4792@.TK2MSFTNGP02.phx.gbl...
> Hello,
> I am working on a project that will require the use of SQL Server 2005
> Workgroup Edition. We were planning to use the version that comes with 5
> CALs instead of the version that is licensed based on processors due to
> the enormous cost difference.
> The application I am working on is using c#. This program will spawn
> multiple threads to communicate with instruments attached on the network
> Each of these threads will have a connection to the db to save data. I am
> being told that each thread will require a CAL. Is that correct? I can
> not find anything in the licensing information that explicitly states
> this. It was my understanding that a CAL is based on user or device and
> could make as many connections to the db as needed.
> Thanks|||My interpretation is that you would need 32 CALs to cover your 32 devices
but I'm not a lawyer so you need to go with what the licensing people say.
To me, your situation is the same as 32 users connecting to a middle tier
application that opens up one or more connections to the database. In that
case you pay for 32 CALs because what counts is users of the database not
connections. Conversely, those same 32 users could each open 2 connections
to the database and still only require 32 CALs. I don't know if there's a
different policy if your users are really inanimate objects (I've had users
that were pretty inanimate but that's a different story) so you need to talk
to the licensing people.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Patrick Brand" <"pbrand$NOSPAM$"@.ludlums.com> wrote in message
news:%231sopWtlGHA.4076@.TK2MSFTNGP03.phx.gbl...[vbcol=seagreen]
> Hi Roger,
> Thanks for replying.
> I want to make sure I understand how this works. My program will be
> running on the same computer as the SQL server. It will collect data from
> up to 32 instruments in 32 threads. Based on this data, I will save
> information to the database, 1 record for each instrument. Is this
> considered multiplexing or pooling and that is why I would need 32 CALs?
> If I used just 1 connection would 1 CAL be sufficient?
> I will also have a couple of other computers that connect to this main
> computer and view and edit the data. I know these will require separate
> CALs.
> I called MS Volume Licensing and was told that for each connection to the
> database I needed a CAL period. If I have 1 user that opens up 5
> connections (example 5 different programs) to the database that would use
> 5 CALs. If I took 1 program that made a connection to the db and ran it
> twice on the same computer that would require 2 CALS. Any program I write
> needs a CAL for each connection to the database. To me this seems like
> the CALs are based on connections and not users or devices. Is that
> correct?
> So I guess my real question is: Is a user or device CAL is only good for
> 1 connection to the database? If the program this user is running for
> whatever reason makes 2 connections to the database it requires 2 CALs
> even though its coming from the same user or device?
> I have searched MS's website and have not found any solid information on
> how this licensing is really suppose to work.
> Thanks again
> Roger Wolter[MSFT] wrote:

Wednesday, March 7, 2012

Multiple Sources & Destinations...

Hello,

I am working on a typical data conversion project where we are migrating data from an old data model to a new data model, using SSIS. Both the DBs are in SQL.

Now we have a situation where say there are 25 source tables and 20 odd target tables.

For transporting data, we are using OLEDB Source & OLEDB Destination transforms. However, each transform maps to one view or one table. As a result, the Data Flow is really messed up with 45+ transforms in it. Is there an elegant way of doing this ? With say just one datasource or maybe fewer transforms?

Thanks,

Satya

I would have one Data Flow for each set of source and destination tables. Only cover related tables min each. I assume this means 20 tasks as you have 20 destination tables.

Monday, February 20, 2012

Multiple rows into single column

I'm working on a Reports and I need to combine data from multiple
rows (with the same EventDate) into one comma separated string. This is how the data is at the moment:

EmployeeID EventDate
2309 2005-10-01 00:00:00.000
2309 2005-10-01 03:44:50.000
2309 2005-10-01 08:59:00.000
2309 2005-10-01 09:29:44.000

I need it in the following format:

EmpID EventDate EventTime
2309 2005-10-01 00:00:00,03:44:50,08:59:00,09:29:44

There is no definite number of EventTime per Employee for a particular EventDate. And i don't want to use Iterative Methods.

Thanks & Regards
Rajan

Hi Rajan,

If you have access to sql server magazine take a look at this article, http://www.sqlmag.com/Article/ArticleID/93907/sql_server_93907.html

You can see the code even if you don't have membership so should still be useful. Listing 3 will probably be the most useful, although it is not particularly efficient.

Hope this helps.

Chris

|||

Another alternative might be something like:

declare @.mockup table
( EmployeeId integer,
EventDate datetime
)
insert into @.mockup values (2308, '1/1/2005')
insert into @.mockup values (2309, '10/1/2005')
insert into @.mockup values (2309, '10/1/2005 3:44:50')
insert into @.mockup values (2309, '10/1/2005 8:59')
insert into @.mockup values (2309, '10/1/2005 9:29:44')
insert into @.mockup values (2310, '11/1/2005')

select employeeId,
replace(replace(
( select e.eventDate as [data()]
from @.mockup e
where a.employeeId = e.employeeId
order by e.eventDate
for xml path ('')
), ' ', ','), 'T', ' ')
as EventDates
from @.mockup a
group by employeeId
order by employeeId

-- employeeId EventDates
-- -- -
-- 2308 2005-01-01 00:00:00
-- 2309 2005-10-01 00:00:00,2005-10-01 03:44:50,2005-10-01 08:59:00,2005-10-01 09:29:44
-- 2310 2005-11-01 00:00:00

Multiple row updates

Hello,
I am working on a web app and am at a point where I have multiple rows in my GUI that need to be sent to and saved in SQL Server when the user presses Save. We want to pass the rows to a working table and the do a begin tran, move rows from working table to permanent tables with set processing, commit tran. The debate we are having is how to get the data to the work table. We can do individual inserts to the work table 1 round trip for each row (could be 100's of rows) or concatenate all rows into 1 long (up to 8K at a time) string and make one call sending the long string and then parse it into the work table in SQL Server. Trying to consider network usage and overhead by sending many short items vs 1 long item and cpu overhead for many inserts vs string manipulation and parsing. Suggestions?

Thanks you
JeffHow about dump to Text File then Use Stored procedure to import then move files out of the way when complete.

May even remove the need for a work table cos U will already have a log & using DTS or BCP to import is pretty fast

just a thought

GW|||Yeah I was thinking that's what I would do...

But what happens when, let's say you have 10 users trying to do this at the same time...

Your work table seems problematic

Just dump the file...and use a sproc to bcp it in...