Showing posts with label application. Show all posts
Showing posts with label application. Show all posts

Monday, March 26, 2012

Duplicate Record Problem

I am working on a web application that utilizes a sql server database. One of the tables is a large text file that is imported through a DTS package from a Unix server. For whatever reason, the Unix box dumps quite a few duplicate records in the nightly run and these are in turn pulled into the table. I need to get rid of these duplicates, but can't seem to get a workable solution. the query that is needed to get the records is:
SELECT tblAppointments.PatientID, tblPTDEMO2.MRNumber, tblAppointments.PatientFirstName, tblAppointments.PatientLastName,
tblAppointments.PatientDOB, tblAppointments.PatientSex, tblAppointments.NewPatient, tblAppointments.HomePhone,
tblAppointments.WorkPhone, tblAppointments.Insurance1, tblPTDEMO2.Ins1CertNmbr, tblAppointments.Insurance2,
tblPTDEMO2.Ins2CertNmbr, tblAppointments.Insurance3, tblPTDEMO2.Ins3CertNmbr, tblAppointments.ApptDate, tblAppointments.ApptTime
FROM tblAppointments CROSS JOIN
tblPTDEMO2
WHERE (tblAppointments.PatientID = tblPTDEMO2.MRNumber)
AND tblAppointments.Insurance1 = 'MED'
AND tblAppointments.ApptTypeID <> 'MTG'
AND tblAppointments.ApptTypeID <> 'PNV'
AND DateDiff("dd", ApptDate, GetDate()) = 0
Order By tblAppointments.ApptDate
My first thought was to try to get a Select DISTINCT to work, but couldn't figure out how to do this with the query. My next thought was to try to set up constraints on the table, but, since there are duplicates, the DTS package fails. I assume there is a way to set up the transformations in a way to get this to work, but I'm not enough of an expert with SQL Server to figure this out on my own. I guess the other way to do this is to write some small script or application to do this, but I suspect there must be an easier way for those who know what they are doing. Any help on this topic would be greatly appreciated. Thanks.In SQL Server duplicates are eliminated by using Unique constraint or Index on the index you can add IGNORE_DUP_KEY option and make it all inserts because that option will not affect update statements. And they are very slow but the UNION operator also eliminates duplicates by applying implict Distinct. Run a search for all of the above in SQl Server BOL(books online). Hope this helps.|||For an import approach, I'd suggest inserting the records into atemporary table first. Then select out the unique records and insertthem into your destination table.
For the above query, would something like this work?
SELECT DISTINCT
PatientID,
MRNumber,
PatientFirstName,
PatientLastName,
PatientDOB,
PatientSex,
NewPatient,
...etc, etc, etc...
FROM
(
SELECT tblAppointments.PatientID, tblPTDEMO2.MRNumber, tblAppointments.PatientFirstName, tblAppointments.PatientLastName,
tblAppointments.PatientDOB, tblAppointments.PatientSex, tblAppointments.NewPatient, tblAppointments.HomePhone,
tblAppointments.WorkPhone, tblAppointments.Insurance1, tblPTDEMO2.Ins1CertNmbr, tblAppointments.Insurance2,
tblPTDEMO2.Ins2CertNmbr,tblAppointments.Insurance3, tblPTDEMO2.Ins3CertNmbr,tblAppointments.ApptDate, tblAppointments.ApptTime
FROM tblAppointments CROSS JOIN
tblPTDEMO2
WHERE (tblAppointments.PatientID = tblPTDEMO2.MRNumber)
AND tblAppointments.Insurance1 = 'MED'
AND tblAppointments.ApptTypeID <> 'MTG'
AND tblAppointments.ApptTypeID <> 'PNV'
AND DateDiff("dd", ApptDate, GetDate()) = 0
Order By tblAppointments.ApptDate
) AS SQ|||

I have re-written this a bit to remove the CROSS JOIN syntax which I think is less efficient than the INNER JOIN that is implied in the WHERE clause:
SELECT A.PatientID, D.MRNumber, A.PatientFirstName, A.PatientLastName, A.PatientDOB, A.PatientSex,
A.NewPatient, A.HomePhone, A.WorkPhone, A.Insurance1, D.Ins1CertNmbr, A.Insurance2,
D.Ins2CertNmbr, A.Insurance3, D.Ins3CertNmbr, A.ApptDate, A.ApptTime
FROM tblAppointments A INNER JOIN tblPTDEMO2 D on A.PatientID = D.MRNumber
WHERE A.Insurance1 = 'MED'
AND A.ApptTypeID <> 'MTG'
AND A.ApptTypeID <> 'PNV'
AND DateDiff("dd", ApptDate, GetDate()) = 0
Order By A.ApptDate

Now, I assume that the duplicates are in thetblPTDEMO2table. Tell me more about these: are the IDs duped?

|||Thanks for your response. The query you wrote is conceptually what I am trying to get, but it throws a syntax error. I've played with a number of variations of this and I can't seem to get it to work.
The other option of using a temporary table during the DTS package is viable, but once again, I can't seem to get the query right. I think what I want is something like:
Insert Into tblAppointments AppointmentKey, PatientFirstName, PatientLastName, ...VALUES (Select DISTINCT AppointmentKey, PatientFirstName, PatientLastName, ...)
but once again, I can't seem to get the syntax correct. Any help would be greatly appreciated. Thanks.|||Thanks for your response. Actually, the tblAppointments table is the one with the duplicates, and yes, the IDs are duplicated as well.

Duplicate order nums in Orders

Hi all,
We have a third party application that allows users to take
customer orders. This application has all the bells and
whistles of the Titanic. Since we wanted our customers to
be able to place orders themselves, we built a smaller
light weight application to allow them to do just that.
This was built using VB6, SP5. The back end is SQL Server
2000.
When an order is taken an OrderNumber is assigned to it.
The problem that I am having is that sometimes the order
numbers duplicate. That is, two orders have the same number.
This only happens when the the main order system and the
small order app both insert a new order at almost the same
time (normally 1 second apart).
When developing the smaller order app I built the following
TSQL transaction to avoid this from happening:
begin transaction
declare @.newConfirm int
declare @.maxNum int
--here I get the new order num
select @.newOrderNum=CurrentSeqNum,@.maxNum=Maxim
um
from SeqNumbers where Id='OrderNumber'
--the order num cycles, so if it reached the limit start over
if @.newOrderNum = @.maxNum
update SeqNumbers set CurrentSeqNum=Minimum
where Id='OrderNumber'
Else
update SeqNumbers set CurrentSeqNum=CurrentSeqNum+1
where Id='OrderNumber'
--I insert the data pertaining to the order
insert into trnOrders (AccountId,Received,Shipped,Amount,Order
Number)
values('69M033',getdate(),'2005-06-13',2300,@.newOrderNum)
--I retrieve the order number
select @.newOrderNum as OrderNum
commit transaction
The above should protect the smaller app from getting duplicate
order numbers when more than one order is placed at the same time
using the smaller app.
How can I protect against there being duplicate order numbers due
to orders being placed at the same time by the other application? Any
ideas what could be causing this? Is the process that I am following
robust enough to protect against this?
Any advice is greatly appreciated, thanks!
SagaThe first thing is to put a primary key constraint in the order table to
avoid duplicated order numbers,o no matter how many applications are they
using to enter orders.
You can create another stored procedure to get the last number to be used.
create procedure dbo.usp_next_order_number
@.next_order_number int output
as
set nocount on
update dbo.SeqNumbers
set @.next_order_number = CurrentSeqNum = CurrentSeqNum + 1
where [Id]='OrderNumber'
return @.@.error
go
and call this sp from yours.
create procedure...
@.newOrderNum int output
as
set nocount on
begin transaction
declare @.newConfirm int
--declare @.maxNum int
--here I get the new order num
-- select @.newOrderNum=CurrentSeqNum,@.maxNum=Maxim
um
-- from SeqNumbers where Id='OrderNumber'
--the order num cycles, so if it reached the limit start over
-- if @.newOrderNum = @.maxNum
-- update SeqNumbers set CurrentSeqNum=Minimum
-- where Id='OrderNumber'
-- Else
-- update SeqNumbers set CurrentSeqNum=CurrentSeqNum+1
-- where Id='OrderNumber'
declare @.rv int
declare @.error int
exec @.rv = dbo.usp_next_order_number @.newOrderNum output
set @.error = coalesce(nullif(@.rv, 0), @.@.error)
if @.@.error != 0
begin
rollback transaction
raiserror('Error getting next order number.', 16, 1)
return -1
end
--I insert the data pertaining to the order
insert into trnOrders (AccountId,Received,Shipped,Amount,Order
Number)
values('69M033',getdate(),'2005-06-13',2300,@.newOrderNum)
-- --I retrieve the order number
-- select @.newOrderNum as OrderNum
commit transaction
go
You need to put more code in your sp to check errors.
AMB
"Saga" wrote:

> Hi all,
> We have a third party application that allows users to take
> customer orders. This application has all the bells and
> whistles of the Titanic. Since we wanted our customers to
> be able to place orders themselves, we built a smaller
> light weight application to allow them to do just that.
> This was built using VB6, SP5. The back end is SQL Server
> 2000.
> When an order is taken an OrderNumber is assigned to it.
> The problem that I am having is that sometimes the order
> numbers duplicate. That is, two orders have the same number.
> This only happens when the the main order system and the
> small order app both insert a new order at almost the same
> time (normally 1 second apart).
> When developing the smaller order app I built the following
> TSQL transaction to avoid this from happening:
>
> begin transaction
> declare @.newConfirm int
> declare @.maxNum int
>
> --here I get the new order num
> select @.newOrderNum=CurrentSeqNum,@.maxNum=Maxim
um
> from SeqNumbers where Id='OrderNumber'
> --the order num cycles, so if it reached the limit start over
> if @.newOrderNum = @.maxNum
> update SeqNumbers set CurrentSeqNum=Minimum
> where Id='OrderNumber'
> Else
> update SeqNumbers set CurrentSeqNum=CurrentSeqNum+1
> where Id='OrderNumber'
> --I insert the data pertaining to the order
> insert into trnOrders (AccountId,Received,Shipped,Amount,Order
Number)
> values('69M033',getdate(),'2005-06-13',2300,@.newOrderNum)
> --I retrieve the order number
> select @.newOrderNum as OrderNum
> commit transaction
>
> The above should protect the smaller app from getting duplicate
> order numbers when more than one order is placed at the same time
> using the smaller app.
> How can I protect against there being duplicate order numbers due
> to orders being placed at the same time by the other application? Any
> ideas what could be causing this? Is the process that I am following
> robust enough to protect against this?
>
> Any advice is greatly appreciated, thanks!
> Saga
>
>|||Thank you for your reply. I will test using your idea. One thing I
cannot
do is place the constraint on the table because this db belongs to the
application that was purchased, so I can't make this kind of
modification
to it without risking the functionality of the main application. We once
added a field to one of the tables and the main application stopped
working.
Apparently, it validates the tables in some way.
Thanks again
Saga
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in
message news:033FC598-10FC-45F6-B1D0-74B57BF9B329@.microsoft.com...
> The first thing is to put a primary key constraint in the order table
> to
> avoid duplicated order numbers,o no matter how many applications are
> they
> using to enter orders.
> You can create another stored procedure to get the last number to be
> used.
> create procedure dbo.usp_next_order_number
> @.next_order_number int output
> as
> set nocount on
> update dbo.SeqNumbers
> set @.next_order_number = CurrentSeqNum = CurrentSeqNum + 1
> where [Id]='OrderNumber'
> return @.@.error
> go
> and call this sp from yours.
> create procedure...
> @.newOrderNum int output
> as
> set nocount on
> begin transaction
> declare @.newConfirm int
> --declare @.maxNum int
> --here I get the new order num
> -- select @.newOrderNum=CurrentSeqNum,@.maxNum=Maxim
um
> -- from SeqNumbers where Id='OrderNumber'
> --the order num cycles, so if it reached the limit start over
> -- if @.newOrderNum = @.maxNum
> -- update SeqNumbers set CurrentSeqNum=Minimum
> -- where Id='OrderNumber'
> -- Else
> -- update SeqNumbers set CurrentSeqNum=CurrentSeqNum+1
> -- where Id='OrderNumber'
> declare @.rv int
> declare @.error int
> exec @.rv = dbo.usp_next_order_number @.newOrderNum output
> set @.error = coalesce(nullif(@.rv, 0), @.@.error)
> if @.@.error != 0
> begin
> rollback transaction
> raiserror('Error getting next order number.', 16, 1)
> return -1
> end
> --I insert the data pertaining to the order
> insert into trnOrders (AccountId,Received,Shipped,Amount,Order
Number)
> values('69M033',getdate(),'2005-06-13',2300,@.newOrderNum)
> -- --I retrieve the order number
> -- select @.newOrderNum as OrderNum
> commit transaction
> go
> You need to put more code in your sp to check errors.
>
> AMB
> "Saga" wrote:
>

Duplicate Lines and Resources

I have a VB application with about 75 installations that uses the Crystal Control (Version 7.0) to print Crystal RPTs. On about 7 of these installations the clients are getting duplicate lines (usually on the last page or a single page report).
1) Using the same data (and reports) we cannot create this problem on any workstations execpt the 7 workstations that have the problem.
2) We do not think it a data problem, since we can clearly see in the [access] DB that there a 6 records, while the Crystal Report is clearly displaying 7 lines.
3) The report has 3 groups and the buplicates are with the detail records.
4) I have tried suppresion in the Section with
Whileprinting records;
previous(RecordId) = recordId

QUestions;
A) Are there any known resource requirements (Available Physical Memory/Available Virtual Memory/Page File SIze) limitaions anyone know of?
B) Any other ways in Crystal to attempt to resolve the problem?
C) ANY general suggestions, comments, or ideas?

ThanksDon't know why it's only on some clients, but what other tables is Crystal using? Try running Crystal's SQL on the DB to see if there's a join issue.
If a recordID really should be unique in the report then group on it and display in the group header/footer instead of the details section. This'll fix the symptom of any duplicate IDs, if not the cause of them.|||I have checking the links and am fairly confident this is not the cause, but it is worth another look. However, I will try the grouping suggetion; it sounds promising. THANKS!

Thursday, March 22, 2012

Duplicate FK Relationships - Help pl

I came across a situation in couple of the enterprise application projects, where I found a strange fact in the MS SQL Server Database they used.

I found multiple foreign-key(FK) relationships existing between tables. When examining the table design, I found that same relationship existed thrice with 3 different FK constraint names.

There are tables with single primary-key(PK) and few others with composite-PKs. As there are tables linked through relationships, will it matter that tables with composite-PKs will involve redundant FK relations with other tables?

I am puzzled as how redundant FK relationships could have got created. Is this purely human error or anythign with respect to MS SQL Server?

Please explain the probable cause for this scenario.

Thanks,

Ganesh

MS SQL does not create anything automatically. If FKs are there, it is because some human or a code generator created it.

You didn't say what version you were using, but there were weird problems, which were fixed early in 2000, with the "Diagrams" feature which might have done stuff like that, but I don't know anyone who uses the diagramming in MS SQL so I would be surprised if that was the cause.

|||

Hi Tom,

Thanks for the reply.

I use MS SQL Server 2000 version.

The other project used previous version of MS SQL Server.

In both these projects, the data base design was migrated from another source. I doubt this migration of design is the main cause. But still, the same question remains for the 1st database from where the design was migrated: "Does the initial database source had this duplication because of humar error or something else"?

NOTE: The diagram tool in MS SQL Server is perfect in this aspect, as I checked the design of tables from Query Analyzer - where there were duplicate FK replationships (different constraint-names) for the same column mapping. No database programmer intentionally creates multiple FK constraints on same column mapping. Then, what behind this?

Please check the database of your projects and come back if you too find the same. Also think of the cause for this.

|||There is nothing restricting the use of multiple FKs on the same fields to the same tables, with different constraint names. Yes, it is redundant and will hurt performance and should not be done.

Still, either some human did this, accidentally or for some unknown purpose, or a code generator did it. Most likely a code generator created them.

In any case, they should be removed.
|||Thanks Phillips.

Duplicate Events

The nature of the event provider for my SQLNS application is to produce
exact duplicate rows into the event table. Obviously, I am not
interested in receiving duplicate notifications. What are some
strategies for having SQLNS produce one notification for several exact
rows being sent to the events table.

I have an event chronicle that retrieves distinct rows from the event
table and puts them into the chronicle. My thoughts were that I could
use the chronicle table in my matching statement. But the timing
doesn't seem to be working out. The matching is apparently done before
the chronicle is updated.

Any thoughts on strategies for having SQLNS produce one notification
for several exact rows being sent to the events table.

There is probably a more direct method to accomplish your goals. I'd suggest you really consider filtering the duplicate events in the event provider before they ever get to the events table.

However, if that's the route you want to take, the matching rule is
really just a T-SQL statement. Version 2.0 uses a UDF to create the
resultset while v2005 uses a new view to do the same. So you can try using a combination of the chronicle table with the distinct keyword to filter out the dups.

BTW - matching rules are processed in the following order:
- Event chronicle rules
- Subscription event rules
- Subscription scheduled rules

HTH...


--
Joe Webb
SQL Server MVP
http://www.sqlns.com


~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)

Duplicate Events

The nature of the event provider for my SQLNS application is to produce
exact duplicate rows into the event table. Obviously, I am not
interested in receiving duplicate notifications. What are some
strategies for having SQLNS produce one notification for several exact
rows being sent to the events table.

I have an event chronicle that retrieves distinct rows from the event
table and puts them into the chronicle. My thoughts were that I could
use the chronicle table in my matching statement. But the timing
doesn't seem to be working out. The matching is apparently done before
the chronicle is updated.

Any thoughts on strategies for having SQLNS produce one notification
for several exact rows being sent to the events table.

There is probably a more direct method to accomplish your goals. I'd suggest you really consider filtering the duplicate events in the event provider before they ever get to the events table.

However, if that's the route you want to take, the matching rule is
really just a T-SQL statement. Version 2.0 uses a UDF to create the
resultset while v2005 uses a new view to do the same. So you can try using a combination of the chronicle table with the distinct keyword to filter out the dups.

BTW - matching rules are processed in the following order:
- Event chronicle rules
- Subscription event rules
- Subscription scheduled rules

HTH...


--
Joe Webb
SQL Server MVP
http://www.sqlns.com


~~~
Get up to speed quickly with SQLNS
http://www.amazon.com/exec/obidos/tg/detail/-/0972688811

I support PASS, the Professional Association for SQL Server.
(www.sqlpass.org)

duplicate database

Is there a way to copy/duplicate and rename a database on the same server? I
need to make a copy for another application. I appreciate any tips or advice
you can provide!

TIA - RobYou can do this by either detaching, renaming & attaching the database files
with a different name or you can backup the database & restore it as a
different name. For smaller databases, you can even do the Copy database
wizard which can create a copy of the database with a different name.

Please refer to SQL Server Books Online for details on any of these
approaches and check the following MSKB links :
http://support.microsoft.com/default.aspx?kbid=314546
http://support.microsoft.com/defaul...scid=kb;q224071

--
- Anith
( Please reply to newsgroups only )|||Thanks for the reply! I can copy with a number of methods but I always loose
the database rules when I copy or import data (i.e. primary keys, identity,
default values, etc.). Any ideas or tips to keep the database and rules
intact?

TIA - Rob

"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:iy9Yb.7035$hm4.4664@.newsread3.news.atl.earthl ink.net...
> You can do this by either detaching, renaming & attaching the database
files
> with a different name or you can backup the database & restore it as a
> different name. For smaller databases, you can even do the Copy database
> wizard which can create a copy of the database with a different name.
> Please refer to SQL Server Books Online for details on any of these
> approaches and check the following MSKB links :
> http://support.microsoft.com/default.aspx?kbid=314546
> http://support.microsoft.com/defaul...scid=kb;q224071
> --
> - Anith
> ( Please reply to newsgroups only )|||"Rob Wahmann" <rob@.dotcomstudio.biz> wrote in message news:<H0gYb.8966$PY.8805@.newssvr26.news.prodigy.com>...
> Thanks for the reply! I can copy with a number of methods but I always loose
> the database rules when I copy or import data (i.e. primary keys, identity,
> default values, etc.). Any ideas or tips to keep the database and rules
> intact?
> TIA - Rob
> "Anith Sen" <anith@.bizdatasolutions.com> wrote in message
> news:iy9Yb.7035$hm4.4664@.newsread3.news.atl.earthl ink.net...
> > You can do this by either detaching, renaming & attaching the database
> files
> > with a different name or you can backup the database & restore it as a
> > different name. For smaller databases, you can even do the Copy database
> > wizard which can create a copy of the database with a different name.
> > Please refer to SQL Server Books Online for details on any of these
> > approaches and check the following MSKB links :
> > http://support.microsoft.com/default.aspx?kbid=314546
> > http://support.microsoft.com/defaul...scid=kb;q224071
> > --
> > - Anith
> > ( Please reply to newsgroups only )

You shouldn't lose anything if you use backup/restore or
detach/attach, as they don't make any changes within the database.
Backup/restore has the advantage that the source database is always
online during the process.

Simon

Monday, March 19, 2012

Dumb question - MSSql - what is the front end?

Hello there.
If I am developing an application that I want to use MSSQL 2000 Server as
the back end (Which I get as part of SBS 2003) what is the actual front end
to a MS SQL database?
I know Access is an option, but I am of the understanding that some people
say this is geared towards smaller applications.
I also know one can go away and develop a specific VB application that uses
a MSSQL server.
But if someone is going away to develop a database in MSSQL, what is the
assumed front end to make the actual forms for someone to use that database?
Would ASP.net be a modern front end?
Forgive me if this question is stupid.
Thanks
DaveWell, strictly speaking, in many current projects your browser (eg,
Internet Explorer) is your "front end", and asp.net is your
middleware.
But you're free to use Access, or to use VB.net or C# to create rich
or smart clients that go directly to SQLServer, plus or minus your own
middleware web services written as VB/C# components, then your rich
clients are smart clients. Or write Python command line or GUI apps,
or J2EE Jakarta/Struts or Atlast/Ajax, or Excel VBA, SQLServer is
happy in any case.
Josh
On Thu, 08 Jun 2006 00:39:50 GMT, "David Smithz"
<dave1900@.blueyonder.co.uk> wrote:
>Hello there.
>If I am developing an application that I want to use MSSQL 2000 Server as
>the back end (Which I get as part of SBS 2003) what is the actual front end
>to a MS SQL database?
>I know Access is an option, but I am of the understanding that some people
>say this is geared towards smaller applications.
>I also know one can go away and develop a specific VB application that uses
>a MSSQL server.
>But if someone is going away to develop a database in MSSQL, what is the
>assumed front end to make the actual forms for someone to use that database?
>Would ASP.net be a modern front end?
>Forgive me if this question is stupid.
>Thanks
>Dave
>|||Sqlserver is just a data store. Sure, you can develop a front-end (client
app) with vb/vb.net/c#/etc. to connect to sqlserver for data. If you're
going to develop something, you might as well use the current technology.
Asp.net is just a name for a web application written in .net. There's really
no difference in data access between a web app-to-sql and a typical client
app-to-sql.
Here is a link to some info that should get you started.
http://msdn.microsoft.com/asp.net/learning/learn/newtodevelopment/
-oj
"David Smithz" <dave1900@.blueyonder.co.uk> wrote in message
news:qlKhg.82685$wl.15748@.text.news.blueyonder.co.uk...
> Hello there.
> If I am developing an application that I want to use MSSQL 2000 Server as
> the back end (Which I get as part of SBS 2003) what is the actual front
> end to a MS SQL database?
> I know Access is an option, but I am of the understanding that some people
> say this is geared towards smaller applications.
> I also know one can go away and develop a specific VB application that
> uses a MSSQL server.
> But if someone is going away to develop a database in MSSQL, what is the
> assumed front end to make the actual forms for someone to use that
> database?
> Would ASP.net be a modern front end?
> Forgive me if this question is stupid.
> Thanks
> Dave
>|||"oj" <nospam_ojngo@.home.com> wrote in message
news:uw2Z6bpiGHA.4912@.TK2MSFTNGP03.phx.gbl...
> Sqlserver is just a data store. Sure, you can develop a front-end (client
> app) with vb/vb.net/c#/etc. to connect to sqlserver for data. If you're
> going to develop something, you might as well use the current technology.
> Asp.net is just a name for a web application written in .net. There's
> really no difference in data access between a web app-to-sql and a typical
> client app-to-sql.
> Here is a link to some info that should get you started.
> http://msdn.microsoft.com/asp.net/learning/learn/newtodevelopment/
OK thanks for that.
As an example, if someone came to you and said,
"I need to develop a database for my business. It will have about 10 users
(but 5 most of the time) and it must work quickly. I heard Java is good but
you know better then me".
Other details I know are although web access would be useful at times,
generally the database needs to run on the internal network primarily (or
anyway connected to the network via VPN)
Considering they have an installation of SBS 2003 (which I believe comes
with MS SQL 2000) what (as an example) would your answer to be to the
question.
Thanks for any input which will just help me to see if I am thinking along
the right lines compared to others with experience in this field (i.e. you
guys ;) )
Dave|||David Smithz wrote:
> "oj" <nospam_ojngo@.home.com> wrote in message
> news:uw2Z6bpiGHA.4912@.TK2MSFTNGP03.phx.gbl...
>> Sqlserver is just a data store. Sure, you can develop a front-end (client
>> app) with vb/vb.net/c#/etc. to connect to sqlserver for data. If you're
>> going to develop something, you might as well use the current technology.
>> Asp.net is just a name for a web application written in .net. There's
>> really no difference in data access between a web app-to-sql and a typical
>> client app-to-sql.
>> Here is a link to some info that should get you started.
>> http://msdn.microsoft.com/asp.net/learning/learn/newtodevelopment/
> OK thanks for that.
> As an example, if someone came to you and said,
> "I need to develop a database for my business. It will have about 10 users
> (but 5 most of the time) and it must work quickly. I heard Java is good but
> you know better then me".
> Other details I know are although web access would be useful at times,
> generally the database needs to run on the internal network primarily (or
> anyway connected to the network via VPN)
> Considering they have an installation of SBS 2003 (which I believe comes
> with MS SQL 2000) what (as an example) would your answer to be to the
> question.
> Thanks for any input which will just help me to see if I am thinking along
> the right lines compared to others with experience in this field (i.e. you
> guys ;) )
> Dave
>
Hi Dave
I'm not a programmer, but I think your question is better asked in a
programmer/developer forum. As already mentioned, SQL server just holds
the data and doesn't really care much about which program gets the data.
SQL server will just handle the request that comes from your application
and then do what's being requested. If these requests comes from a
program written in .net, C## or whatever doesn't really matter.
--
Regards
Steen Schlüter Persson
DBA

Dumb question - MSSql - what is the front end?

Hello there.
If I am developing an application that I want to use MSSQL 2000 Server as
the back end (Which I get as part of SBS 2003) what is the actual front end
to a MS SQL database?
I know Access is an option, but I am of the understanding that some people
say this is geared towards smaller applications.
I also know one can go away and develop a specific VB application that uses
a MSSQL server.
But if someone is going away to develop a database in MSSQL, what is the
assumed front end to make the actual forms for someone to use that database?
Would ASP.net be a modern front end?
Forgive me if this question is stupid.
Thanks
DaveWell, strictly speaking, in many current projects your browser (eg,
Internet Explorer) is your "front end", and asp.net is your
middleware.
But you're free to use Access, or to use VB.net or C# to create rich
or smart clients that go directly to SQLServer, plus or minus your own
middleware web services written as VB/C# components, then your rich
clients are smart clients. Or write Python command line or GUI apps,
or J2EE Jakarta/Struts or Atlast/Ajax, or Excel VBA, SQLServer is
happy in any case.
Josh
On Thu, 08 Jun 2006 00:39:50 GMT, "David Smithz"
<dave1900@.blueyonder.co.uk> wrote:

>Hello there.
>If I am developing an application that I want to use MSSQL 2000 Server as
>the back end (Which I get as part of SBS 2003) what is the actual front end
>to a MS SQL database?
>I know Access is an option, but I am of the understanding that some people
>say this is geared towards smaller applications.
>I also know one can go away and develop a specific VB application that uses
>a MSSQL server.
>But if someone is going away to develop a database in MSSQL, what is the
>assumed front end to make the actual forms for someone to use that database
?
>Would ASP.net be a modern front end?
>Forgive me if this question is stupid.
>Thanks
>Dave
>|||Sqlserver is just a data store. Sure, you can develop a front-end (client
app) with vb/vb.net/c#/etc. to connect to sqlserver for data. If you're
going to develop something, you might as well use the current technology.
Asp.net is just a name for a web application written in .net. There's really
no difference in data access between a web app-to-sql and a typical client
app-to-sql.
Here is a link to some info that should get you started.
http://msdn.microsoft.com/asp.net/l...wtodevelopment/
-oj
"David Smithz" <dave1900@.blueyonder.co.uk> wrote in message
news:qlKhg.82685$wl.15748@.text.news.blueyonder.co.uk...
> Hello there.
> If I am developing an application that I want to use MSSQL 2000 Server as
> the back end (Which I get as part of SBS 2003) what is the actual front
> end to a MS SQL database?
> I know Access is an option, but I am of the understanding that some people
> say this is geared towards smaller applications.
> I also know one can go away and develop a specific VB application that
> uses a MSSQL server.
> But if someone is going away to develop a database in MSSQL, what is the
> assumed front end to make the actual forms for someone to use that
> database?
> Would ASP.net be a modern front end?
> Forgive me if this question is stupid.
> Thanks
> Dave
>|||"oj" <nospam_ojngo@.home.com> wrote in message
news:uw2Z6bpiGHA.4912@.TK2MSFTNGP03.phx.gbl...
> Sqlserver is just a data store. Sure, you can develop a front-end (client
> app) with vb/vb.net/c#/etc. to connect to sqlserver for data. If you're
> going to develop something, you might as well use the current technology.
> Asp.net is just a name for a web application written in .net. There's
> really no difference in data access between a web app-to-sql and a typical
> client app-to-sql.
> Here is a link to some info that should get you started.
> http://msdn.microsoft.com/asp.net/l...wtodevelopment/
OK thanks for that.
As an example, if someone came to you and said,
"I need to develop a database for my business. It will have about 10 users
(but 5 most of the time) and it must work quickly. I heard Java is good but
you know better then me".
Other details I know are although web access would be useful at times,
generally the database needs to run on the internal network primarily (or
anyway connected to the network via VPN)
Considering they have an installation of SBS 2003 (which I believe comes
with MS SQL 2000) what (as an example) would your answer to be to the
question.
Thanks for any input which will just help me to see if I am thinking along
the right lines compared to others with experience in this field (i.e. you
guys ;) )
Dave|||David Smithz wrote:
> "oj" <nospam_ojngo@.home.com> wrote in message
> news:uw2Z6bpiGHA.4912@.TK2MSFTNGP03.phx.gbl...
> OK thanks for that.
> As an example, if someone came to you and said,
> "I need to develop a database for my business. It will have about 10 users
> (but 5 most of the time) and it must work quickly. I heard Java is good bu
t
> you know better then me".
> Other details I know are although web access would be useful at times,
> generally the database needs to run on the internal network primarily (or
> anyway connected to the network via VPN)
> Considering they have an installation of SBS 2003 (which I believe comes
> with MS SQL 2000) what (as an example) would your answer to be to the
> question.
> Thanks for any input which will just help me to see if I am thinking along
> the right lines compared to others with experience in this field (i.e. you
> guys ;) )
> Dave
>
Hi Dave
I'm not a programmer, but I think your question is better asked in a
programmer/developer forum. As already mentioned, SQL server just holds
the data and doesn't really care much about which program gets the data.
SQL server will just handle the request that comes from your application
and then do what's being requested. If these requests comes from a
program written in .net, C## or whatever doesn't really matter.
Regards
Steen Schlter Persson
DBA

Sunday, March 11, 2012

DUH!

Some users would ONLY have access through an application role, while
elevated access is controlled through normal logins and roles.
"Bob Castleman" <nomail@.here> wrote in message
news:uiRahnt3EHA.3092@.TK2MSFTNGP10.phx.gbl...
> Some users would ONLY have access through an application role, while
> elevated access is controlled through normal logins and roles.
>
Exactly. ;-)
Rick Sawtell

Friday, March 9, 2012

Dual Processors

Hi,
I've been recommended a server spec by an application vendor. I plan to buy
and start using this app, and it runs on SQL Server.
The server spec is for a single processor model. There will be a core of
about 25 users on the system with a maximum of 40. How can I decide if I
should buy a dual-processor server? Are there any rules to apply?
Thanks in advance
Steve"Steve W" <antispamsteveW@.=No-Spam=.org> wrote in message
news:uOZCyIhXEHA.376@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I've been recommended a server spec by an application vendor. I plan to
buy
> and start using this app, and it runs on SQL Server.
> The server spec is for a single processor model. There will be a core of
> about 25 users on the system with a maximum of 40. How can I decide if I
> should buy a dual-processor server? Are there any rules to apply?
>
No. Too much depends on how the application is coded and what it does. You
should rely on your vendor to recommend the hardware.
-new servers are incredibilly fast
-single processor servers are incredibilly cheap
-most applications require more IO than CPU
-If you plan on using this server for other applications too you might
want increased capacity.
For small general purpose Intel 32bit SQL Servers I would buy like this:
CPU SCSI disks disk config RAID logical disk config
----
1 2 RAID 1 mirror 10g C: for OS, rest D: for SQL
tables, indexes and logs
1 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
2 RAID 1 (mirror) (e: sql logs and backups)
2 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
2 RAID 1 (mirror) (e: sql logs and backups)
2 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
4 RAID 10 (mirror/stripe) (e: sql logs and backups)
And buy have as at least as much ram as you have data in your databases, up
to 2g.
David

Dual Processors

Hi,
I've been recommended a server spec by an application vendor. I plan to buy
and start using this app, and it runs on SQL Server.
The server spec is for a single processor model. There will be a core of
about 25 users on the system with a maximum of 40. How can I decide if I
should buy a dual-processor server? Are there any rules to apply?
Thanks in advance
Steve
"Steve W" <antispamsteveW@.=No-Spam=.org> wrote in message
news:uOZCyIhXEHA.376@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I've been recommended a server spec by an application vendor. I plan to
buy
> and start using this app, and it runs on SQL Server.
> The server spec is for a single processor model. There will be a core of
> about 25 users on the system with a maximum of 40. How can I decide if I
> should buy a dual-processor server? Are there any rules to apply?
>
No. Too much depends on how the application is coded and what it does. You
should rely on your vendor to recommend the hardware.
-new servers are incredibilly fast
-single processor servers are incredibilly cheap
-most applications require more IO than CPU
-If you plan on using this server for other applications too you might
want increased capacity.
For small general purpose Intel 32bit SQL Servers I would buy like this:
CPU SCSI disks disk config RAID logical disk config
1 2 RAID 1 mirror 10g C: for OS, rest D: for SQL
tables, indexes and logs
1 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
2 RAID 1 (mirror) (e: sql logs and backups)
2 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
2 RAID 1 (mirror) (e: sql logs and backups)
2 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
4 RAID 10 (mirror/stripe) (e: sql logs and backups)
And buy have as at least as much ram as you have data in your databases, up
to 2g.
David

Dual Processors

Hi,
I've been recommended a server spec by an application vendor. I plan to buy
and start using this app, and it runs on SQL Server.
The server spec is for a single processor model. There will be a core of
about 25 users on the system with a maximum of 40. How can I decide if I
should buy a dual-processor server? Are there any rules to apply?
Thanks in advance
Steve
"Steve W" <antispamsteveW@.=No-Spam=.org> wrote in message
news:uOZCyIhXEHA.376@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I've been recommended a server spec by an application vendor. I plan to
buy
> and start using this app, and it runs on SQL Server.
> The server spec is for a single processor model. There will be a core of
> about 25 users on the system with a maximum of 40. How can I decide if I
> should buy a dual-processor server? Are there any rules to apply?
>
No. Too much depends on how the application is coded and what it does. You
should rely on your vendor to recommend the hardware.
-new servers are incredibilly fast
-single processor servers are incredibilly cheap
-most applications require more IO than CPU
-If you plan on using this server for other applications too you might
want increased capacity.
For small general purpose Intel 32bit SQL Servers I would buy like this:
CPU SCSI disks disk config RAID logical disk config
1 2 RAID 1 mirror 10g C: for OS, rest D: for SQL
tables, indexes and logs
1 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
2 RAID 1 (mirror) (e: sql logs and backups)
2 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
2 RAID 1 (mirror) (e: sql logs and backups)
2 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
4 RAID 10 (mirror/stripe) (e: sql logs and backups)
And buy have as at least as much ram as you have data in your databases, up
to 2g.
David

Dual Processors

Hi,
I've been recommended a server spec by an application vendor. I plan to buy
and start using this app, and it runs on SQL Server.
The server spec is for a single processor model. There will be a core of
about 25 users on the system with a maximum of 40. How can I decide if I
should buy a dual-processor server? Are there any rules to apply?
Thanks in advance
Steve"Steve W" <antispamsteveW@.=No-Spam=.org> wrote in message
news:uOZCyIhXEHA.376@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I've been recommended a server spec by an application vendor. I plan to
buy
> and start using this app, and it runs on SQL Server.
> The server spec is for a single processor model. There will be a core of
> about 25 users on the system with a maximum of 40. How can I decide if I
> should buy a dual-processor server? Are there any rules to apply?
>
No. Too much depends on how the application is coded and what it does. You
should rely on your vendor to recommend the hardware.
-new servers are incredibilly fast
-single processor servers are incredibilly cheap
-most applications require more IO than CPU
-If you plan on using this server for other applications too you might
want increased capacity.
For small general purpose Intel 32bit SQL Servers I would buy like this:
CPU SCSI disks disk config RAID logical disk config
----
1 2 RAID 1 mirror 10g C: for OS, rest D: for SQL
tables, indexes and logs
1 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
2 RAID 1 (mirror) (e: sql logs and backups)
2 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
2 RAID 1 (mirror) (e: sql logs and backups)
2 2 RAID 1 (mirror) (10g C: for OS, rest D: for SQL
tables and indexes)
4 RAID 10 (mirror/stripe) (e: sql logs and backups)
And buy have as at least as much ram as you have data in your databases, up
to 2g.
David

Wednesday, March 7, 2012

Dual Authentication with web and rs farm using remote sql server

I am having a problem with users being prompted to authenticate twice within
an application. I know this is related to the current design but for
scalability and isolation I want to keep the infrastructure design as is.
Currently I have two IIS 6 2k3 servers in an NLB. I have a web application
installed on this which is a front end for running reports. I then have two
IIS 6 2k3 servers running sql 2000 RS in an NLB farm. Finally there is a
Clustered SQL 2000 server where the application database and RS databases
exist. The application requires Basic w/SSL at the website level. This is
the first authentication. When the users go to run a report the first report
goes to the RS Farm and the users are authenticated once again. Once they
have authenticated by the web farm and the RS farm they no longer have to
authenticate but I'm trying to get it to a SSO.
From my experience, if I try using Integrated authentication then the UN and
Pass doesn't get passed onto the sql server and they cannot authenticate to
access the app database. If I try using integrated ont he RS farm I have an
issue where the UN and pass doesn't get passed to sql there. Based on what I
am seeing the fact that it requires 2 logons, 1 per farm, actually makes
sense but I would think this would be the most scalable and isolated design
you could have so it seems to me that there should just be a way for the SSO.
I would like to be able to do this at an admin or infrastructure design
level as the application is from a third party vendor and I don't want to try
and get them to recode anything. Any help would be appreciated.The problem was with Windows 2003 SP1 and IIS6.
Had to disable loopback check and then change RS to using Integrated
authentication. After that I was able to get in locally to /reports
http://support.microsoft.com/default.aspx?scid=kb;en-us;896861
"Chris Fauver" wrote:
> I am having a problem with users being prompted to authenticate twice within
> an application. I know this is related to the current design but for
> scalability and isolation I want to keep the infrastructure design as is.
> Currently I have two IIS 6 2k3 servers in an NLB. I have a web application
> installed on this which is a front end for running reports. I then have two
> IIS 6 2k3 servers running sql 2000 RS in an NLB farm. Finally there is a
> Clustered SQL 2000 server where the application database and RS databases
> exist. The application requires Basic w/SSL at the website level. This is
> the first authentication. When the users go to run a report the first report
> goes to the RS Farm and the users are authenticated once again. Once they
> have authenticated by the web farm and the RS farm they no longer have to
> authenticate but I'm trying to get it to a SSO.
> From my experience, if I try using Integrated authentication then the UN and
> Pass doesn't get passed onto the sql server and they cannot authenticate to
> access the app database. If I try using integrated ont he RS farm I have an
> issue where the UN and pass doesn't get passed to sql there. Based on what I
> am seeing the fact that it requires 2 logons, 1 per farm, actually makes
> sense but I would think this would be the most scalable and isolated design
> you could have so it seems to me that there should just be a way for the SSO.
>
> I would like to be able to do this at an admin or infrastructure design
> level as the application is from a third party vendor and I don't want to try
> and get them to recode anything. Any help would be appreciated.

DTSRUN.exe Fails to Initialize

I have been seeing these intermittently in our event logs...
Event Type: Information
Event Source: Application Popup
Event Category: None
Event ID: 26
Date: 1/30/2006
Time: 6:00:30 PM
User: N/A
Computer: PNTD3BSQLCJ1
Description:
Application popup: dtsrun.exe - Application Error : The application failed to
initialize properly (0xc0000142). Click on OK to terminate the application.
... Anyone have an incite to the problem?
Thanks in advance.
I had a similar issue in trying to execute osql commands from an
Asp.net application. As I recall... this was associated with
insufficient memory associated with the Asp.net memory pool.
I'd start with that. If you determine that this is not a memory
issue...
I'd go through the following progression to trouble shoot...
1.)Run the DTS package from EM
2.)Check passwords etc have not changed on the database
3.)run the dts command from the command line...you may get a more
descriptive error here.
HTH
MJKulangara
http://sqladventures.blogspot.com
|||I found the following KB article regarding the problem...
http://support.microsoft.com/kb/824422

DTSRUN.exe Fails to Initialize

I have been seeing these intermittently in our event logs...
Event Type: Information
Event Source: Application Popup
Event Category: None
Event ID: 26
Date: 1/30/2006
Time: 6:00:30 PM
User: N/A
Computer: PNTD3BSQLCJ1
Description:
Application popup: dtsrun.exe - Application Error : The application failed to
initialize properly (0xc0000142). Click on OK to terminate the application.
... Anyone have an incite to the problem?
Thanks in advance.I had a similar issue in trying to execute osql commands from an
Asp.net application. As I recall... this was associated with
insufficient memory associated with the Asp.net memory pool.
I'd start with that. If you determine that this is not a memory
issue...
I'd go through the following progression to trouble shoot...
1.)Run the DTS package from EM
2.)Check passwords etc have not changed on the database
3.)run the dts command from the command line...you may get a more
descriptive error here.
HTH
MJKulangara
http://sqladventures.blogspot.com|||I found the following KB article regarding the problem...
http://support.microsoft.com/kb/824422

DTSRUN.exe Fails to Initialize

I have been seeing these intermittently in our event logs...
Event Type: Information
Event Source: Application Popup
Event Category: None
Event ID: 26
Date: 1/30/2006
Time: 6:00:30 PM
User: N/A
Computer: PNTD3BSQLCJ1
Description:
Application popup: dtsrun.exe - Application Error : The application failed t
o
initialize properly (0xc0000142). Click on OK to terminate the application.
... Anyone have an incite to the problem?
Thanks in advance.I had a similar issue in trying to execute osql commands from an
Asp.net application. As I recall... this was associated with
insufficient memory associated with the Asp.net memory pool.
I'd start with that. If you determine that this is not a memory
issue...
I'd go through the following progression to trouble shoot...
1.)Run the DTS package from EM
2.)Check passwords etc have not changed on the database
3.)run the dts command from the command line...you may get a more
descriptive error here.
HTH
MJKulangara
http://sqladventures.blogspot.com|||I found the following KB article regarding the problem...
http://support.microsoft.com/kb/824422

DTSrun.exe - application error

Please help!!
The above keep appearing when we schedule a dts to run.
We can run the dts manually as a local package and it
works, but when run through as a job, either as a schdule
or manually it fails.
Can anybody enlighten me as to why this is happening?
Di Nicholls,
Could you post the full error? You might get a better response in the
..dts newsgroup.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Di Nicholls wrote:
> Please help!!
> The above keep appearing when we schedule a dts to run.
> We can run the dts manually as a local package and it
> works, but when run through as a job, either as a schdule
> or manually it fails.
> Can anybody enlighten me as to why this is happening?

DTSrun.exe - application error

Please help!!
The above keep appearing when we schedule a dts to run.
We can run the dts manually as a local package and it
works, but when run through as a job, either as a schdule
or manually it fails.
Can anybody enlighten me as to why this is happening?Di Nicholls,
Could you post the full error? You might get a better response in the
.dts newsgroup.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Di Nicholls wrote:
> Please help!!
> The above keep appearing when we schedule a dts to run.
> We can run the dts manually as a local package and it
> works, but when run through as a job, either as a schdule
> or manually it fails.
> Can anybody enlighten me as to why this is happening?