Microsoft's SQL Server is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. It originated from the Sybase SQL Server codebase, which is why both products use the extension of SQL called Transact-SQL (T-SQL).

learn more… | top users | synonyms (2)

5
votes
2answers
511 views

How do I tell what is filling up the transaction log?

We have a transaction log on a sql database and for some reason it has filled up to 50GB when our live system only has about 2GB. Is there any way I can profile sql or the transaction log to try and ...
4
votes
1answer
101 views

Multiple Merge Replications on same SQL Server Database Conflicts

I have 2 separate merge replications on the same database on a server, one named 'POC' with a single subscriber running continuously, and another named 'Clubs' with ~50 subscribers. As of recently, ...
3
votes
2answers
618 views

Scripting a Backup Process and Backup File Ownership

Background I'm writing a Powershell script to Backup a database to a file on disk Compress and encrypt the file (7-Zip/AES256) Copy the encrypted backup to Amazon S3 Delete the backup file The ...
-1
votes
0answers
327 views

Synchronising SQL tables in two locations [closed]

We have a bit of a conundrum at the moment. ANSI SQL solutions please. We have two databases located at two different geographic locations and will be using the web for all traffic between the two ...
4
votes
2answers
292 views

Schema blocking in READ_COMMITTED_SNAPSHOT

I am trying to troubleshoot locking behavior and the READ_COMMITTED_SNAPSHOT isolation level while attempting to resolve concurrency issues. Background: Assume an online ordering system (ecommerce). ...
2
votes
2answers
503 views

SQL Server WMI Event Alert and BROKER_TASK_STOP waits

In SQL Server 2008 I created a Sql Server Agent Alert last week to monitor deadlock events. The Alert calls a job with no schedule sending the xml deadlock graph token obtained through WMI SELECT * ...
1
vote
1answer
857 views

Differences between SQL Server 2005 and SQL Server 2008 deadlock handling

We recently upgraded a server to SQL Server 2008 R2. The server had been running SQL Server 2005. We are using Transactional Replication Management Data Warehouse and Data Collector on the ...
3
votes
2answers
775 views

Set SA to weak Password in SQL Server 2012

Hi I'm migrating a database to SQL Server 2012, and I have a problem. Let me start by saying the application (ISV) has horrible security! So try not to cringe too much. The app logs in with sa ...
5
votes
3answers
2k views

SQL Server virtual log size

I'm somewhat of an accidental DBA, being a developer who inherited a couple of database servers (2005 and 2008) from someone who knew little about database administration, and seemingly had even less ...
4
votes
1answer
3k views

Deny access to information schema in SQL Server

I am looking for the best way to disable access to the sys.tables / Information Schema for a user / group in SQL Server. I found this thread from 2008 It shows a way how to deny access on ...
3
votes
2answers
131 views

index maintenance strategy if few insertion points relative to # of rows

In SQL Server 2008 R2, I have a nonclustered covering index on multiple tables with 100M+ rows. The table has a few thousand "insertion points" where all new inserts happen. This means that regardless ...
4
votes
2answers
610 views

Why index REBUILD does not reduce index fragmentatation with a page count > 1000?

This is kind of a followup to the existing question on this site "Why index REBUILD does not reduce index fragmentatation?". The accepted answer to that question, and all other resources I have found ...
2
votes
1answer
2k views

To use or not use ISNULL(NULLIF(Field1, ''))?

In the past I've seen use of something such as SELECT ISNULL(NULLIF(Field1, ''), 'NewValue') to tersely get a fallback value. However, since the advent of CASE in TSQL, we've favored something ...
10
votes
3answers
2k views

SQL Server database synchronization

Problem definition Our users need the ability to query a database that is mostly up to date. The data can be stale up to 24 hours and that is acceptable. What would be the lowest cost approach to ...
0
votes
1answer
179 views

Trouble in Multi-Language DB

I'm working on a DB design for medicines in many countries with different languages. I created a table for the different languages I want and link it to another table of chemicals. But I find that ...
0
votes
2answers
129 views

Finding changes for table-valued function definition on SQL Server

I had a Table-Valued Function in SQL Server and someone from my colleagues has altered it unexpectedly. How can I restore previous version easily? Is there any way to find the previous version?
0
votes
3answers
880 views

Best table schema to store daily hits for many items?

In my Sql Server 2005 database, I'm considering two ways of creating a table to track daily views on 100,000 items: Option 1) Each day would insert a new row for each item. So the table columns would ...
-1
votes
1answer
193 views

Selecting the right data type for text

In my database, I have columns that should contain text pieces. What is the best data type used for texts in SQL? How can I show that text as a numbered or bullet list? Can I search for a certain ...
1
vote
9answers
778 views

Is there any way to run the definition of multiple stored procedure at a time?

I have created the definition of more than 200 stored procedures. My problem is that I have to execute them on a different server and on a different database. The process which I am following is that ...
-2
votes
1answer
193 views

How to run 2 separate sql server engines on the same server?

I have a Windows server, and on this server there are many websites running and most of them connect to the installed SQL Server, some of them connect to SQL Server Express and some to local. My ...
5
votes
3answers
1k views

Separate archive tables or soft delete for inventory database

I'm building an inventory database that tracks computer equipment and other hardware devices. At some point in any device's life it is retired and gets archived. After it becomes archived it needs to ...
0
votes
1answer
93 views

get query from 4 tables

I have three tables: User (Table) - Email - Moblie - User_id Invoice_product (Table dbo.payware_factor_product ) - invoice_id - Product_id Invoice (Table dbo.payware_factor ) - User_id - Mobile - ...
0
votes
2answers
1k views

help in multi-language medical database?

My project is to design a medical database for many countries. This database contains many parts: medicines, medical centers, patients, etc. for every country with its own language. I started my ...
2
votes
1answer
249 views

Move DTC from one node to another in Windows 2003 R2 Clustering

I have a Windows 2003 R2 two node cluster that is running MSDTC as part of the Cluster Group. Is it possible for me to change the current MSDTC owner without moving the entire Cluster Group to the ...
0
votes
3answers
299 views

SQL Server 2008 R2 Remote Connection issue

I have installed SQL Server 2008 R2 in mixed mode, but currently issue is I can't use SQL through ip nor ip with port, even I have enabled TCP/IP and open port in firewall too. I tried to telnet ...
6
votes
1answer
535 views

Deadlock on Merge replication

I'm having a really confusing problem on the msmerge_contents table on some of my merge replication databases. It seems I'm receiving a dead lock on the exact same row on the same index on the table ...
1
vote
1answer
569 views

How to create database, and add user linked to login?

created a login and a user in the master database and linked that user to the login. I created a new database, then went to that database and immediately tried to create a user linked to the same ...
2
votes
2answers
69 views

How can I make this backup scheme more friendly for reporting?

Currently, we have around 50 remote servers, each with a production database. Each night, all 50 of these servers run a backup job and zips the backup. Each morning, a local server runs a job for each ...
2
votes
2answers
7k views

How can I get the actual data size per row in a SQL Server table?

I found this script sql-server-2005-reaching-table-row-size-limit that seems to return the row size per defined data type lengths. I need a script that would give me all the rows in a table that ...
2
votes
1answer
956 views

Collect performance information on high CPU condition in SQL Server

I have a SQL server cluster that is often reaching 100% CPU out of working hours. I want to gather some information to help troubleshooting when the actual condition is taking place. I'm thinking of ...
1
vote
2answers
51 views

Do I need an index on this?

I have a sql server db and have a question regarding foreign key indices. Here's a snippet from the db: In programme_affiliates, I have a computed field, this is always set to '2' in this ...
4
votes
3answers
123 views

How to join the updated result set of multiple servers

I have got 4 different servers and I want to get the free diskspace of all those in a single output. using xp_fixeddrives we will get the free space in each drive . Its not possible to get into all ...
3
votes
2answers
448 views

Help with a multi-language medical database

My project is to design a database for medicines in many countries. Medicines have various criteria like composition, price, manufacturer. Database will be multi-language; related to each country. ...
5
votes
1answer
134 views

Can We Perform an “Up-To-The-Minute Restore” After Taking Transaction Log Backups?

The Setup: Say we have a Database in Full Recovery Mode that does a nightly Database Backup, Transaction Log Backup, and Transaction Log Shrink. Now the Transaction Log grows so quickly during the ...
4
votes
4answers
912 views

SQL Server DB restore fails

I am trying to do a SQL Server database restore using this T-SQL code: ----Make Database to single user Mode ALTER DATABASE xyz SET SINGLE_USER WITH ROLLBACK IMMEDIATE ----Restore Database RESTORE ...
6
votes
2answers
6k views

Visio 2010 and SQL 2012 - Reverse Enginnering

We have upgraded to SQL 2012 and Am trying to reverse engineer our Dbs into Visio 2010. I setup a connecting using SQL 11 driver and Visio complains that that driver is not supported. Any one run ...
2
votes
2answers
489 views

What is a 'Target Server' in a SQL Server Agent Job?

Can someone explain what a 'Target Server' is in this instance. Also, what it means to "Target Multiple Servers"?
2
votes
1answer
347 views

Intent Exclusive (IX) Lock questions [closed]

I was experiencing a deadlock so I set up a trace flags as well as profile trace to capture a deadlock. During this exercise I found something interesting. In the profile trace I noticed that "sa" ...
0
votes
1answer
999 views

Calling stored procedure with select and update statement

I have a requirement to return a batch of records and then mark the batch complete. I was thinking to acheive this with a select and the update. Something like create procedure testproc as select ...
9
votes
4answers
540 views

Potential risks of users connecting to SQL Server, through Excel, as sysadmin?

I recently discovered that a large swath of the finance department is using Excel to connect to my SQL Server 2000 instance with an account in the sysadmin role. What are my current risks that I ...
3
votes
2answers
707 views

How can I find databases with a large number of virtual log files?

I have several databases on a production server that are in the hundreds of gigabytes, and have many thousands of transactions running through them on a daily basis. Almost all these databases are ...
3
votes
1answer
570 views

Unable to start MSSQL and SQLSERVERAGENT in Windows Server 2003

We are using MICROSOFT SQL SERVER 2000 Enterprise Edition. Our main problem we cant start MSSQL and SQLSERVERAGENT services. Heres the Error log : ...
1
vote
2answers
78 views

Does sp_addtabletocontents Use Precomputed Partitions

I am using merge replication in SQL 2012. When I bulk insert rows into a table, and run this stored procedure to add references into the merge tracking table, sp_addtabletocontents Is that missing ...
1
vote
0answers
292 views

SQL Server 2005 Memory Pressure [closed]

We keep having a nagging problem with our SQL Server. I don't know what changed, but we started having out of memory errors every 3 weeks or so. I thought I could locate something strange with DBCC ...
2
votes
3answers
140 views

What tasks can only sysadmin's do in SQL Server 2000?

I'm cleaning up permissions on my SQL Server 2000, and I want to verify that a particular account still has sysadmin privileges. What non-destructive tasks can only sysadmins do that I can use to ...
2
votes
2answers
136 views

Upgrade SQL Server 2008 Express to SQL Server Workgroup 2008 Volume License

I'm in need of some help with SQL Server. I’m fairly new to SQL Server so bear with me. My situation: We currently have SQL Server 2008 Express installed and running on Windows Server 2003. We are ...
1
vote
0answers
482 views

SQL Server Database Engine Tuning Advisor vs DMV queries

What is the best way to tune the indexes on my production database? I normally use the following query : SELECT user_seeks * avg_total_user_cost * (avg_user_impact * 0.01) AS [index_advantage], ...
1
vote
3answers
4k views

How to import Sybase .db file into SQL Server database?

I've been given a Sybase .db file by a client and I need to import that into a new SQL Server database so that I may see the data as well as the tables and their relationships, any ideas on how that ...
1
vote
2answers
2k views

Exception Details: System.Data.SqlClient.SqlException: Login failed for user

One of our user from another domain WATSON received the following error message: Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'WATSON\User1'. when he is trying to ...
3
votes
1answer
320 views

How do I automate converting heaps into clustered indexes?

I have around 40 tables in one of our production databases that, for varying reasons, where not created with a clustered index. What is the best automated method for converting these heaps? Since ...