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

Thursday, March 29, 2012

best tutorial for sql reporting service 2005

i am asked to develop a web application where i have to display reports in a seperate window from a hyperlink .i have to display the report in grid format and show a pie chart within the report layout .

i need to give user credential like print,save the report in excel or doc format and email report.

can anybody give the links for the best tutorial to achieve my purpose.

thanks

sally

Hi there,

There are many resources available. Try books online.

Here is a great guide to building a report.

http://www.eggheadcafe.com/articles/20040823.asp

Here is a guide to building a report + a web interface.

http://www.15seconds.com/Issue/041013.htm

Try MS downloads for further samples.

cheers,

Andrew

|||

Reporting Services Tutorials >>> http://msdn2.microsoft.com/en-us/library/ms170246.aspx

Sunday, March 25, 2012

Best Query/Search Method

Hi,

I'm wondering about the following:

I have come across an InfoPath Forms application who's code is scripted in javascript and who's data seems to be in XML files.
An analyst at that company told me they suspect the data is ALSO in SQL Server... somewhere. They can't seem to find it though. I have
reviewed the .js code and some methods are called for which I can find no source. I believe those methods execute OK because they're found
inside some DLL.

I'm thinking I would enter a new record using the form in InfoPath using some datavalue that I can expect will be unique.. like a lastname who's first three chars is ZZZ or something like that. Subsequently, I'd search each column in each table in each DB on the server to see if I can locate it somewhere.

So, my question is what is the best approach for this? I have access to the db, table and column names. I know I can write a small vb.net piece of code to execute my search. But, is there some better way using some sql procedure (or using the full text catalog) instead or any other tool(s)?

Thanks in advance for your advise.

Stewart

Go into sql server management studio and open up a new query window, then set the query window to the the database in question.

Execute this query:

select 'union select ''[' + colu.table_schema + '].[' + colu.table_name + '].[' + colu.column_name + ']'' as "Schema.Table.Column" '
+ ',[' + colu.column_name + '] as "Value" '
+ ' from [' + colu.table_schema + '].[' + colu.table_name + '] '
+ ' where [' + colu.column_name + '] like ''ZZZ%'' '
from INFORMATION_SCHEMA.columns as colu
where colu.data_type in ('varchar','nvarchar','char','nchar','text','ntext')

Below the query will be the results, one sql statement per text-based column.

You can click, then right-click on the top-left button-looking box in the grid header and copy the text into the buffer.

Paste it into a new query window.

Delete the first "union" on the first line and execute the query.

It will return one row per column value per table that matches ZZZ%.

Depending upon the number of tables/columns in the database, and the number of rows in the table, you might need to split the results into multiple, smaller queries.


Enjoy!


|||

Hi David,

Thanks very much for the assistance. It worked perfectly!

Regards,
Stewart

|||

The views in the master database are very powerful. Try the information_schema views first, and switch to the sys... views if the information_schema views don't have what you need.

Glad it helped!

sql

Thursday, March 22, 2012

Best practices to design datawarehouse for a Fraud Detection/Transaction Monitoring Application

Hi All,

This thread relates to following thread of Architecure forum.

http://forums.microsoft.com/msdn/showpost.aspx?postid=1908857&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=2

Because after reaching at decision that application would require datawarehousing the members suggested that it would be nice if it is posted on datawarehouse forum.

I would appreciate if could go through the mentioned thread that would state application's business requirement.

Now i am continuing the from the thread where we were discussing about SCD.

In our Application customer address is defined in 6 fields (Street,city,State,Country,Pincode,ContactNo) so if we are to maintain 3 type of addresses like Office,Communication,Residence then we have to add 18 fields in our Customer Master dimension table in our dataware house.

Suppose after some time customer office address is changed so what should be done in Customer Master Table at time of synchronization, Should ETL process insert a new record into dimension table with updated address in office address fields or it should update the existing record fields without adding new one.

If for Changing dimensions we are adding a new record then we have to maintain a flag field where status of record would be kept like 'current record' or 'old record' , this would help us to identify the main record.Every time whenever a new customer record is added old record status is changed to 'Old record'.

Should we add new record for changing fields like address,designation,employer,annual income etc or update the existing record only.Because in our analysis these all fields would play major because after each profile updation a risk category is assigned to customer.So we can not afford to overwrite any field information because at any time old information can be asked by management/regulator.

If every time for each field updation a new record is updated then customer master datawarehouse table would become 5 times if each customer record is updated five times during the year.

Suggest us the efficient approach to handle changing dimensions.

Thanks & Regards,

Sameer Gautam

Hi,

You don't have to create a record each time a change happens, just depends if you want to capture the history for that field or not. For example you may want to capture history for change of address, so you would add a new record, but you may not want it for surname, so just update all records for that customer with the new surname.

SCD are a pain to say the least when data warehousing, the principle is nice but coding it is sometimes complicated especially if you try and use snowflakes. And space soon becomes an issue, if you data changes regually. And you are right that if you make a change to a customer 5 times in a year then you will get 5 new records. Although you may code it so it only captures the end of year snapshot, rather than every change.

I would have a look through some of kimballs articles:

http://kimballgroup.com/html/articlesArchitecture/articlesAdvancedDim.html

Good luck

Matt

sql

Best practices for SQL data access

Hi,

i am newbie in ASP.net world. i am using 3 tier application architechture for my web based application. data base is sql server 2000. i have looked at object and sql datasource objects but i think they are not suitable for my requirements. so i am planning to directly use ado.net to access data from database.( i.e. creating connection, then creating commands n executing them)

now what i am looking for is the best known practices for the above task. i have following solutions in my mind please let me know if i am missing some or which could be the best aproach.

careate one class which will handle all the database requests so that all the pages and business objects request that class to to do all the db related stuff. (creating connection, command n execution)

have a class which will return connection to your page or business object and then u can use that connection to do db related stuff.

some thing in between that you create a sqlcommand and pass it to a class which will take care of connections and execute you request.

what i am worried about more is the connections to database and the connection pooling n sharing stuff. i dont have any idea how they works.

please help me in this regard

thanks

Have you looked at the Data Access Application Block?

http://msdn2.microsoft.com/en-us/library/aa480458.aspx

|||

thanks i had a look through it, n it sound goods.

any other thoughs or ideas???

|||

aakbar:

thanks i had a look through it, n it sound goods.

any other thoughs or ideas???

Yes, follow those suggestions there...Smile

|||

Outside of that, if was using ADO, I'd create a Business Logic class for each of the tables in my database using this class to generate all of the business logic which in turn would then call the ADO function within the DAL which would be your Data Application Blocks.

Tuesday, March 20, 2012

Best Practices for Design of Views

Hi, I have been using Views for a while now instead of constructing SQL
statements in the application but one the problems is that as the
applications grow the views need more and more columns, alisaes, and
both Lookup values and Foreign key ID for a range of uses.
At least when constructing SQL SELECT in the application each form or
function has a specific need for columns so you dont aim for any
re-usability.
How it is best to manage this when designing views? Showuld there be
one view only per logical entity that has a lot of columns making it
applicable for a whole range of uses, or individual views, one per use
with its own specific columns. If the latter is used I have a problem
naming and remembering names of all the different views.
An example may help illustrate this:
vwInvoices - This currently contains only the columns needed to diplay
a list of Invoices after doing a search, + any columns used in the
search. But when drilling into a single Invoice from the list it will
need many more columns. While the search tool only needs the foreign
key ID of the user who created it (The search tool users a dropdownn
list of users with IDs behind names) , the full detail screen needs to
show the actual user name from the users table.
Shold this view even be used for for selecting one record? Should a
stored procedure be used instead?
Are there any design principles or best practices anyone ccan share for
these issues.
Thanks.hals_left wrote:
> Hi, I have been using Views for a while now instead of constructing SQL
> statements in the application but one the problems is that as the
> applications grow the views need more and more columns, alisaes, and
> both Lookup values and Foreign key ID for a range of uses.
> At least when constructing SQL SELECT in the application each form or
> function has a specific need for columns so you dont aim for any
> re-usability.
> How it is best to manage this when designing views? Showuld there be
> one view only per logical entity that has a lot of columns making it
> applicable for a whole range of uses, or individual views, one per use
> with its own specific columns. If the latter is used I have a problem
> naming and remembering names of all the different views.
> An example may help illustrate this:
> vwInvoices - This currently contains only the columns needed to diplay
> a list of Invoices after doing a search, + any columns used in the
> search. But when drilling into a single Invoice from the list it will
> need many more columns. While the search tool only needs the foreign
> key ID of the user who created it (The search tool users a dropdownn
> list of users with IDs behind names) , the full detail screen needs to
> show the actual user name from the users table.
> Shold this view even be used for for selecting one record? Should a
> stored procedure be used instead?
> Are there any design principles or best practices anyone ccan share for
> these issues.
> Thanks.
Best practice in most environments is that the application should
access the database only through stored procedures, not views. Procs
are the best method to encapsulate logic, facilitate code reuse,
optimise performance and implement security. Views are useful if you
need to share the same query logic in several procs. For most business
process applications it isn't good practice to access views or tables
directly. See:
http://msdn.microsoft.com/library/d...y/en-us/opti...
http://www.sql-server-performance.c..._procedures.asp
http://www.sommarskog.se/dynamic_sql.html
http://weblogs.asp.net/rhoward/arch...1/17/38095.aspx
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Oops. One of the links got scrambled:
http://msdn.microsoft.com/library/d.../>
1a_6x45.asp
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Thanks David.
If I understand correctly, the best practice to display lines for a
single invoice would therefore be to have a stored procedure that
queries a view , rather than have the application construct a WHERE
clause and query the view directly ?
The procedure would be something like this ?
-- Retrieves the Invoice Lines for 1 invoice
CREATE PROCEDURE [dbo].[getSingleInvoiceLines]
@.InvoiceID Int
AS
SELECT [Description],Quantity,UnitCost, Department,Nominal
FROM dbo.vwInvoiceLines
WHERE Invoice=@.InvoiceID
GO
And used something like this in an application ?
set oRS = objConn.Execute ( "dbo.getSingleInvoiceLines " & intInvoice )
// Or with ADODB.Command / Explicit Parameters etc..
If Not oRS.EOF THen
while not oRS.EOF%>
...|||hals_left wrote:
> Thanks David.
> If I understand correctly, the best practice to display lines for a
> single invoice would therefore be to have a stored procedure that
> queries a view , rather than have the application construct a WHERE
> clause and query the view directly ?
> The procedure would be something like this ?
> -- Retrieves the Invoice Lines for 1 invoice
> CREATE PROCEDURE [dbo].[getSingleInvoiceLines]
> @.InvoiceID Int
> AS
> SELECT [Description],Quantity,UnitCost, Department,Nominal
> FROM dbo.vwInvoiceLines
> WHERE Invoice=@.InvoiceID
> GO
> And used something like this in an application ?
> set oRS = objConn.Execute ( "dbo.getSingleInvoiceLines " & intInvoice )
> // Or with ADODB.Command / Explicit Parameters etc..
> If Not oRS.EOF THen
> while not oRS.EOF%>
> ...
Use the ADO parameters collection rather than construct strings
dynamically. Usually you'll also want to put some error handling in
your procs - in fact that's one of the advantages of procs.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

Monday, March 19, 2012

Best Practice guidelines

Hi All,

We have an application requirement for a database supporting field service engineers, which calls for a central SQL Server databse, and laptops with the same database replicated onto SQL Express. I'm resposible for designing the database for this, physical and logical. I've designed and built many a database, but never had to use replication before.

I've read through BOL, and understand how the merge replication process works, and I have no problem designing the database assuming it were to run on a single server.

What I am trying to find are whitepapers, or equivalent, on "best design and implementation practice", and especialy common mistakes to avoid.

I know that the windows programmers responsible for the UI will not completely abstract the database from the code (no matter how desirable that is or how often I tell them!), and I really don't want to find I have to change the physical tables or replication logic after they've coded most of the UI .

Many thanks in advance

Richard R

I would say depending on the features you plan to use, Books Online s your best friend.

Let us know if that doesnt help you much and also let us know what specific feature areas you are looking at.

|||

Hi,

BOL is pretty good at describing the process, but doesn't list any caveats. It may of course be that there aren't any - but that would be unusual!

The main question I supppose is, can I just get on and design the system as if it were stand-alone, then build the replication parts afterwards?

I expect I will need some custom logic for reconcilliation, as there has to be a log for tracking part movements, and it is likely that users will synchronise their laptops in a different order to them physically moving the parts, thus generating gaps in the log that need to be filled, as well as there local copy of the data not reflecting the physical reality when they come to move parts.

Is there a best practice for doing this sort of thing without bothering the users?

Thanks for your help,

Richard

Best Practice for Windows Authentication?

Hi,
We are changing our classic ASP web application to use Windows
Authentication instead of SQL Server Authentication.
I would like to know the best practice for:
1. IIS and SQL Server are on the same machine and
2.When they are on different machines in the same domain.
I *think* the solution to 1. is to add the IUSR_MACHINENAME user to SQL
Server (this works but is it the best practice?)
For 2. I have read different opinions. Some say create a IUSR_IISMACHINENAME
account on the SQL Server and make sure they have the same password. Other
say create a user on the domain and use that in IIS as the anonymous user
(and give that user the relevant rights on SQL Server)
I would like to know what is considered the best practice for this sort of
authentication.
Thanks in advancewhat version of IIS you running ?, using ASP.NET ?
http://msdn2.microsoft.com/en-us/library/bsz5788z
"Hugh Mungo" <hugh_mungo@.hotmail.com> wrote in message
news:%23igmiopuFHA.3500@.TK2MSFTNGP09.phx.gbl...
> Hi,
> We are changing our classic ASP web application to use Windows
> Authentication instead of SQL Server Authentication.
> I would like to know the best practice for:
> 1. IIS and SQL Server are on the same machine and
> 2.When they are on different machines in the same domain.
> I *think* the solution to 1. is to add the IUSR_MACHINENAME user to SQL
> Server (this works but is it the best practice?)
> For 2. I have read different opinions. Some say create a
> IUSR_IISMACHINENAME
> account on the SQL Server and make sure they have the same password. Other
> say create a user on the domain and use that in IIS as the anonymous user
> (and give that user the relevant rights on SQL Server)
> I would like to know what is considered the best practice for this sort of
> authentication.
> Thanks in advance
>|||The solution should work with IIS5 and above.
We are not using ASP.NET this is a classic ASP application.
"David J. Cartwright" <davidcartwright@.hotmail.com> wrote in message
news:OcQFYgruFHA.2076@.TK2MSFTNGP14.phx.gbl...
> what version of IIS you running ?, using ASP.NET ?
> http://msdn2.microsoft.com/en-us/library/bsz5788z
> "Hugh Mungo" <hugh_mungo@.hotmail.com> wrote in message
> news:%23igmiopuFHA.3500@.TK2MSFTNGP09.phx.gbl...
Other[vbcol=seagreen]
user[vbcol=seagreen]
of[vbcol=seagreen]
>|||What a coincidence. Same here. I would definitely be interested to know
how to do this best practice also as this is the exact same thing that I'm
currently working on. One slightly different thing here is that we require
individual accounts (so we can track user activity with our sql profiler)
and would believe we would create a windows account on our domain controller
which resides on a different machine than our web (.asp files) and sql
server (also on separate machine) and was wondering if this would be
possible and how to go about doing this. Would it be as straight forward in
changing the connection string in our .asp files specifying windows
authentication? I am not too familiar in how to do this but was thinking of
maybe removing the anonymous account in IIS so that it would force the user
to login with the windows authentication pop up (in the possible situation
if users share a public machine and/or if the machine's operating system is
not windows with a valid corresponding domain windows account on our domain
controller?...which makes me wonder how this would be incorporated into our
connection string in our .asp files? Thanks in advance
"Hugh Mungo" <hugh_mungo@.hotmail.com> wrote in message
news:eJLVIyruFHA.2312@.TK2MSFTNGP14.phx.gbl...
> The solution should work with IIS5 and above.
> We are not using ASP.NET this is a classic ASP application.
> "David J. Cartwright" <davidcartwright@.hotmail.com> wrote in message
> news:OcQFYgruFHA.2076@.TK2MSFTNGP14.phx.gbl...
> Other
> user
> of
>|||_-=?/today_-=?/354
"Hugh Mungo" wrote:

> Hi,
> We are changing our classic ASP web application to use Windows
> Authentication instead of SQL Server Authentication.
> I would like to know the best practice for:
> 1. IIS and SQL Server are on the same machine and
> 2.When they are on different machines in the same domain.
> I *think* the solution to 1. is to add the IUSR_MACHINENAME user to SQL
> Server (this works but is it the best practice?)
> For 2. I have read different opinions. Some say create a IUSR_IISMACHINENA
ME
> account on the SQL Server and make sure they have the same password. Other
> say create a user on the domain and use that in IIS as the anonymous user
> (and give that user the relevant rights on SQL Server)
> I would like to know what is considered the best practice for this sort of
> authentication.
> Thanks in advance
>
>

Sunday, March 11, 2012

Best Practice for Report Projects Related To Application Solutions

Hello Reporting Services Gurus!

I'm about to start on my first reporting services project, but before I mess it up, I'm looking for some guidance on how best to achieve my mission. Here's what I'm looking to achieve:

I have a datacentric application (SQL Server 2005 Express w/ Advanced Services backend) in which I want to build about 50 "canned" reports for the end users. I want to build the reports utilizing server mode so I can take advantage of some of Reporting Services advanced features. I'm not sure what the best practice would be to build the reporting services project. Is it better to include the report project as another project within the application solution? Or, should I build the report project independent of the application solution? What are the pros and cons of doing it either way? How does including the report project build if it's included in the application solution? How would a ClickOnce deployment deploy the report project to the report server?

My ultimate goal would be to have an "off-the-shelf" software solution that includes an installation package consisting of the application project and report project. Is it even possible due to the Reporting Services architecture to achieve an install in this manner with ClickOnce, Windows Installer, or Installshield? Or, is building the report project indepedent of the application project and deploying the reports to the report server "manually" (i.e. deploy within the report server project) the only solution?

Any help would be greatly appreciated!

Tony

I haven't received any feedback yet, so I thought I'd try bumping it back to the top of the thread.

Thanks for any help!

Best practice for relationship

Hi,

There is an idea that using relationship is not suitable in big Database (or Application).

I had checked some big Application : SharePoint Portal(2003 & 2007),

Biztalk Server and see that Microsoft dont use (even one) relatopnships in database.

Everybody, comments plz!

MA.

yes that's a behaviour that MS system tables have...i can comment on sql server system DB , rest of its product i guess must follow the same pattern....see relations (-explicit implementation) are basically constraints (or shud i say we put say a foreign key to enforce a relationship..and ask DB engine to check it (relationship) for us while we do insert/update)..so if ur sure that u wont enter wrong values in the related tables, u can save the effort of db engine testing it for u....the system SP and dll which update system views/tables(in 2000 sql server) take care that all tables data is kept in sync C of ACID properties .....

Thursday, March 8, 2012

Best practice configuring Visual Studio Solution for .SDF databases

Hello,

In our company we haven't tamed Visual Studio yet for the part of configuring

the application database. Therefore I was wondering if there is someone that

can give me hints or clues on what the best practice is for configuring Visual

Solution to handle an SDF database (SQLCE 3.0). I have search a bit on the

internet and this forum, but couldn't find a decent how-to or best practices

guide that copes with this specific problem.

As

a matter of facts, i am also curious for guidelines and tips on the best way to

configure and manage SQL Server databases under Visual Studio. I guess (read as

hope) that the configuration of a mobile and full blown

database will have some overlaps somehow.

I've found the Database Project which with to manage (Create/Alter) databases,

but is this also the best way to store versions of the database in an

source repository? Can such a project allow me to 'automagically' have a

correct database (so with tables and data) when i want to deploy or debug my

device application?

I am asking this because now our database designers and software engineers have

to do allot of manual actions to update the application with the most recent

database version. SDF databases are flying around all over the place, and in

order to test a specific version of the application, the related database has

to be copied manually on the device. We are not searching for replication

related solutions, nor adding the SDF itself to the source repository, but because

most of our applications are server-client based, it would be really super cool

if we could somehow couple both database definitions and generation together. My

feeling says me there ought to be some feature embedded somewhere deep into

Visual Studio that we missed that would (partially) simplify and automate this

whole process for us.

Another

related question is if it is possible to couple XSD generated datasets to an

SDF database. Is it possible to update the generated code (or the describing

XSD documents) from an SDF database? i again guess that this somehow should be

possible in oderder to keep both code and data in sync, and i do not like the

alternative to always update the XSD when the SDF architecture changes. Somehow

i cannot find out how to do this. i was initially searching for the other way

around: Use an XSD to generate both the DataSet codewrappers and the database

itself.

Any

information is welcome and many thanks in advance!

Peter

Vrenken

Too bad there is no one that can give more information

regarding these issues. Can I assume that allot of people/companies haven’t got

a decent SDF database (configuration) setup or thought about it?

I would really like to open a dialog about these issues. Anyone

wants to join me?

Greetings from the rainy Netherlands,

Peter Vrenken

|||Do all you developers out there have got a decent database setup or never thought about it yet? I am hoping that VTS will solve some of the riddles for us but until that time i would really like to know how other companies manage their SDF databases.

Is there not a single developer (maybe a MVP) that wants to shed some light on it and describe how he does it (or how it should be done)?

Thanks in advance,

Peter Vrenken|||I used to put an .mdb in vss. No reason why this couldn't be done with the .sdf|||Hello and thanks for your response!

I know that as of VS2K5 SP1 the management of .SDF files from within a solution has been greatly enhanced.
You say that you ‘used’ to put an .mdb in VSS. Is this because you found a better solution?

Peter Vrenken|||Peter, there are several questions here and I'll try to help where I can. As I understand your issues you're trying to build SDF databases in a way that can be better managed through developer tools like Visual Studio. At this point VS can help, but not as much as it could. The VS team is working on an updated version of the tools that can address some (but not nearly all) of your issues. The SQL Server Management Studio can also do more to help in this regard. As far as scripting, there is little to no support in any of the tools. I too felt your frustration so I wrote my first EBook to supplement my just completed Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition). This is available at WWW.Hitchhikerguides.net. In the book I walk through the process of creating a database using a script reader that I wrote (and provide with the book), with replication and using the APIs. I expect it will help answer many more of your questions.|||"Used to" only in that I no longer use .mdb files.

I moved to MSDE where I kept the create scripts in vss.

I have migrated these to SQL Express (with the scipts in vss) but am now working on a new application with CE. Unfortunately the scripting that was created from SQL Server Management Tool does not work with CE so I am planning on using vss.

Best practice configuring Visual Studio Solution for .SDF databases

Hello,

In our company we haven't tamed Visual Studio yet for the part of configuring

the application database. Therefore I was wondering if there is someone that

can give me hints or clues on what the best practice is for configuring Visual

Solution to handle an SDF database (SQLCE 3.0). I have search a bit on the

internet and this forum, but couldn't find a decent how-to or best practices

guide that copes with this specific problem.

As

a matter of facts, i am also curious for guidelines and tips on the best way to

configure and manage SQL Server databases under Visual Studio. I guess (read as

hope) that the configuration of a mobile and full blown

database will have some overlaps somehow.

I've found the Database Project which with to manage (Create/Alter) databases,

but is this also the best way to store versions of the database in an

source repository? Can such a project allow me to 'automagically' have a

correct database (so with tables and data) when i want to deploy or debug my

device application?

I am asking this because now our database designers and software engineers have

to do allot of manual actions to update the application with the most recent

database version. SDF databases are flying around all over the place, and in

order to test a specific version of the application, the related database has

to be copied manually on the device. We are not searching for replication

related solutions, nor adding the SDF itself to the source repository, but because

most of our applications are server-client based, it would be really super cool

if we could somehow couple both database definitions and generation together. My

feeling says me there ought to be some feature embedded somewhere deep into

Visual Studio that we missed that would (partially) simplify and automate this

whole process for us.

Another

related question is if it is possible to couple XSD generated datasets to an

SDF database. Is it possible to update the generated code (or the describing

XSD documents) from an SDF database? i again guess that this somehow should be

possible in oderder to keep both code and data in sync, and i do not like the

alternative to always update the XSD when the SDF architecture changes. Somehow

i cannot find out how to do this. i was initially searching for the other way

around: Use an XSD to generate both the DataSet codewrappers and the database

itself.

Any

information is welcome and many thanks in advance!

Peter

Vrenken

Too bad there is no one that can give more information

regarding these issues. Can I assume that allot of people/companies haven’t got

a decent SDF database (configuration) setup or thought about it?

I would really like to open a dialog about these issues. Anyone

wants to join me?

Greetings from the rainy Netherlands,

Peter Vrenken

|||Do all you developers out there have got a decent database setup or never thought about it yet? I am hoping that VTS will solve some of the riddles for us but until that time i would really like to know how other companies manage their SDF databases.

Is there not a single developer (maybe a MVP) that wants to shed some light on it and describe how he does it (or how it should be done)?

Thanks in advance,

Peter Vrenken|||I used to put an .mdb in vss. No reason why this couldn't be done with the .sdf|||Hello and thanks for your response!

I know that as of VS2K5 SP1 the management of .SDF files from within a solution has been greatly enhanced.
You say that you ‘used’ to put an .mdb in VSS. Is this because you found a better solution?

Peter Vrenken|||Peter, there are several questions here and I'll try to help where I can. As I understand your issues you're trying to build SDF databases in a way that can be better managed through developer tools like Visual Studio. At this point VS can help, but not as much as it could. The VS team is working on an updated version of the tools that can address some (but not nearly all) of your issues. The SQL Server Management Studio can also do more to help in this regard. As far as scripting, there is little to no support in any of the tools. I too felt your frustration so I wrote my first EBook to supplement my just completed Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition). This is available at WWW.Hitchhikerguides.net. In the book I walk through the process of creating a database using a script reader that I wrote (and provide with the book), with replication and using the APIs. I expect it will help answer many more of your questions.|||"Used to" only in that I no longer use .mdb files.

I moved to MSDE where I kept the create scripts in vss.

I have migrated these to SQL Express (with the scipts in vss) but am now working on a new application with CE. Unfortunately the scripting that was created from SQL Server Management Tool does not work with CE so I am planning on using vss.

Best practice advice for efficient SQL connection code

Hi,

I have an application which is similar to the following example

Private Sub Start()
For a as int16 = 1 to 300
lstResults.items.add(GetPriceFromItem(a))
Next
End Sub

Private Function GetPriceFromItem(byval item as int16) as String
'Connect to SQL
'Execute "SELECT Price FROM Table WHERE Item='" & item.tostring & "'"
'Close Database connection
'Return Price
End Function

I want to know if there is a more efficeint way of doing this, i.e. i'm concerned that the routine creates 300 SqlConnection instances, 300 open/closes and 300 queries

Would a better way be to connect to SQL once, get the entire table then do the 300 "lookups" locally somehow, perhaps put it all into a DataTable, but can you query a datatable in this way, or could you suggest another control.

Best Regards

Ben


You might try one SQL statement which returns all of your needed records in one resultset, with a query like this:
SELECT Price, Item FROM Table WHERE Item BETWEEN 1 AND 300
(I suggest changing the data type of your Item column to integer.)|||

If lstResults is a listbox, then I would use tmorton's SELECT statement with a SqlDataSource control to fill the listbox instead of coding it. Unless of course, you want all of the items, then just don't put anything in the WHERE clause at all.

if lstResults is just a list, then use tmorton's SELECT statement with a datareader to fill the list all at once.

|||

Hi,

I just used lstResults to simplyfy my example, in the actual application these queries form part actually a DataTable which is built on the fly.

Most of the columns are populated with values coming from the Ebay API, then for the last column I take the value of column 0 which is ItemID and lookup to a SQL DB (approx 300 records)

Then datatable is bounded to a datagridview

|||

In that case, use the datareader and tmorton's SELECT statement, but you will need to reverse your logic. Read each record from the SQL Database, then find the row in the datatable that it corresponds to (if any).

Or, you can use a datareader, and stuff the result into a collection/dictionary, then iterate through the datatable, and use the itemID to retrieve the value from the collection/dictionary.

|||

Hi, yes thats the idea that I had. But what is a collection/dictionary?

|||

dim x as new collection

x.add("value1","key1")

x.add("value2","key2")

x.add("MyValue","Mykey")

debug.print x("key1") -- prints value1
debug.print x("Mykey") -- prints MyValue
debug.print x("key2") -- prints value2

A collection/dictionary is basically a key/value pair that allows you to store the value into an object and then quickly retrieve the value based on the key. Most implementations use a hashed key AND/OR binary tree structure so that retrieving the value is pretty fast, much faster than say iterating through an array looking for a key. Just be careful when you retrieve values from the collection as the default collection requires a string key. If you ask for a numeric key, then it'll act more like an array and give you back the nth entry in the collection rather than the value of that key.
So...
debug.print x(1) -- will retrieve the first value
debug.print x(cstr(1)) -- will retrieve the value that has a key of "1"

A dictionary is very similiar, as it stores and retrieves keys and values. In .NET dictionaries are a generic form of collection as far as I know, but with a few different methods, so the following will still work:
dim x as new generic.dictionary(Of string,string)
x.add("value","key")
debug.print x("key")

But you can't retrieve things by index like you can in a collection, so the following will NOT work:
debug.print x(1)

I think dictionaries are a bit faster than collections too.

|||

Hi

You could process just one sql statement (much more efficient use of the query engine) by using the IN statement eg.

select * from table

where tablefield IN ("a", "b", "c")

Hope this helps

Chris Seary

Best practice

Hi,
I'm writing an application using a sql server database. In this database
there roughly 3 kinds of tables:
1. tables containing data which is generated during the run of an
application
2. tables containing data entered by our clients
3. tables containing data entered by our compagny.
Twice a year our clients need to receive new data in table group 3. Thereby
the data stored in table group 1 may be removed.
Only the data in group 2, entered by our clients should stay in the
database.
What's the best practice to achieve this goal?
I was thinking in splitting it up in 2 databases, 1 with group 1 tables, and
1 with group 2 and 3 tables. Twice a year we create a backup of this second
database en our clients restore this database. After this the clients need
to run a program to check the integrity.
Is this the way to go?
Thank's,
PerryOn Tue, 11 Apr 2006 15:36:42 +0200, Perry van Kuppeveld wrote:

>Hi,
>I'm writing an application using a sql server database. In this database
>there roughly 3 kinds of tables:
>1. tables containing data which is generated during the run of an
>application
>2. tables containing data entered by our clients
>3. tables containing data entered by our compagny.
>Twice a year our clients need to receive new data in table group 3. Thereby
>the data stored in table group 1 may be removed.
>Only the data in group 2, entered by our clients should stay in the
>database.
>What's the best practice to achieve this goal?
>I was thinking in splitting it up in 2 databases, 1 with group 1 tables, an
d
>1 with group 2 and 3 tables. Twice a year we create a backup of this second
>database en our clients restore this database. After this the clients need
>to run a program to check the integrity.
>Is this the way to go?
Hi Perry,
I'd prefer to keep all data in just one database. That makes it much
easier to maintain integrity (FOREIGN KEY constraints don't work
coorss-database), plus it will probably yield better performance.
For your half-yearly update of the company-supplied tables, I'd
recommend that you distribute a script to your customers. The script
would either be a .SQL script with INSERT, UPDATE and DELETE statements,
or a .CMD file with a series of SQLCMD and BCP statements, plus the
files to be used in the bcp operations.
Hugo Kornelis, SQL Server MVP|||like Hugo said, one database for sure.
staging tables to import/export data. good names for all tables.
stored procedures to load/run the data in and out.
you need to make a backup before and after all the data movements.

Wednesday, March 7, 2012

Best method of doing Connection Strings

I am using SQL 2000 sp3a on Windows 2000 sp3. I have developed an Intranet application using asp.net/vb.net. Currently my connection string is:

data source=intraweb1;initial catalog=ASGWEB;password=blahblah;persist security info=True;user id=justauser;packet size=4096

So all my users are coming in with one SQL database id. Is this the best method for a combination of security and performance?

I do not allow anonymous to the website so I was thinking of setting up an application role and putting the domain users account in it. But from some other threads I was reading this does not work well with connection pooling.> Is this the best method for a combination of security and performance?

yeah, that's fine. I hardly ever do it otherwise - it's not fine-grained security-wise, but do you need it to be?

as for the connection pooling thing, yup - connection polling makes a pollfor the user id, so with multiple users you'd probably lose the beneficial effects, besides needing more CALs|||::besides needing more CALs

Using onedb server is does NOT save you CAL's. Read the licensing condition. You still need one CAL for every user. They say user - NOT user id. This is actually extremely clear, especially in the descriptions and comments.|||I had a discussion about this recently, and the concensus seemed to be one Device Access license for IIS to grab data if you're using one user ID. licencing is a nightmare though, and don't claim to be an expert on it by any means. I usually just ask MS whet the deal is and get multiple answers (!)

Best method of checking for duplicate entries in SQL Server

Here is my situation. I have a table in my application that pairs users with cars they like. We'll call this table Favorites. A user can browse the site and they can designate as many cars they want as favorites. For example, a user can go to the Honda Accord page and add that as a favorite car and then go to the Toyota Camry page and add that as a favorite car. However, if he/she goes to that Honda Accord page and tries to click the "Add to Favorites" button again, at the present state of my application, it will just add another entry into the Favorites table with a duplicate pairing. So, if I were to datalist the table to generate a listing of all favorites belonging to a certain user, he/she may potentially be returned with superfluous duplicate entries. Not to mention, taking up valuable database space and not looking very professional.Smile

In my Favorites table, the 3 fields are....

favoriteId (set as primary key)
userId
carId

I've been thinking about this for awhile and I've come up with 2 solutions. I'm a newbie to ASP.NET/programming so I don't have enough insight to make a decision or to even think up of other alternatives.

1) Check proactively by doing a....
SELECT favoriteID FROM Favorites WHERE userId = x and carId = y (where x and y are variables)
If I get a null return, it means I can go ahead and let the user add the car as a favorite in the database. If I get a valid value, then it means there already exists the same pairing, so I exit out without updating the table.

2) Check reactively by forcing an exception whenever a user tries to enter a duplicate pairing. I'm not sure how to do this, but perhaps, instead of making "favoriteId" a primary key, perhaps, I can make a primary key pairing of "userId" and "carId". And by trying to do an insert with a primary key that already exists, we know it won't work since primary keys by definition are unique.

Now, I expect some concurrent users on my site, so I must take into consideration pros and cons of each and determine which is more efficient. Checking proactively will force a check even if the table does not contain a duplicate pairing of user and car. However, having a duplicate primary key may be more expensive from a database point of view and may slow down lookups, etc. Or maybe neither has significant benefits, in which case, I rather go with proactive, since I've already coded it and it works fine. Or maybe there is a third alternative, which I did not think. Which method do programmers usually take and which is a better practice?

TIA for your help.Cool

Your best bet IMO would be a derivative of option #1.

If NOT Exists(select favoriteID from favorites where userid = @.x and carid = @.y)
BEGIN
--insert record here
return 0
END
ELSE
BEGIN
return 1
END

where a return of 1 means the record exists

|||

Thanks for the reply, Diamsorn. Is that something called a stored procedure? I'm not terribly familiar with them.... but if that's the only way to go, I'll try to research them. Is there a way to translate that into an inline sql query in my VB code? I've been using the SqlCommand object with an SqlDataReader to get at my queries. Is your method noticeably more efficient that mine? Here's my snippet of code where I proactively check for an existing entry, then I do one of two actions depending on whether or not the record exists. Thanks for helping out an ignorant.Smile

Dim favoriteIdAsInteger
Dim favoriteLookupCmdAsNew SqlCommand _
("SELECT favoriteId FROM Favorites WHERE userId = " & userId &" AND carId = " & carId, dbConnection)
thisReader = favoriteLookupCmd.ExecuteReader()
While (thisReader.Read())
favoriteId = thisReader.GetValue(0).ToString
EndWhile
thisReader.Close()

If (String.IsNullOrEmpty(favoriteId) =False)Then
addFavStatusLabel.Text ="This car already exists in your favorites list."
Else
Dim rowsAffectedAsInteger
Dim insertFavoriteCmdAs SqlCommand =New SqlCommand("INSERT INTO Favorites (userId, carId) VALUES (" & userId &", " & carId &")", dbConnection)
rowsAffected = insertFavoriteCmd.ExecuteNonQuery()
If rowsAffected <> 1Then
addFavStatusLabel.Text ="Error in adding car."
Else
addFavStatusLabel.Text ="Car added to favorites successfully."
EndIf
EndIf

Thanks.

|||

Its not a stored procedure, but rather the T-SQL that will do the same as what you are doing above inside of a stored procedure.

Either method is fine, doing it in a single stored procedure reduces the number of trips back to the server your app has to make,

Also you reduce the chance for SQL injection attacks.
If your going to go with the method you have above, then your going to want to use parameters to also reduce the chance for SQL injection attacks.

 
Dim favoriteLookupCmdAs New SqlCommand _ ("SELECT favoriteId FROM Favorites WHERE userId = @.useriD AND carId = @.carID", dbConnection)favoriteLookupCmd.Parameters.AddWithValue("@.useriD", userID)favoriteLookupCmd.Parameters.AddWithValue("@.carID", carID)
and do the same for your 2nd sql statement as well.|||

INSERT INTO Favorates(UserID,CarID) SELECT @.UserID,@.CarID WHERE NOT EXISTS(SELECT * FROM Favorates WHEREuserid=@.UserID ANDcarId=@.CarID)

because the check and insert are wrapped into a single SQL Statement, locks are automatically placed on any records it matches in the WHERE clause until the INSERT has completed. This guarantees that you will never insert records into the favorates table that already has the record. You could also do this:

IF NOT EXISTS(...) INSERT ...

but the locks (read/shared) on the records in the exists clause are released prior to the insert, which leaves an opportunity for a record to be inserted between them.

Dim rowsAffectedAsInteger
Dim insertFavoriteCmdAs SqlCommand =New SqlCommand("INSERT INTO Favorites (userId, carId) SELECT @.userid,@.caridWHERE NOT EXISTS(SELECT * FROM Favorates WHEREuserid=@.UserID ANDcarId=@.CarID)", dbConnection)

with insertFavoriteCmd

.Parameters.Add("@.userid",sqldbtype.nvarchar).value=userid

.Parameters.Add("@.carid",sqldbtype.integer).Value=carid

end with
rowsAffected = insertFavoriteCmd.ExecuteNonQuery()
If rowsAffected <> 1Then
addFavStatusLabel.Text ="This car already exists in your favorites list."
Else
addFavStatusLabel.Text ="Car added to favorites successfully."
EndIf

|||

How should i write update query for the same ?

plz help me out of this guys....

Saturday, February 25, 2012

Best design for a service that will monitor db

We have an existing database that is constantly receiving updated
information on the status and attributes of specific objects within the
application in batches. As these records come in, there is portions of the
table that they populate that are intentionally left empty, because the data
for these fields is retrieved from a seperate Java application through a
published web service (on same network). We are constructing a .Net service
which will handle the retrieval of records from the Java app and push the
new data into the relevant fields.
We are currently designing the .NET service to check the database on a
predefined interval, to see if any new records have appeared that need to be
looked up in the Java application. However, it would be preferable (at
least for testing) if this interaction could be designed so that the Sql
Server 2000 database could notify the .Net service that a new batch of
records has arrived (push instead of pull). Does anyone have any knowledge
if there is a means by which this can be accomplished?
Thanks.Hmmm ... There surely is a notificaiton service in SQL Server but as far as
I've read the documentation it maynot be suitable for this problem ...
But I think you can write a trigger that can call a DTS package or a Jobs
framework to do this notification ... I think this can also be one solution
...
--
HTH,
Vinod Kumar
MCSE, DBA, MCAD
http://www.extremeexperts.com
"nfalconer" <navid@.gci.net> wrote in message
news:vm4o27o29cu596@.corp.supernews.com...
> We have an existing database that is constantly receiving updated
> information on the status and attributes of specific objects within the
> application in batches. As these records come in, there is portions of
the
> table that they populate that are intentionally left empty, because the
data
> for these fields is retrieved from a seperate Java application through a
> published web service (on same network). We are constructing a .Net
service
> which will handle the retrieval of records from the Java app and push the
> new data into the relevant fields.
> We are currently designing the .NET service to check the database on a
> predefined interval, to see if any new records have appeared that need to
be
> looked up in the Java application. However, it would be preferable (at
> least for testing) if this interaction could be designed so that the Sql
> Server 2000 database could notify the .Net service that a new batch of
> records has arrived (push instead of pull). Does anyone have any
knowledge
> if there is a means by which this can be accomplished?
> Thanks.
>

Friday, February 24, 2012

Best Config

I have a windows 2K server using SQL 2K. I am trying to
indentify what RAID configuation I should use for the
best performance. The application is an OLTP variety. I
have 5 physical disks. What would be the best set-up
(performance is more important than redundancy). If you
need any more info please ask. TIA.
MarcusAlthough the number of concurrent users is a potential issue.
Mirror the log, raid 10 the data ( but you don't have enough disk for that)
so
Mirror the log, raid 0 the data (stripe with stripe size of 64K)
opinions will vary... but avoiding raid 5, will give you a write improvement
( R5 has at least a 75% write penalty.)
But this will not give you data redundancy, but you can get up to the minute
recovery without loss ofdata...
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and its
community of SQL Server professionals.
www.sqlpass.org
"Marcus" <marcus12@.hotmail.com> wrote in message
news:0d4a01c36268$9feebd10$a501280a@.phx.gbl...
> I have a windows 2K server using SQL 2K. I am trying to
> indentify what RAID configuation I should use for the
> best performance. The application is an OLTP variety. I
> have 5 physical disks. What would be the best set-up
> (performance is more important than redundancy). If you
> need any more info please ask. TIA.
> Marcus
>

Best approach for pushing records to MS Access

All,

I am new to DTS/SSIS and have a couple of questions about using it to solve a problem. We have an application running on SQL Server 2005 where status records are written to a status table. I need to be able to send those records over to a status table in a legacy application running on Access.

Originally, I thought about writing a custom c# stored proc and accessing Access from it and then someone pointed me to DTS/SSIS.

Is there a way to exectute the package based on a trigger event that a row was inserted or updated? If not and I take a scheduled approach (every 3 minutes, etc.) do I have to maintain a column for the records that get processed so they are not picked up again.

In general is using SSIS the approach to take? The overall business requirements are straight forward, but I am not sure if SSIS is overkill for this or not.

Thanks,

Steve

If I use an Execute SQL Task on the Control Flow, how do I use that resulting dataset as a Data Source on the Data Flow? I added a variable named 0 and type object, but I cannot figure out how to reference it on the Data Flow designer tab.

Sunday, February 19, 2012

Benchmark for different edition SQL 2000

We want to select the edition between standard and enterprise. Our usage:
1) 10 users/application connect to the server at the same time
2) 5000 row insert per day
3) Our machine is only 1CPU 2.6GHz and 512 MB RAM with window 2000 server
4) One database will be installed
5) The size of the database around 10GB
Because we want to replace the existing SQL6.5 with 400MHz 256MRAM database server.
Please advise. Thanks
Hi,
Based on your configurations and settings I will recommend you to go for SQL
Server standard edition.
Have a look into the below link in choosing the edition of sql server:-
http://www.microsoft.com/sql/techinf...skChooseEd.asp
Thanks
Hari
MCDBA
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:08540023-9C99-4569-9A26-F765151912A2@.microsoft.com...
> We want to select the edition between standard and enterprise. Our usage:
> 1) 10 users/application connect to the server at the same time
> 2) 5000 row insert per day
> 3) Our machine is only 1CPU 2.6GHz and 512 MB RAM with window 2000 server
> 4) One database will be installed
> 5) The size of the database around 10GB
> Because we want to replace the existing SQL6.5 with 400MHz 256MRAM
database server.
> Please advise. Thanks
|||Hari,
Thanks for your advice. However, I have read the page before and without any idea. The point of availability is confused me. In fact, the standard edition and enterprise edition is no different except?
--Scalability ( useless to us because we only have 1 CPU machine with 512MRAM)
--Availability/uptime (useless to us because we don't have a standby or cluster machine)
--Performance (Time is not so critical because we are just using the 6.5 version now with no complain)
--Advanced analysis ( Analysis is not so critical because we are just using the 6.5 version now with no complain)
I just concern, is it enterprise edition is more stable? or standard edition is easy to down?
Wanchun
-- Hari Prasad wrote: --
Hi,
Based on your configurations and settings I will recommend you to go for SQL
Server standard edition.
Have a look into the below link in choosing the edition of sql server:-
http://www.microsoft.com/sql/techinf...skChooseEd.asp
Thanks
Hari
MCDBA
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:08540023-9C99-4569-9A26-F765151912A2@.microsoft.com...[vbcol=seagreen]
> We want to select the edition between standard and enterprise. Our usage:
> 1) 10 users/application connect to the server at the same time
> 2) 5000 row insert per day
> 3) Our machine is only 1CPU 2.6GHz and 512 MB RAM with window 2000 server
> 4) One database will be installed
> 5) The size of the database around 10GB
database server.
> Please advise. Thanks
|||No edition is any more or less stable than any others. It is mainly
features and capacity. Standard edition will do just fine for your needs.
Andrew J. Kelly SQL MVP
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:8E5E6311-B5DF-4D1E-9797-92DD6413C57C@.microsoft.com...
> Hari,
> Thanks for your advice. However, I have read the page before and without
any idea. The point of availability is confused me. In fact, the standard
edition and enterprise edition is no different except?
> --Scalability ( useless to us because we only have 1 CPU machine with
512MRAM)
> --Availability/uptime (useless to us because we don't have a standby or
cluster machine)
> --Performance (Time is not so critical because we are just using the 6.5
version now with no complain)
> --Advanced analysis ( Analysis is not so critical because we are just
using the 6.5 version now with no complain)
> I just concern, is it enterprise edition is more stable? or standard
edition is easy to down?
> Wanchun
>
> -- Hari Prasad wrote: --
> Hi,
> Based on your configurations and settings I will recommend you to go
for SQL
> Server standard edition.
> Have a look into the below link in choosing the edition of sql
server:-[vbcol=seagreen]
> http://www.microsoft.com/sql/techinf...skChooseEd.asp
> Thanks
> Hari
> MCDBA
>
> "Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
> news:08540023-9C99-4569-9A26-F765151912A2@.microsoft.com...
usage:[vbcol=seagreen]
server
> database server.
>
>
|||Andrew,
That mean from our requirement, standard edition is enough for us?
Also, the memory arrangement is the same between standard and enterprise? I am testing with standard edition, the memory continue to grow from 10M to 110M after I inserted 3000 records. After I re-boot the machine, the memory back to 10M..... Is it I nee
d to re-boot the machine every week to prevent the memory to grow? Or enterprise edition can handle it better?
Any other Enterprise features that better than Standard?
Thanks
-- Andrew J. Kelly wrote: --
No edition is any more or less stable than any others. It is mainly
features and capacity. Standard edition will do just fine for your needs.
Andrew J. Kelly SQL MVP
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:8E5E6311-B5DF-4D1E-9797-92DD6413C57C@.microsoft.com...[vbcol=seagreen]
> Hari,
any idea. The point of availability is confused me. In fact, the standard
edition and enterprise edition is no different except?[vbcol=seagreen]
512MRAM)
> --Availability/uptime (useless to us because we don't have a standby or
cluster machine)
> --Performance (Time is not so critical because we are just using the 6.5
version now with no complain)
> --Advanced analysis ( Analysis is not so critical because we are just
using the 6.5 version now with no complain)[vbcol=seagreen]
edition is easy to down?[vbcol=seagreen]
for SQL[vbcol=seagreen]
> Server standard edition.
server:-[vbcol=seagreen]
> Hari
> MCDBA
> news:08540023-9C99-4569-9A26-F765151912A2@.microsoft.com...
usage:[vbcol=seagreen]
server[vbcol=seagreen]
> database server.
|||Enterprise edition has some distinct features that SE doesn't. You find them at:
http://msdn.microsoft.com/library/de...ar_ts_1cdv.asp
As for memory, please read below:
INF: SQL Server Memory Usage
http://support.microsoft.com/default...;en-us;q321363
http://www.mssqlserver.com/faq/troub...memoryleak.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
> Andrew,
> That mean from our requirement, standard edition is enough for us?
> Also, the memory arrangement is the same between standard and enterprise? I am testing with standard
edition, the memory continue to grow from 10M to 110M after I inserted 3000 records. After I re-boot the
machine, the memory back to 10M..... Is it I need to re-boot the machine every week to prevent the memory to
grow? Or enterprise edition can handle it better?[vbcol=seagreen]
> Any other Enterprise features that better than Standard?
> Thanks
>
>
> -- Andrew J. Kelly wrote: --
> No edition is any more or less stable than any others. It is mainly
> features and capacity. Standard edition will do just fine for your needs.
> --
> Andrew J. Kelly SQL MVP
>
> "Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
> news:8E5E6311-B5DF-4D1E-9797-92DD6413C57C@.microsoft.com...
> any idea. The point of availability is confused me. In fact, the standard
> edition and enterprise edition is no different except?
> 512MRAM)
> cluster machine)
> version now with no complain)
> using the 6.5 version now with no complain)
> edition is easy to down?
> for SQL
> server:-
> usage:
> server
|||Tibor,
My concern is how to prevent the SQL server that increase the memory usage continuously? Or We need to reboot the machine periodically? Please advise.
Wanchun
-- Tibor Karaszi wrote: --
Enterprise edition has some distinct features that SE doesn't. You find them at:
http://msdn.microsoft.com/library/de...ar_ts_1cdv.asp
As for memory, please read below:
INF: SQL Server Memory Usage
http://support.microsoft.com/default...;en-us;q321363
http://www.mssqlserver.com/faq/troub...memoryleak.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
> Andrew,
> Also, the memory arrangement is the same between standard and enterprise? I am testing with standard
edition, the memory continue to grow from 10M to 110M after I inserted 3000 records. After I re-boot the
machine, the memory back to 10M..... Is it I need to re-boot the machine every week to prevent the memory to
grow? Or enterprise edition can handle it better?[vbcol=seagreen]
> features and capacity. Standard edition will do just fine for your needs.
> Andrew J. Kelly SQL MVP
> news:8E5E6311-B5DF-4D1E-9797-92DD6413C57C@.microsoft.com...
> any idea. The point of availability is confused me. In fact, the standard
> edition and enterprise edition is no different except?
> 512MRAM)
> cluster machine)
> version now with no complain)
> using the 6.5 version now with no complain)
> edition is easy to down?
> for SQL
> server:-
> usage:
> server
|||Please read the links I posted about memory allocation algorithms in SQL Server. This is normal, and no reboot
is necessary.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:DF073FD2-4A17-4122-BCEC-E9FB5E5AF5EF@.microsoft.com...
> Tibor,
> My concern is how to prevent the SQL server that increase the memory usage continuously? Or We need to
reboot the machine periodically? Please advise.
> Wanchun
> -- Tibor Karaszi wrote: --
> Enterprise edition has some distinct features that SE doesn't. You find them at:
> http://msdn.microsoft.com/library/de...ar_ts_1cdv.asp
> As for memory, please read below:
> INF: SQL Server Memory Usage
> http://support.microsoft.com/default...;en-us;q321363
> http://www.mssqlserver.com/faq/troub...memoryleak.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
> news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
> edition, the memory continue to grow from 10M to 110M after I inserted 3000 records. After I re-boot
the
> machine, the memory back to 10M..... Is it I need to re-boot the machine every week to prevent the
memory to[vbcol=seagreen]
> grow? Or enterprise edition can handle it better?
|||As Tibor points out that is normal behavior and will be the same for both
Std and EE.
Andrew J. Kelly SQL MVP
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:DF073FD2-4A17-4122-BCEC-E9FB5E5AF5EF@.microsoft.com...
> Tibor,
> My concern is how to prevent the SQL server that increase the memory
usage continuously? Or We need to reboot the machine periodically? Please
advise.
> Wanchun
> -- Tibor Karaszi wrote: --
> Enterprise edition has some distinct features that SE doesn't. You
find them at:
>
http://msdn.microsoft.com/library/de...ar_ts_1cdv.asp[vbcol=seagreen]
> As for memory, please read below:
> INF: SQL Server Memory Usage
> http://support.microsoft.com/default...;en-us;q321363
> http://www.mssqlserver.com/faq/troub...memoryleak.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
> news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
enterprise? I am testing with standard
> edition, the memory continue to grow from 10M to 110M after I
inserted 3000 records. After I re-boot the
> machine, the memory back to 10M..... Is it I need to re-boot the
machine every week to prevent the memory to[vbcol=seagreen]
> grow? Or enterprise edition can handle it better?
mainly[vbcol=seagreen]
your needs.[vbcol=seagreen]
message[vbcol=seagreen]
without[vbcol=seagreen]
the standard[vbcol=seagreen]
with[vbcol=seagreen]
standby or[vbcol=seagreen]
the 6.5[vbcol=seagreen]
just[vbcol=seagreen]
standard[vbcol=seagreen]
you to go[vbcol=seagreen]
sql[vbcol=seagreen]
http://www.microsoft.com/sql/techinf...skChooseEd.asp[vbcol=seagreen]
message[vbcol=seagreen]
Our[vbcol=seagreen]
2000[vbcol=seagreen]
256MRAM[vbcol=seagreen]
|||Thanks again Tibor, however, if SQL used all the physical memory of the machine, then the SQL can still run smoothly? or better reboot the machine?
Wanchun
-- Tibor Karaszi wrote: --
Please read the links I posted about memory allocation algorithms in SQL Server. This is normal, and no reboot
is necessary.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:DF073FD2-4A17-4122-BCEC-E9FB5E5AF5EF@.microsoft.com...
> Tibor,
> My concern is how to prevent the SQL server that increase the memory usage continuously? Or We need to
reboot the machine periodically? Please advise.
> http://msdn.microsoft.com/library/de...ar_ts_1cdv.asp
> http://support.microsoft.com/default...;en-us;q321363
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
> edition, the memory continue to grow from 10M to 110M after I inserted 3000 records. After I re-boot
the
> machine, the memory back to 10M..... Is it I need to re-boot the machine every week to prevent the
memory to[vbcol=seagreen]
> grow? Or enterprise edition can handle it better?

Benchmark for different edition SQL 2000

We want to select the edition between standard and enterprise. Our usage:
1) 10 users/application connect to the server at the same time
2) 5000 row insert per day
3) Our machine is only 1CPU 2.6GHz and 512 MB RAM with window 2000 server
4) One database will be installed
5) The size of the database around 10GB
Because we want to replace the existing SQL6.5 with 400MHz 256MRAM database
server.
Please advise. ThanksHi,
Based on your configurations and settings I will recommend you to go for SQL
Server standard edition.
Have a look into the below link in choosing the edition of sql server:-
http://www.microsoft.com/sql/techin...eskChooseEd.asp
Thanks
Hari
MCDBA
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:08540023-9C99-4569-9A26-F765151912A2@.microsoft.com...
> We want to select the edition between standard and enterprise. Our usage:
> 1) 10 users/application connect to the server at the same time
> 2) 5000 row insert per day
> 3) Our machine is only 1CPU 2.6GHz and 512 MB RAM with window 2000 server
> 4) One database will be installed
> 5) The size of the database around 10GB
> Because we want to replace the existing SQL6.5 with 400MHz 256MRAM
database server.
> Please advise. Thanks|||Hari,
Thanks for your advice. However, I have read the page before and without any
idea. The point of availability is confused me. In fact, the standard editi
on and enterprise edition is no different except?
--Scalability ( useless to us because we only have 1 CPU machine with 512MRA
M)
--Availability/uptime (useless to us because we don't have a standby or clus
ter machine)
--Performance (Time is not so critical because we are just using the 6.5 ver
sion now with no complain)
--Advanced analysis ( Analysis is not so critical because we are just using
the 6.5 version now with no complain)
I just concern, is it enterprise edition is more stable? or standard edition
is easy to down?
Wanchun
-- Hari Prasad wrote: --
Hi,
Based on your configurations and settings I will recommend you to go for SQL
Server standard edition.
Have a look into the below link in choosing the edition of sql server:-
http://www.microsoft.com/sql/techin...eskChooseEd.asp
Thanks
Hari
MCDBA
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:08540023-9C99-4569-9A26-F765151912A2@.microsoft.com...
> We want to select the edition between standard and enterprise. Our usage:
> 1) 10 users/application connect to the server at the same time
> 2) 5000 row insert per day
> 3) Our machine is only 1CPU 2.6GHz and 512 MB RAM with window 2000 server
> 4) One database will be installed
> 5) The size of the database around 10GB
database server.[vbcol=seagreen]
> Please advise. Thanks|||No edition is any more or less stable than any others. It is mainly
features and capacity. Standard edition will do just fine for your needs.
Andrew J. Kelly SQL MVP
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:8E5E6311-B5DF-4D1E-9797-92DD6413C57C@.microsoft.com...
> Hari,
> Thanks for your advice. However, I have read the page before and without
any idea. The point of availability is confused me. In fact, the standard
edition and enterprise edition is no different except?
> --Scalability ( useless to us because we only have 1 CPU machine with
512MRAM)
> --Availability/uptime (useless to us because we don't have a standby or
cluster machine)
> --Performance (Time is not so critical because we are just using the 6.5
version now with no complain)
> --Advanced analysis ( Analysis is not so critical because we are just
using the 6.5 version now with no complain)
> I just concern, is it enterprise edition is more stable? or standard
edition is easy to down?
> Wanchun
>
> -- Hari Prasad wrote: --
> Hi,
> Based on your configurations and settings I will recommend you to go
for SQL
> Server standard edition.
> Have a look into the below link in choosing the edition of sql
server:-
> http://www.microsoft.com/sql/techin...eskChooseEd.asp
> Thanks
> Hari
> MCDBA
>
> "Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
> news:08540023-9C99-4569-9A26-F765151912A2@.microsoft.com...
usage:[vbcol=seagreen]
server[vbcol=seagreen]
> database server.
>
>|||Andrew,
That mean from our requirement, standard edition is enough for us?
Also, the memory arrangement is the same between standard and enterprise? I
am testing with standard edition, the memory continue to grow from 10M to 11
0M after I inserted 3000 records. After I re-boot the machine, the memory ba
ck to 10M..... Is it I nee
d to re-boot the machine every week to prevent the memory to grow' Or enter
prise edition can handle it better?
Any other Enterprise features that better than Standard?
Thanks
-- Andrew J. Kelly wrote: --
No edition is any more or less stable than any others. It is mainly
features and capacity. Standard edition will do just fine for your needs.
Andrew J. Kelly SQL MVP
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:8E5E6311-B5DF-4D1E-9797-92DD6413C57C@.microsoft.com...
> Hari,
any idea. The point of availability is confused me. In fact, the standard
edition and enterprise edition is no different except?[vbcol=seagreen]
512MRAM)[vbcol=seagreen]
> --Availability/uptime (useless to us because we don't have a standby or
cluster machine)
> --Performance (Time is not so critical because we are just using the 6.5
version now with no complain)
> --Advanced analysis ( Analysis is not so critical because we are just
using the 6.5 version now with no complain)[vbcol=seagreen]
edition is easy to down?[vbcol=seagreen]
for SQL[vbcol=seagreen]
> Server standard edition.
server:-[vbcol=seagreen]
> Hari
> MCDBA
> news:08540023-9C99-4569-9A26-F765151912A2@.microsoft.com...
usage:[vbcol=seagreen]
server[vbcol=seagreen]
> database server.|||Enterprise edition has some distinct features that SE doesn't. You find them
at:
1cdv.asp" target="_blank">http://msdn.microsoft.com/library/d...br />
1cdv.asp
As for memory, please read below:
INF: SQL Server Memory Usage
http://support.microsoft.com/defaul...b;en-us;q321363
http://www.mssqlserver.com/faq/trou...-memoryleak.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
> Andrew,
> That mean from our requirement, standard edition is enough for us?
> Also, the memory arrangement is the same between standard and enterprise? I am tes
ting with standard
edition, the memory continue to grow from 10M to 110M after I inserted 3000
records. After I re-boot the
machine, the memory back to 10M..... Is it I need to re-boot the machine ev
ery week to prevent the memory to
grow' Or enterprise edition can handle it better?[vbcol=seagreen]
> Any other Enterprise features that better than Standard?
> Thanks
>
>
> -- Andrew J. Kelly wrote: --
> No edition is any more or less stable than any others. It is mainly
> features and capacity. Standard edition will do just fine for your n
eeds.
> --
> Andrew J. Kelly SQL MVP
>
> "Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
> news:8E5E6311-B5DF-4D1E-9797-92DD6413C57C@.microsoft.com...
> any idea. The point of availability is confused me. In fact, the stan
dard
> edition and enterprise edition is no different except?
> 512MRAM)
> cluster machine)
> version now with no complain)
> using the 6.5 version now with no complain)
> edition is easy to down?
> for SQL
> server:-
> usage:
> server|||Tibor,
My concern is how to prevent the SQL server that increase the memory usage c
ontinuously? Or We need to reboot the machine periodically? Please advise.
Wanchun
-- Tibor Karaszi wrote: --
Enterprise edition has some distinct features that SE doesn't. You find them
at:
1cdv.asp" target="_blank">http://msdn.microsoft.com/library/d...br />
1cdv.asp
As for memory, please read below:
INF: SQL Server Memory Usage
http://support.microsoft.com/defaul...b;en-us;q321363
http://www.mssqlserver.com/faq/trou...-memoryleak.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
> Andrew,
> Also, the memory arrangement is the same between standard and enterprise? I am tes
ting with standard
edition, the memory continue to grow from 10M to 110M after I inserted 3000
records. After I re-boot the
machine, the memory back to 10M..... Is it I need to re-boot the machine ev
ery week to prevent the memory to
grow' Or enterprise edition can handle it better?[vbcol=seagreen]
> features and capacity. Standard edition will do just fine for your n
eeds.
> Andrew J. Kelly SQL MVP
> news:8E5E6311-B5DF-4D1E-9797-92DD6413C57C@.microsoft.com...
> any idea. The point of availability is confused me. In fact, the stan
dard
> edition and enterprise edition is no different except?
> 512MRAM)
> cluster machine)
> version now with no complain)
> using the 6.5 version now with no complain)
> edition is easy to down?
> for SQL
> server:-
> usage:
> server|||Please read the links I posted about memory allocation algorithms in SQL Ser
ver. This is normal, and no reboot
is necessary.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:DF073FD2-4A17-4122-BCEC-E9FB5E5AF5EF@.microsoft.com...
> Tibor,
> My concern is how to prevent the SQL server that increase the memory usage con
tinuously? Or We need to
reboot the machine periodically? Please advise.
> Wanchun
> -- Tibor Karaszi wrote: --
> Enterprise edition has some distinct features that SE doesn't. You fi
nd them at:
> _ar_ts_1cdv.asp" target="_blank">http://msdn.microsoft.com/library/d..._ar_ts_1cdv.asp
> As for memory, please read below:
> INF: SQL Server Memory Usage
> http://support.microsoft.com/defaul...b;en-us;q321363
> http://www.mssqlserver.com/faq/trou...-memoryleak.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
> news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
> edition, the memory continue to grow from 10M to 110M after I inserted 3000 r
ecords. After I re-boot
the
> machine, the memory back to 10M..... Is it I need to re-boot the machine eve
ry week to prevent the
memory to[vbcol=seagreen]
> grow' Or enterprise edition can handle it better?|||As Tibor points out that is normal behavior and will be the same for both
Std and EE.
Andrew J. Kelly SQL MVP
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:DF073FD2-4A17-4122-BCEC-E9FB5E5AF5EF@.microsoft.com...
> Tibor,
> My concern is how to prevent the SQL server that increase the memory
usage continuously? Or We need to reboot the machine periodically? Please
advise.
> Wanchun
> -- Tibor Karaszi wrote: --
> Enterprise edition has some distinct features that SE doesn't. You
find them at:
>
http://msdn.microsoft.com/library/d..._ar_ts_1cdv.asp[v
bcol=seagreen]
> As for memory, please read below:
> INF: SQL Server Memory Usage
> http://support.microsoft.com/defaul...b;en-us;q321363
> http://www.mssqlserver.com/faq/trou...-memoryleak.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
> news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
enterprise? I am testing with standard
> edition, the memory continue to grow from 10M to 110M after I
inserted 3000 records. After I re-boot the
> machine, the memory back to 10M..... Is it I need to re-boot the
machine every week to prevent the memory to[vbcol=seagreen]
> grow' Or enterprise edition can handle it better?
mainly[vbcol=seagreen]
your needs.[vbcol=seagreen]
message[vbcol=seagreen]
without[vbcol=seagreen]
the standard[vbcol=seagreen]
with[vbcol=seagreen]
standby or[vbcol=seagreen]
the 6.5[vbcol=seagreen]
just[vbcol=seagreen]
standard[vbcol=seagreen]
you to go[vbcol=seagreen]
sql[vbcol=seagreen]
http://www.microsoft.com/sql/techin...eskChooseEd.asp[vbcol=seagreen]
message[vbcol=seagreen]
Our[vbcol=seagreen]
2000[vbcol=seagreen]
256MRAM[vbcol=seagreen]|||Thanks again Tibor, however, if SQL used all the physical memory of the mach
ine, then the SQL can still run smoothly? or better reboot the machine?
Wanchun
-- Tibor Karaszi wrote: --
Please read the links I posted about memory allocation algorithms in SQL Ser
ver. This is normal, and no reboot
is necessary.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Wanchun" <anonymous@.discussions.microsoft.com> wrote in message
news:DF073FD2-4A17-4122-BCEC-E9FB5E5AF5EF@.microsoft.com...
> Tibor,
> My concern is how to prevent the SQL server that increase the memory usage con
tinuously? Or We need to
reboot the machine periodically? Please advise.
> _ar_ts_1cdv.asp" target="_blank">http://msdn.microsoft.com/library/d..._ar_ts_1cdv.asp
> http://support.microsoft.com/defaul...b;en-us;q321363
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> news:36E3DDB7-B674-4AFA-8A7C-3B7C1A336E3E@.microsoft.com...
> edition, the memory continue to grow from 10M to 110M after I inserted 3000 r
ecords. After I re-boot
the
> machine, the memory back to 10M..... Is it I need to re-boot the machine eve
ry week to prevent the
memory to[vbcol=seagreen]
> grow' Or enterprise edition can handle it better?