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)

1
vote
2answers
2k views

Protect SQL Server from hackers

Today, my SQL Server 2008 is attacked by hacker from IP address in China [4300 Login failure in last 7 hours]. I contacted GoDaddy support and below is what they told me. EXEC sp_readerrorlog 0, 1, ...
4
votes
1answer
284 views

Minimal Logging Conditions in SQL

I have written a script to test out the claims made on this page http://technet.microsoft.com/en-us/library/dd425070(v=sql.100).aspx in the table titled Summarizing Minimal Logging Conditions about ...
1
vote
3answers
483 views

How to determine if SQL Server will not execute parts of the script in parallel?

Are there any general rules or maybe easy way to tell if SQL script will execute in batches instead of "all at once"? USE UserDB; GO DBCC SHRINKFILE (DataFile1, 5); GO DBCC SHRINKFILE (DataFile2, ...
1
vote
1answer
766 views

Can't restore Azure bacpac into localdb with SqlPackage

I have made a backup of my SQL Azure in a bacpac file and when I try to import the bacpac in localdb it always fail. Here is the command I use: PS C:\Program Files (x86)\Microsoft SQL ...
8
votes
5answers
7k views

Freeing Unused Space SQL Server Table

I have a table in SQL Server Express with a lot of unused space. I need to free up space in the database. | NAME | ROWS | RESERVED | DATA | INDEX_SIZE | UNUSED | ...
4
votes
2answers
3k views

GROUP BY with MAX versus just MAX

I am a programmer, dealing with a big table which the following scheme: UpdateTime, PK, datetime, notnull Name, PK, char(14), notnull TheData, float There is a clustered index on Name, UpdateTime ...
4
votes
3answers
1k views

Is SQL Server's FILETABLE suitable for storing large files (bigger than 10 GB)?

There is a project for lab. The requirement to save the lab data (raw data and related infomation ) for research for years. So the data must be saved for years, but the data is so big, every raw ...
1
vote
1answer
718 views

DB Mirroring in async/High Performance mode: Available in SQL Server 2008 Standard Edition?

This should be easy, but the MS docs are not clear. The docs: http://msdn.microsoft.com/en-us/library/cc645993%28v=SQL.100%29.aspx Indicate that in Standard edition, the only supported mirroring is ...
2
votes
3answers
483 views

Sql server - Rebuilding Indexes - Does it affect foreign keys?

i am looking at speeding up the performance of my database, and thought that Rebuilding some indexes might help. My question is, will this invalidate Foreign Keys from other tables pointing to the ...
2
votes
4answers
345 views

SQL Server: Database integration and synchronization

I have n SQL Server databases with the same data schema. On the other hand i have a web application that needs to retrieve, for some entities, the union of the information stored into the n ...
0
votes
1answer
80 views

Should I use backup compression for databases where all data is already compressed?

In SQL server with enterprise edition, there are databases with all the tables/indexes compressed. Does it still make sense to do compressed backup?
1
vote
1answer
2k views

MS SQL Server accepts non-SSL connections even with Force Encryption enabled on the server side

I am forcing encryption on my MS SQL server. My intention is to reject any client connection that does not use SSL to connect. Am I on the right track? Here are my detailed steps : makecert -r -pe ...
0
votes
1answer
101 views

Infraestructura DBA [closed]

Well, I'm newbie, now only to realize at the nick. I am developing an online system, which will have information from several companies. Each company has its desktop system with the local database. A ...
1
vote
1answer
338 views

Easier way to change every user in every database to default schema = dbo?

There was recently a domain migration where our SQL Server is hosted. I have two servers and about 30 DBs on each. Every user was changed to the new domain but in doing so, their default schema ...
0
votes
1answer
957 views

Installing SQL Server 2008 R2 Express on Server 2012 - Could not load file or assembly

I'm trying to install SQL Server 2008 R2 Express Edition SP2 on Windows 2012 server. The error is: Any clue?
1
vote
1answer
2k views

SQL Server 2008: High CPU historical queries

We have a SQL Server with 15 databases on it. This is used by many users in each database simultaneously. Recently we started getting high CPU alerts from this server. When the alert comes, I can ...
1
vote
0answers
74 views

How to manage primary key while updating [closed]

In the following table primaryKeyColumn is primary key. To maintain the data history I always uses the values with WHERE condition(WHERE StatusColumn=1) And will set the StatusColumn to 0 if the data ...
0
votes
1answer
189 views

SQL Server Index Scan Actual Executions

I have a fairly complicated query and running it on two databases with same schemas, but with different data produces different result. On database D1 the elapsed time is around 1 second, and the ...
0
votes
1answer
852 views

SQL Linked Server Passing Date Parameters

I'm using SQL Server 2008 R2 and have a linked SQL 2012 Express database. On the 2008 box I am creating a stored procedure to be used in a report. I am wanting to pass a date variable so the user ...
0
votes
0answers
120 views

Expanding the database in SQL Server 2008 R2

I have a database server DBA with .mdf and .ldf files on a SAN. Often one of my database will not list out the tables (unable to extend the db), Every time I have to take it offline and bring back ...
1
vote
5answers
4k views

How to delete the remote files older than N days on schedule from SQL Server 2012 (with SqlServerAgent job)?

Struggling to execute PowerShell commands in SqlServer Agent job of MS SQL Server 2012 R2 (Windows Server 2008R2, Windows 7 Prof) I need to delete (.bak files older, than, say, 7 days in remote ...
1
vote
0answers
147 views

Why does removing a RID by creating a clustered index lose parallelism and slow down execution by 2X

If I remove a RID lookup by replacing 2 non-clustered indices (non unique) with 2 identical clustered indicies (non-unique) where there weren't any before, why does this query slow down by a factor ...
0
votes
2answers
808 views

Grant a login of Sql server authentication the same permission of a Windows group login with Windows authentication?

Update: I am trying to make it easier for the login to have the permissions on multiple databases. I already have a Windows group login with Windows authentication. The Windows users in the group can ...
1
vote
1answer
188 views

How to find what prevented in getting a lock?

Sometimes my update statements fail after 3000 milliseconds with 'Lock request time out period exceeded' error. That 3000 limit is coming from my application through SET LOCK_TIMEOUT 3000 setting, ...
0
votes
1answer
516 views

Kerberos Authentication Issue

I'm getting these errors when testing a linked server from SQL Server 2012 to SSAS 2012 (both servers are Windows 2012 and clustered) "An error was encountered in the transport layer" and "The peer ...
3
votes
2answers
153 views

Restore database to a instance in network

We are creating a application which requires sql database as backend to store data. So when user install my application he chooses a sql instance and its details. There we plan to restore the database ...
2
votes
1answer
119 views

Time Boxing SSIS Task

I've an SSIS task which download a couple of files,update various Database tables and archive the files(i have it split in various packages). The average time to completion is about 2.30 min. ...
1
vote
2answers
106 views

Create users in SQL Server 2012

I created a new login and a new user and I mapped a database in SQL Server 2012. In the login properties in Securables, we selected permissions "deny" for "View any database" for the user to see only ...
19
votes
3answers
1k views

Index on Persisted Computed column needs key lookup to get columns in the computed expression

I have a persisted computed column on a table which is simply made up concatenated columns, e.g. CREATE TABLE dbo.T ( ID INT IDENTITY(1, 1) NOT NULL CONSTRAINT PK_T_ID PRIMARY KEY, A ...
2
votes
1answer
107 views

How can I change Referential Integrity from a Unique Key Constraint to a Primary Key?

(without dropping foreign keys) I have migrated a SQL Server CE database to SQL Server 2012, however, referential integrity was enforced via unique key constraints on the surrogate INT identity ...
0
votes
1answer
93 views

In sys.dm_os_memory_cache_entries view, what does original cost mean?

Looking at a couple of DMVs, and trying to see if I can programmatically figure out the cost of the cached plans in my SQL Server. I'm hoping that column represents the same concept of cost that is ...
5
votes
1answer
407 views

Passing a literal ? to sp_MSforeachdb

I am trying to search for the ? character in a string, but across all dbs on a server. Since the ? mark is a placeholder for the database name, how may I format the query so it knows I mean to search ...
1
vote
1answer
207 views

Should I extract / normalize the mailing address despite requirements limiting number / type of addresses?

I currently am working on a contacts application (similar to Outlook contacts combined with eVites and LinkedIn). The requirements for the application are to limit the addresses (and phone / email ...
1
vote
2answers
7k views

SQL Server 2005 Express on Windows 8

I need to install SQL Server 2005 Express on Windows 8 Home Edition x64. But I get a compatibility error! I have tried SP1, SP2, SP3 of SQL Server 2005. Visual Studio 2008 is working fine. Any ...
2
votes
2answers
8k views

How to Fix log_reuse_wait_desc=LOG_BACKUP? LOG Backup not possible

I checked sys.databases to find out which databases need LOG backups. It surprised me that I had quite a few where log_reuse_wait_desc=LOG_BACKUP meaning, the JOB I have set up to run LOG backups on ...
1
vote
1answer
576 views

Securely deleting data from SQL Server logs

Is there a good way to purge data from a particular DB's *.LDF? A little background... I'm a SysAd, not a DBA. I'm running SQL Server 2008 R2 for one of my applications and I'm not particularly ...
0
votes
3answers
307 views

Force spool to avoid creating temp tables?

I have the following query which join pivoted data of several very big tables and it runs very slow. I tried to created the temp table for each pivoting and it runs much faster. Is it a way to force ...
1
vote
1answer
79 views

Can I change the default settings for SQL Server Replication

Is there a way to change the default setting in SQL Server replication? Example when I create an new article I want to have the create Non-Cluster set to true all the time.
3
votes
1answer
2k views

How to figure out what a DTSRun command is doing

I have taken over a SQL 2000 database. I am trying to figure out what a job is doing. Its command is: DTSRun /~....a big hex string.... I have tried to run: DTSRun /~....a big hex string.... /!Y ...
3
votes
3answers
5k views

How do I move SQL Server database files?

I have a database and want to move the .mdf and .ldf files to another location. But I do not want to stop the MSSQLSERVER service, and I do not want to export to another server. How can I do this?
6
votes
2answers
300 views

How to optimize NOT IN statement

Why does NOT IN performs INDEX SCAN instead of INDEX SEEK? Here's my current index on the table, CREATE NONCLUSTERED INDEX [idx_dmcasarms_CourseList_cDesc] ON [dbo].[courselist] ( [c_desc] ...
0
votes
0answers
52 views

Is there a quantitative method to follow to determine FILLFACTOR for NONCLUSTERED INDEXes?

I've read different ideas to set FILLFACTOR and then monitor fragmentation over time (#1: 5 Things About Fillfactor, #2: Database Maintenance Best Practices Part II – Setting FILLFACTOR). Instead of ...
3
votes
3answers
470 views

Is database partitioning for performance reasons meaningful in a virtualized environment?

When running SQL server on physical hardware, placing database data and log files on separate disks or RAID arrays can benefit performance, resilience, and maintenance. Partitioning the database over ...
0
votes
2answers
179 views

Sql Server Agent fails to run batch from desktop

I’m using SQL Server 2008 and running a batch file from SQL Server Agent. The batch file is located in my desktop. When I try to run the job I get an error: “access is denied.” The batch file runs ...
6
votes
1answer
402 views

DTUTIL performance slower in SQL Server 2012?

We've noticed that since deploying Windows 2012/SQL Server 2012, the performance of DTUTIL has decreased. DTUTIL.exe consumes 50% on each of 2 cores on an 8 GB VM. The same syntax against Win 2008 ...
1
vote
0answers
174 views

Is it possible to configure Reporting Services to emit browser compatibility headers?

We have a dashboard that hosts some Reporting Services (2008) reports within frames. The dashboard runs in the browser's standards compliance mode, but this is causing some of the reporting services ...
5
votes
2answers
4k views

Limit CPU usage without Resource Governor

We have an SQL Server 2008R2 Standard Edition with several databases belonging to different applications on a 16 core server. One recently introduced application is regularly executing expensive ...
1
vote
3answers
145 views

How to create implicit select statements

I need to create an implicit select statement for each table with all of its coluns - i.e. SELECT COL1, COL2, COL3 FROM TABLE1 instead of SELECT * FROM TABLE1. There are too many tables to use the ...
0
votes
1answer
202 views

Data Sync between servers with different schema in SQL Server [closed]

I have two servers 2008 R2 and 2005. The e-commerce site has been running with 2005 Server i has migrated 2005 server data with modified data schema to 2008 R2 from yesterday's date of data. My client ...
1
vote
1answer
47 views

Adding the domain account to a security group on the SQL Server computer that has sufficient privileges to log on as a service

After reading this article, http://www.red-gate.com/supportcenter/content/knowledgebase/SQL_Backup/KB200710000173 I have some problems configuring point 2) and 3): 2) Create a SQL Server login that ...