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)

0
votes
2answers
185 views

Query to return fields of distinct values per key

In the process of building a data warehouse we are creating some aggregation tables for a reporting engine. We would like to build a single aggregation table from the fact table that can exist as list ...
3
votes
2answers
341 views

continuously extending a table in SQL Server

We have a large data warehouse database where we continuously get new rows inserted in 5 different tables, at the left-hand side of the b-tree (=at end of the table) This cause a lot of page splits. ...
3
votes
3answers
463 views

Initializing Transactional Replication From two Different Database Backup

I have two different large Database (200GB for each) which I want to replicate their data to a central database (3rd DB). I followed this link and it was very useful for a single database. But my ...
1
vote
2answers
1k views

Transactional Replication: When to delete the initial snapshot

I would like to delete the initial snapshot after I setup transnational replication and everything is working fine. When is it OK to the delete the snapshot that initializes a subscriber?
1
vote
0answers
271 views

Sql Execution Plan - Hash Match

I'm currently working on a Sql Query that's having performance issues. I ran the execution plan and saw the Hash Match has 50% cost and also, doing a index scan. I'm starting to learning about the ...
4
votes
3answers
155 views

How do you see which database on a Server uses most resources

I have a database server with a couple of databases on it. How can I see where any resource pressure may come from? I would like to get a table of: Database Name Batch Requests per second CPU ...
3
votes
2answers
372 views

Grouping Selecting unique values in a single column [duplicate]

Here is my table ID Field1 Field2 Field3 Field5 Field7 357 357 2013-03-07 08:02:02:275 t02 bBCD00103RG 365 365 2013-03-07 08:02:05:307 t02 bR U00103w 374 ...
2
votes
1answer
464 views

SQL Server agent option in SQL Server Express

I am using SQL Server 2008 Express. I don't have SQL Server Agent option in it. How can I enable it? I have searched on internet, but couldn't find anything. Do I need to install anything? Please ...
2
votes
0answers
2k views

MDX: How do I combine/merge/union two Measures dimensions with calculated members?

I am trying to combine two dimensions in an MDX query. SELECT NON EMPTY ( [XXX].[YYY].children ) ON ROWS, NON EMPTY { [Measures].[Dimension1A], [Measures].[Dimension1B], ...
4
votes
3answers
871 views

Restrict range of dynamic ports available to SQL Server

Is there a way to limit the range of dynamic ports available to SQL Server from the database side, or database server side? Our SOP is to use static ports across the network firewall and a vendor is ...
10
votes
1answer
1k views

If a transaction is “committed” , is it then saved for sure?

If a transaction is committed successfully, can I then be 100% sure that it has been written to the database AND to the log files? Can I be sure that the data is SAVED ? Today our log files had ...
1
vote
0answers
799 views

Microsoft SQL server 2012 error 18456 with domain credentials [closed]

I have a SQL server 2012 setup to use windows authentication. Remotely I can connect to "Server A" no problem with domain credentials but when I try to locally connect to "Server A" with SSMS it ...
1
vote
2answers
2k views

Optimizing removal of duplicate rows from recursive CTE query

I need to write a recursive SQL query to fetch multiple projects together with their lineage from the following table: CREATE TABLE #Project ( Name VARCHAR(10), ParentName VARCHAR(10) ) INSERT INTO ...
3
votes
1answer
2k views

How to set identity_insert to on in SQL Server

EDIT: See answer here: http://stackoverflow.com/questions/19119303/how-to-set-identity-insert-to-on-in-sqlserver I get the command set identity_insert table_name on;, but for some reason it is not ...
2
votes
1answer
382 views

Double queue reader or is it still busy?

I came across this line in the verbose log on replication QueueReader Agent job startup. The Queue Reader Agent has encountered the error 'Another queuereader agent for the subscription or ...
-2
votes
1answer
120 views

put number inside database sqle server in arabic format I do not want it in english format I need it in arabic [closed]

I do not want the number in English format I need it in Arabic I am sorry my problem I inserted number in my table in English(e.g 5),but I want to replace it in Arabic format. because I need it in ...
2
votes
1answer
5k views

Cannot use SQLCMD

I have started SQL Server in single user mode like this: c:\....\sqlservr -m When I try to connect to it with SQLCMD -E, I get the following error: Msg 18461, Level 14, State 1, Server SERVERNAME, ...
1
vote
1answer
74 views

why do I have three copies of data/log files per database on same server instance

OS: Windows 7 Professional Database: SQL Server 2008 R2 Standard Edition Just detected by SpaceMonger that, each of my databases on test instance has three copies of data files (.mdf) and log files ...
2
votes
2answers
997 views

Unattended SQL install on a remote machine

My product installation does an unattended install of SQL Server (SQL Server Express by default). I use command line arguments rather than a configuration file, so I'm quite familiar with this ...
4
votes
1answer
2k views

partitioning by datetime vs date vs int performance

I am trying to determine which partitioning strategy will be most efficient for my queries on SQL Server. We know we want daily partitions. The data has a natural DATETIME field in it, so my gut ...
3
votes
1answer
1k views

MS Sql Server Management Studio gives error on start

When i try to connect my sa account on sql server management studio it gives me this error: *ps: the error message is turkish but you will see english version in 3rd image Then i clicked on "Get ...
2
votes
1answer
2k views

Multiple versions of SQL Server on the same development machine

I am consolidating some SQL Servers to simplify administration. I am thinking about a new VM with SQL Server 2005/2008R2/2012 each as a separate named instance on the same machine. This machine will ...
1
vote
1answer
211 views

how to deal with a SSIS 2005 validation error in a script component

Within a script component, a strange error occurs. the (vb.net) code leads to build succeeded as mentioned, build done BUT and that's not really awesome (and, yes, design script was clicked): ...
2
votes
1answer
485 views

Backup and restore FileTable files

I'm preparing to use the FileTable feature in SQL Server 2012, but I'm unclear about how backups work with this feature: Does a full database backup include FileTable files? How would I perform the ...
1
vote
2answers
139 views

Fill Factor Setting and Performance

From what I've read, typically for indexing the recommendation is to leave the fill factor at 70-80, and the logic behind this seems that new data may be inserted into a table between existing values ...
0
votes
1answer
53 views

SQL Server Client configuration via file

Is it possible to configure a SQL Server CLIENT (cliconfg) via file? I'm looking forward to something like tnsnames.ora in Oracle world.
0
votes
0answers
29 views

Does anyone have a recommendation for a single Processor solution enterprise SQL server setup [closed]

I am trying to put together a starting point for the hardware requirements on a basic Redundant Enterprise level Sql server solution that would be connected to a pool of application servers. From my ...
2
votes
1answer
2k views

DBCC loginfo contains thousands of VLF entries with status 2

I've inherited this huge SQL Server 2000 prod database and suddenly the transaction log ran out of space. The transaction log gets backed up every hour but I think over the weekend some existing jobs ...
1
vote
2answers
2k views

Moving data in multiple tables from old database to one table in new database [closed]

I have two SQL Server 2008 databases. One is for my old application (full of data) and the other is for a complete re-write of my application. I want to migrate the data, but I have no idea how to ...
1
vote
1answer
1k views

Wrong error in SSIS - [Execute SQL Task] Error: There is an invalid number of result bindings returned for the ResultSetType: “ResultSetType_Rowset”

I have an Execute SQL task which gives returns only one row with one column - a number. I set my result set to single row. Despite that, the task fails. Why ? How do I fix it ? [Execute SQL Task] ...
8
votes
2answers
1k views

Do natural keys provide higher or lower performance in SQL Server than surrogate integer keys?

I'm a fan of surrogate keys. There is a risk my findings are confirmation biased. Many questions I've seen both here and at http://stackoverflow.com use natural keys instead of surrogate keys based ...
1
vote
1answer
1k views

How to flush SQL Server database from RAM to hard disk?

As part of the nightly maintenance plan, my working MS SQL Server 2012 databases are backup-ed with options of simple recovery and full backup. Transaction log is not backup-ed. Also, at nights the ...
3
votes
2answers
3k views

Snapshot for transactional replication taking too long for large database

I want to establish a transaction replication of a large database (200GB). But when I create the publisher and the snapshot agent starts, it takes very very long time and it sticks on the following ...
1
vote
1answer
5k views

Error on changing ownership of database from Files Page in database properties dialog box

I've restored a database and created a new user(same user from which I've logged in) as db_owner. Now when I wanted to see database diagram got an error Database Diagram support objects cannot be ...
2
votes
1answer
101 views

Will cleaning data cache help to resolve compiler memory pressure?

I currently experience RESOURCE_SEMAPHORE_QUERY_COMPILE waits causing CPU spike 100% that lasts 10-20 mins and disappears only by completely stopping traffic. I figured it could be a memory pressure ...
0
votes
3answers
800 views

Production (20GB+) Database running slowly and timing out

I know the title thread is a bit ambiguous (and my first post here!) but I am having a very severe production database problem. I am not a DBA, though I know how to work with queries and SQL Manager. ...
0
votes
1answer
55 views

Warn about table recreation on table change

By default, if you try to change a table using the designer making any of the following changes, you get an error message: You change the Allow Nulls setting for a column. You reorder columns in the ...
0
votes
3answers
1k views

how to grant select access my sql server

when I exec the syntax to gain the access I get an error that I cant grant permissions to my self. any Ideas please!
0
votes
1answer
931 views

How to create login and logout trigger for client audit?

I need a table to put login and logout information for client not sysadmin,then i can use date to statistic user login/off ration... Can anyone offer me a simple method to create login and logout ...
0
votes
2answers
2k views

Xml stored as varbinary

I'm wondering if I have to store a XML information inside a column (just storing, not for querying ) (SQL SERVER) which Datatype is better to use XML or Varbinary? I did an example: DECLARE ...
1
vote
1answer
723 views

Convert SQL Server query to MS Access syntax

I have this query in SQL Server: SELECT Dated, AccountID, AccountName, Rate, case (when (Credit-Debit) > 0 then Credit-Debit END) as Credit, case (when (Credit-Debit) < 0 then Credit-Debit ...
1
vote
1answer
225 views

Database Tuning Advisor user permissions

I was asked to create an account to use Database Tuning Advisor. I red on technet but I don't understand which permission do I have to give. I tried to login with this new user, but trying to list ...
1
vote
1answer
226 views

How to insert and or update a variable number of records and prevent concurrency issues

I currently have the following stored procedure. However I am seeing some race conditions where I end up with incorrect data which I think is caused because the procedure isn't attomic and it can be ...
1
vote
2answers
264 views

What's the official successor for sp_resetstatus in case of a SUSPECT database?

I have a database that has been marked SUSPECT because the volume that both the data and the log file were on suddenly disappeared (an accident - this is a developer workstation). I tried bringing the ...
1
vote
0answers
461 views

storing arrays or images in a database table

I'm a beginner with both database design and use of forums such as this one so forgive me if I forget to provide some relevant information below. Basically I'm trying to store a set of arrays, in ...
5
votes
3answers
3k views

SQL Server 2005 get execution plan of a overnight stored procedure

There is a overnight job runs long time. I have used profiler to get the trace and identified a statement (in a stored procedure) that takes most of execution time. Now I need to see the execution ...
0
votes
2answers
1k views

Updating an indexed column performance impact in SQL server

I am trying to understand is there any performance impact if I am trying to update a column which is the key column of a non-clustered index in SQL server 2008? For e,g I have a column IsActive in ...
4
votes
1answer
1k views

Failover scenario with principal “hard down”

My company has a failover pair of SQL Server 2005 instances, which provide database availability for a UL-licensed alarm/call center, where uptime and availability are critical for life safety. ...
1
vote
0answers
103 views

MS SQL Server: Can Unicode columns include non-unicode values?

I need to convert UNICODE column values from UTF16-LE to UTF-8 to then import into MySQL. Is it safe to assume columns of NVARCHAR, NTEXT, NCHAR, BIT, INT, DECIMAL, FLOAT, and DATETIME all MUST be ...
3
votes
1answer
442 views

Is it possible to filter the list of databases in the Object Explorer of the SSMS?

I know how to filter the list of tables - using the filter icon. However, this icon is disabled when the Databases node is selected. Still, I am wondering whether it is possible.