Showing posts with label practice. Show all posts
Showing posts with label practice. Show all posts

Friday, February 24, 2012

Bestpractice for ReportingServices 2005

Hello All,

I am working on ReportingServices 2005 and embading the reports in ASP.NET using ReportViewer.

I would like to know Best Practice for this above.

Like Header, Footer, Logo, Report Run time, ReportName, Start and EndDate, Width (on browser and while printing)
PageCount, MasterPages for ReportingServices 2005

Also on the Web Site(ASP.NET with AJAX ), how to navigate to these reports, like Menu or TreeView

Is there any BestPractice or StarterKit for .Net 2.0?

Here are useful links

http://www.microsoft.com/technet/prodtechnol/sql/2005/rsdesign.mspx

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

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

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

Thanks for the reply.

Could you please point me to, where I can see live demo/working copy/starter kit to get a feel of the Bestpractice.

Thanks in Advance.

|||

Hi,

Check this link too -

http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterSQLReportingServices.aspx#underline4HyperlinkAction

Sunday, February 19, 2012

Best way to stop MS SQL in a Failover Cluster?

Hi,
Is it best practice to use SEM or the Services applet to stop SQL2000 on a
failover cluster or is there a way in Cluster Admin?
Thanks
Chris Wood
Alberta Department of Energy
CANADA
Hi,
You should use Cluter Administrator Console to take the SQL Server resource
Offline.
Shutting SQL Service in SEM will initiate a failover.
Danijel
"Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
news:ei5JlFx$EHA.2568@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Is it best practice to use SEM or the Services applet to stop SQL2000 on a
> failover cluster or is there a way in Cluster Admin?
> Thanks
> Chris Wood
> Alberta Department of Energy
> CANADA
>
|||Danijel,
But you could use Services to stop SQL?
Chris
"Danijel Novak" <danijel.novak@.snt.si> wrote in message
news:GDRHd.8418$F6.1490871@.news.siol.net...
> Hi,
> You should use Cluter Administrator Console to take the SQL Server
> resource Offline.
> Shutting SQL Service in SEM will initiate a failover.
> Danijel
> "Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
> news:ei5JlFx$EHA.2568@.TK2MSFTNGP10.phx.gbl...
>
|||Nope, it would initiate a failover too...
Best practice is to use Cluster Administrator to shutdown the service.
Danijel
"Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
news:%23JoVHcx$EHA.1084@.tk2msftngp13.phx.gbl...
> Danijel,
> But you could use Services to stop SQL?
> Chris
> "Danijel Novak" <danijel.novak@.snt.si> wrote in message
> news:GDRHd.8418$F6.1490871@.news.siol.net...
>
|||That's what I wanted to know.
Thanks
Chris
"Danijel Novak" <danijel.novak@.snt.si> wrote in message
news:cdSHd.8423$F6.1490201@.news.siol.net...
> Nope, it would initiate a failover too...
> Best practice is to use Cluster Administrator to shutdown the service.
> Danijel
>
> "Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
> news:%23JoVHcx$EHA.1084@.tk2msftngp13.phx.gbl...
>
|||As of SQL Server 2000 Failover Clustering, you should be able to use SQL Enterprise Manager, SQL Server Services Manager, Query Analyzer and Cluster Administrator to start/stop SQL Server resources as all
these are cluster aware. This was not true for SQL Server 7.0 Failover Clustering and in that case only Cluster Administrator had to be used to start/stop the SQL Server Services.
Additional Information:
======================
INF: Clustered SQL Server Do's, Don'ts, and Basic Warnings
http://support.microsoft.com/?kbid=254321
Here is the relevant section from the above mentioned Microsoft Knowledge Base article
================================================== ================================================== ========================
Start and stop SQL Server services
SQL Server 6.5 and SQL Server 7.0 virtual servers
To start or stop SQL Server, SQL Server Executive, or SQL Agent services from a SQL Server 6.5 or SQL Server 7.0 virtual server, you must use the Microsoft Cluster Administrator or the Cluster.exe command line
tool.If you attempt to start or stop services in any other way (for instance, from Control Panel, SQL Service Manager, or SQL Enterprise Manager), the registry may be corrupted, and you may need to uncluster or
completely reinstall SQL Server.The most common sign of having started a service incorrectly is that the service accounts appear as a jumble of ASCII characters.If you need to start SQL Server from a command
line, you must use the Cluster Administrator or Cluster.exe tool to first take the SQL Server, SQL Executive, or SQL Agent services offline.When you start SQL Server from a command line, connectivity takes place
using the virtual server name. The only way to make a local connection is if the resources are owned by the node from which you originally installed SQL Server.
SQL Server 2000 virtual servers
SQL Server 2000 virtual servers do not have the above restrictions. We recommend that you use SQL Server Enterprise Manager, SQL Server Services applet, or Cluster Administrator to start and to stop SQL
Server 2000 virtual server services. Although you can use Service Control Manager or Control Panel/Service to start and to stop the services without damaging the registry, these options will not cause the
services to stay in a stopped state. Instead, the services will be detected by the clustered server and you will receive multiple event ID 17052 error messages in you SQL Server that are similar to the following:
[sqsrvres] CheckServiceAlive: Service is dead
[sqsrvres] OnlineThread: service stopped while waiting for QP
[sqsrvres] OnlineThread: Error 1 bringing resource online
After you receive these error messages, SQL Server will be restarted by the cluster service. This behavior is expected for these types of errors.
================================================== ================================================== ========================
HTH,
Best Regards,
Uttam Parui
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx

Best way to SELECT from database

Not totally sure if this is the best place for this question, but regarding maintainability / good practice issues vs speed I have a question regarding what is the best way to SELECT some data from a database.I have the item_id of an item bought. I want to get a customer's billing information based on the item he bought. Should I do this with two queries or one using joins?

Here is my dbase schema:

customer_info
-----
customer_id
name
cc_num
expdate


item_bought
----
item_id
customer_id

And here is a basic pseudocode algorithm:
function getCustomerInfo(customerID)
{
SELECT customer_info.name, customer_info.cc_num, customer_info.expdate FROM customer_info WHERE
customer_id=customerID;
return results;
}


function getCustomerInfoWithItemId(itemID)
{
SELECT item_bought.customer_id FROM item_bought WHERE item_bought.item_id=itemID;

results = getCustomerInfo(customer_Id);

return results;
}

results = getCustomerInfoWithItemId(400);
OR

function getCustomerInfoWithItemId(itemID)
{
SELECT customer_info.name, customer_info.cc_num, customer_info.expdate FROM customer_info, item_bought WHERE item_bought.item_id=itemID
AND customer_info.customer_id = item_bought.customer_id;
return results;
}

results = getCustomerInfoWithItemId(400);

Definitely a join. Less traffic in/out of the DB.|||Hmm, yea there's less traffic, but with using 2 functions with 2 queries, won't I be able to reuse the functions ? However, with just one query using a join, there's less places that I will be able to reuse that function.|||Depends on what you are doing. If your site is for external customers (which Im assuming it is) you would want to do it all in one query. Speed is always the key to stop drop-off from your site. If your site is slow, there will be a lot of people who will just leave. If you are making the site for internal customers, then you can do multiple connections since the chances are they need to use the system and the number of connections to your database will be limited anyway.
Nick|||

tdnxxx444 wrote:

Hmm, yea there's less traffic, but with using 2 functions with 2 queries, won't I be able to reuse the functions ? However, with just one query using a join, there's less places that I will be able to reuse that function.


What exactly do you think you're going to be able to reuse?
Remember that a good design is orthogonal before being reusable.|||

Alex Papadimoulis wrote:


What exactly do you think you're going to be able to reuse?
Remember that a good design is orthogonal before being reusable.


What do you mean by orthogonal? I can reuse the function getCustomerInfo(customerID) everytime I want to get the customer information based on primary key.|||

Orthogonality is a design principle relating to explicitness. The more modules your system relies on to do things, the less orthagonal it is:
myCustomer = GetCustomerById( GetCustomerIdByItemId(ItemId) )
... versus ...
myCustomer = GetCustomerByItemId(ItemId)
The more functions interdependent on eachother, the more things have a chance of breaking when one of thef unctions break. Here is a pattern you may find helpful ...
Class CustomerFactory
Private Function FromDataReader( dr) As Customer)
...
End Function
Function FromCustomerId(CustomerId) As Customer
dataReader = SELECT ... FROM Customers WHERE CustomerId=?
Return FromDataReader(dataReader)
End Function
Function FromItemId(ItemID) As Customer
dataReader = SELECT ... FROM Customers ... JOIN Items ... WHERE ItemId=?
Return FromDataReader(dataReader)
End Function
End Class

|||

tdnxxx444 wrote:


What do you mean by orthogonal? .


Try this link for THE PRINCIPLE OF ORTHOGONAL DESIGN it is a two article. Hope this helps.
http://www.dbdebunk.citymax.com/page/page/622331.htm

Tuesday, February 14, 2012

Best way to keep track of SQL server changes...!

What would be the best practice to follow to keep track of MS SQL
server changes... Stroed procs, tables, views, triggers, indexes, DTS
and also jobs ect...
I am not quite sure how Source safe works with sql server. Any other
way to do this... Even if its manual work, its okey.. I would
appreciate if any of the DBA's let me know how they are facing this
issue...
Thanks in advance...
Hi,
Have you thought about server side tracing?
If you do not wish to do the above and is ready to spend some money, then
there are few third-party tools available in the market, For ex: Red-gate.
Thanks
Yogish
|||check out www.dbghost.com for SQL Server database change management with
source control intergration.
"SQLDBA" wrote:

> What would be the best practice to follow to keep track of MS SQL
> server changes... Stroed procs, tables, views, triggers, indexes, DTS
> and also jobs ect...
> I am not quite sure how Source safe works with sql server. Any other
> way to do this... Even if its manual work, its okey.. I would
> appreciate if any of the DBA's let me know how they are facing this
> issue...
> Thanks in advance...
>

Best way to keep track of SQL server changes...!

What would be the best practice to follow to keep track of MS SQL
server changes... Stroed procs, tables, views, triggers, indexes, DTS
and also jobs ect...
I am not quite sure how Source safe works with sql server. Any other
way to do this... Even if its manual work, its okey.. I would
appreciate if any of the DBA's let me know how they are facing this
issue...
Thanks in advance...Hi,
Have you thought about server side tracing?
If you do not wish to do the above and is ready to spend some money, then
there are few third-party tools available in the market, For ex: Red-gate.
Thanks
Yogish|||check out www.dbghost.com for SQL Server database change management with
source control intergration.
"SQLDBA" wrote:

> What would be the best practice to follow to keep track of MS SQL
> server changes... Stroed procs, tables, views, triggers, indexes, DTS
> and also jobs ect...
> I am not quite sure how Source safe works with sql server. Any other
> way to do this... Even if its manual work, its okey.. I would
> appreciate if any of the DBA's let me know how they are facing this
> issue...
> Thanks in advance...
>

Best way to keep track of SQL server changes...!

What would be the best practice to follow to keep track of MS SQL
server changes... Stroed procs, tables, views, triggers, indexes, DTS
and also jobs ect...
I am not quite sure how Source safe works with sql server. Any other
way to do this... Even if its manual work, its okey.. I would
appreciate if any of the DBA's let me know how they are facing this
issue...
Thanks in advance...Hi,
Have you thought about server side tracing?
If you do not wish to do the above and is ready to spend some money, then
there are few third-party tools available in the market, For ex: Red-gate.
--
Thanks
Yogish|||check out www.dbghost.com for SQL Server database change management with
source control intergration.
"SQLDBA" wrote:
> What would be the best practice to follow to keep track of MS SQL
> server changes... Stroed procs, tables, views, triggers, indexes, DTS
> and also jobs ect...
> I am not quite sure how Source safe works with sql server. Any other
> way to do this... Even if its manual work, its okey.. I would
> appreciate if any of the DBA's let me know how they are facing this
> issue...
> Thanks in advance...
>

Best way to keep track of SQL Server Changes

What would be the best practice to follow to keep track of MS SQL
server changes... Stroed procs, tables, views, triggers, indexes, DTS
and also jobs ect...

I am not quite sure how Source safe works with sql server. Any other
way to do this... Even if its manual work, its okey.. I would
appreciate if any of the DBA's let me know how they are facing this
issue...

Thanks in advance..."SQLDBA" <pg.242w@.gmail.com> wrote in message
news:1104953120.142642.99410@.z14g2000cwz.googlegro ups.com...
> What would be the best practice to follow to keep track of MS SQL
> server changes... Stroed procs, tables, views, triggers, indexes, DTS
> and also jobs ect...
> I am not quite sure how Source safe works with sql server. Any other
> way to do this... Even if its manual work, its okey.. I would
> appreciate if any of the DBA's let me know how they are facing this
> issue...
> Thanks in advance...

There's lot of information on the web - Google 'sql 2000 source control' or
something similar to find more information. You might also want to check out
the thread in this group from yesterday called 'Backing up design changes',
as well as this approach from Erland:

http://www.abaris.se/abaperls/index.html

To get started quickly, you can script your objects to files using
Enterprise Manager, check them all in to VSS, then start using source
control for all changes. You'll need to do some basic work on source control
processes, but there's lot of stuff on the web, and you may already have
something in your organization that you can re-use.

It's also very useful to have some sort of comparison tool (I've used Red
Gate's SQL Compare before) to check the differences between databases, and
synchronize them as needed.

DTS is a bit more problematic, because packages are binary objects, not text
files, but DTS does support multiple package versions anyway, so you might
just decide to keep the last 5 versions in a package or whatever.

Simon|||Thank you very much... We do have VSS but my knowledge in VSS is
limited. So I would appreciate if you could give me a drill down on how
I can set it up. Is there any way I can link these scripts to SQL
Server objects so that everytime when someone try to make any changes
to these scripts, it needs to be checked out to get modified? Because I
need to enforce a method among the developers to follow...!|||SQLDBA (pg.242w@.gmail.com) writes:
> Thank you very much... We do have VSS but my knowledge in VSS is
> limited. So I would appreciate if you could give me a drill down on how
> I can set it up. Is there any way I can link these scripts to SQL
> Server objects so that everytime when someone try to make any changes
> to these scripts, it needs to be checked out to get modified? Because I
> need to enforce a method among the developers to follow...!

There might be means to in Visual Studio.

But in my opinion, that's flawed. Checking out - and in - should be
a concious decision, and the source for the check-in should be a file,
not an object in a database.

That's the core of configuration management: if you need to change a
file, you go the version-control system and check it out, do your
change, and then check it in. If the change is not in the version-
control system, it does simply not exists. All builds and deployments
are made from the version-control system.

Of course, if there is only one development database, this policy may
be somewhat difficult to enforce, not the least if people use tools
like Query Analyzer where it's easier to load a stored procedure to
the database than saving it to disk.

In our shop there are an unknown number of development databases, so it
becomes quite apparent that there must be a central clearinghouse for
the code, and that is is SourceSafe.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Thank you all for your input. In my situation, I just need to enforce
some good practice methodology among the developers. We already have
some third party tool (Redgate SQL compare) that does a wonderful job
in migrating changes among different databases.. This is just to keep
track of who is changing what and to keep the process going without any
flaws... So anyone has any suggestions to a situation like this?
Thanks again..!