Tagged Questions
3
votes
1answer
49 views
What is the safest way to run SSIS on Multiple Named SQL Server Instances?
I have an Active/Active SQL Server 2008 R2 cluster. There are two named instances on each node and no default instance.
I need to deploy SSIS packages to the different instances. To do this, I ...
3
votes
3answers
68 views
pros/cons of different ways to store whether a record is one of two options?
I am trying to store whether an address is a Work address or a Home address. There will never be another type of address.
I'm wondering what the pros/cons are of the different ways to store this, ...
1
vote
1answer
47 views
What are the hazards of upgrading a SQL Server service pack?
Are there any specific pitfalls/standard considerations when upgrading an instance of MS SQL Server to a higher service pack? Is there anything special that is generally done besides making sure there ...
6
votes
2answers
263 views
Is there any difference between putting a column alias at the start or the end of the column definition?
I've always seen and written my column aliases as
SELECT 1 as ColumnName
but today came across a query that used
SELECT ColumnName = 1
Is there any difference in how these two queries get ...
0
votes
1answer
105 views
SQL Server Job logging best practice
To be able to design a robust Job in SQL Server, we need to have log for each step of the job. I know there are different options available which help us for troubleshooting a job, but what if we want ...
5
votes
3answers
164 views
Database Indexing - Maintenance Jobs
I have created a script that runs every night to rebuild & re-organize indexes based on the fragmentation, Indexes with Fragmentation > 30% are rebuilt, Indexes with Fragmentation 10% - 30% are ...
4
votes
2answers
173 views
Best practise for copying a database from production
Currently after releasing a new major or minor version of our application, we take a copy of the production database and perform the below process:
Copy production database to test server
Obfuscate ...
2
votes
0answers
73 views
Are there any best practices before moving SQL Server to another node (controlled failover)?
Let's say there are multiple jobs running on the SQL Server - we have index maintenance jobs, backups, replication, etc. We would like to perform a switchover using Failover Cluster Manager. Are there ...
6
votes
2answers
258 views
Is it safe to run antivirus software on my database servers?
Some implementations of antivirus software are known to Microsoft to cause a variety of problems for SQL Server, and Microsoft has a support article dedicated just to picking the right antivirus ...
2
votes
1answer
166 views
Any problem with same conversation handle used by multiple services communicating with one target queue in a multiplexed service broker order queue?
I asked a question about implementing conversation groups in a SQL Service Broker setup which has several User Services communicating with the Server Service (Processing xml data requests to be sent ...
2
votes
0answers
158 views
going from heirarchical XML to heirarchical SQL tables then SQL to c# objects to go to user view, how should I store the data in the databases?
Hi I'm getting my data from a web service using their getData call and it comes in as fairly chunky heirarchical XML, first everything all at once, like
<allData>
<product1>
...
2
votes
1answer
180 views
How would you implement conversation groups/ locking for multiple users of a Service Broker Queue?
How do you implement conversation groups for multiple users using their own instance of the user applications but sending related messages to the service broker queue? Any good example of this kind ...
2
votes
1answer
362 views
How to design database for tree view with an infinite depth
I am trying to combine C# and SQL2005 for an application which need to have tree view control.
One of user requests is to that tree view can user friendly grow into infinite dept of child nodes. That ...
2
votes
2answers
560 views
Looking for example design of using an SQL database as a queue for throttling web service requests of multiple users
I'm designing a system for multiple users to queue their requests to a web service which takes requests such as creating new entries, changing entries, requesting data. Many of the web service calls ...
3
votes
1answer
187 views
Optimizing queries against a set of tables that contain partitioned data
I have a third party program that creates and populates a series of tables to hold some historical data:
data_33 -- contains data for 12/01/11 - 12/05/11
data_34 -- contains data for 12/05/11 - ...
7
votes
1answer
418 views
Why does the fill factor in SQL Server default to 0 (100%)?
I understand fill-factor, pages and index structure and I therefor understand why a 100% fill factor is a rare best practice. So why does it default to 0 (or 100% ) by default? Why not 90 or 95?
Is ...
2
votes
1answer
312 views
Replicate SQL Data Inside Firewall to Outside Firewall - Suggestions
Currently I have an internal CRM application that houses all my data and runs my entire company. The front end is ASP, and the back end is SQL. The external site will run SQL
What I'd like to do ...
2
votes
1answer
409 views
tempdb on raid1 isolated or raid10 shared with high write db
PROPOSAL 2
8x600gb raid 10 mdf array
4x600gb raid 10 ldf array
PROPOSAL 3
8x600gb raid 10 mdf array
2x600gb raid 1 ldf array
2x600gb raid 1 tempdb mdf/ldf array
READ/WRITE STATS ON ...
2
votes
2answers
246 views
How to quantify TEMPDB usage in relation to other databases hosted on same hardware?
Working on a project to decide if configuration 1 or 2 is the best way to organise disks for my SAN:
Config1 (sql 2008):
8 disks @ raid 10 data
2 disks @ raid 1 logs
2 disks @ raid 1 tempdb
2 disks ...
63
votes
18answers
8k views
Should developers be able to query production databases?
Should developers be given permission to query (SELECT / read only) production databases? The previous place I worked, the development team had the db_datareader role; where I work now the ...
2
votes
2answers
615 views
Best practices for creating partition schemes and functions
I'm implementing partitioning for the first time in SQL Server 2008 R2. I've several large tables that I am partitioning.
My main question is: Should I use the same Partition Scheme and Function for ...
3
votes
1answer
478 views
Nested queries or temp (#) tables in SQL Server
I have written a web application which aggregates and presents data from a SQL Server. The data involved is large, and there is a lot of aggregation involved. Currently, under advice from an 'expert' ...
10
votes
4answers
4k views
Should dbo schema be avoided?
When it comes to the dbo schema:
Is it a best practice to avoid using the dbo schema when creating database objects?
Why should the dbo schema be avoided or should it?
Which database user should own ...
3
votes
1answer
299 views
SQL Globalization - DateTimeOffset
What is the recommended best practice when it comes to storing date/time for an application that needs to support multiple timezones?
Which is best ?
Use the SQL DateTime data type and insert ...
6
votes
5answers
373 views
Over use/correct use of schemas?
Having asked This question on Stackoverflow, I wondered where what I have done is correct/best practise.
Basically, every object that I create is going into a schema with the schema name reflecting a ...
7
votes
4answers
1k views
Help me choose a RAID level combination for a SQL Server 2008 instance
I am going to rebuild one IBM 3400 server from scratch. This server is dedicated to a SQL Server 2008 instance running on Windows 2008 R2.
I am going to make new RAID configuration. I have 6 SCSI ...
2
votes
2answers
665 views
AUTO_UPDATE_STATISTICS and FULLSCAN in SQL Server 2008 R2
Is it possible to force FULLSCAN when statistics are updated automatically by SQL Server 2008 R2?
If not, is a planned UPDATE STATISTICS WITH FULLSCAN the best way to keep statistics up-to-date?
...
5
votes
4answers
2k views
Parallelism Best Practices
What are the best practices with setting parallelism in general? I know that SQL Server defaults to 0 to use all available processors, but in what instance would you want to change this default ...
10
votes
2answers
3k views
What does a best-practice SQL Server maintenance plan look like?
I am a student from Fontys University in Eindhoven, and I am currently carrying out a series of interviews to help with the development of a SQL Server tool and I would like to get feedback from the ...
3
votes
4answers
910 views
Should I convert empty varchar values to NULL?
I have a stored procedure which accepts various varchar parameters. The middle tier code which calls the procedure has not been consistent in terms of the values it submits. For example, sometimes a ...
4
votes
2answers
364 views
How to mark an item as “Expired” when it's ExpiryDate value is in the past?
I have a table of items, each of which has a Status and ExpiryDate.
What is the best way of enforcing this:
when ExpireyDate > DateTime.Now
update Status to "expired"
I could have a stored ...
9
votes
3answers
283 views
Any pointers on reducing my privileges in production but not making my job excessively difficult
Running SQL Server 2005 and 2008 on Windows 2008 R2.
We're going to be reducing privileges in production for developers - and I'd like to do the same for myself as a DBA, limiting rights to ...
1
vote
2answers
259 views
Determining sizes for Separated Partitions of programs, data and logs in SQL Server
As per the recommendations of the CIS benchmarks for SQL Server, I want to create separate partitions for the data, the programs and the logs on my SQL Server dedicated server.
Question is, what is ...
16
votes
3answers
4k views
When should I use a unique constraint instead of a unique index?
When I want a column to have distinct values, I can either use a constraint
create table t1(
id int primary key,
code varchar(10) unique NULL
);
go
or I can use a unique index
create table t2(
id ...
