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)

6
votes
2answers
335 views

ROW_NUMBER() without PARTITION BY still generates Segment iterator

I'm writing on an upcoming blog post of mine on ranking and aggregate window functions, specifically the Segment and Sequence Project iterators. They way I understand it is that Segment identifies ...
4
votes
3answers
134 views

SQL Server migration using a replica

I want to migrate a fairly big SQL Server instance (100 GB+) to a cloud machine. I don't think the attach/detach method will be a good idea. Because sending big files over the internet would take a ...
1
vote
1answer
47 views

Best practise how to sync SQL Server 2014 database with other database

What is best practise if we have application using a SQL Server database and we would like to have backup if SQL Server does not work? Our scenario: We would like to use our main SQL Server ...
-1
votes
0answers
38 views

Microsoft SQL Server 2012 Express Edition upgrade it to Microsoft SQL Server 2012 Standard Edition [on hold]

How to upgrade Microsoft SQL Server 2012 Express Edition (64-bit) to Microsoft SQL Server 2012 Standard Edition (64-bit) ? Purpose of doing is Express will not supporting Mirroring. Thanks
0
votes
0answers
23 views

Default value for SQL Server CE 4.0 column

I am writing a tool to convert a system from XML data files into a SQL Server CE format. Not the most efficient way to do this, but essentially it will be digesting XML files created by another ...
1
vote
1answer
48 views

Can AlwaysOn cross domains?

Is SQL Server 2014 capable of having AlwaysOn set up across multiple domains? If not, is there a third party tool you can recommend to mirror a 13TB (and growing) database across domains? Thanks in ...
3
votes
2answers
80 views

SQL Server 2008R2 XML Column Index strategy for large tables?

I am working with SQL Server 2008 R2 and some XML columns in a very large table. I understand that I cannot use Selective XML Indexes due to our SQL Server version being < 2012. I'm brand spanking ...
0
votes
1answer
68 views

Replication Madness

Summary We were contracted to build a "Hot-Standby" for a company which keep their data in the cloud. The through-put is relatively low. Database availability/accuracy is a matter of life or death. ...
2
votes
2answers
80 views

Is it possible for increasing the SQL Server max memory limit to degrade performance?

As far as I can tell, raising the SQL Server max memory limit has no drawbacks, provided that sufficient memory is left for the OS and other applications. Assuming this is the case, can there be any ...
4
votes
1answer
263 views

Dropping a table with powershell

Trying to delete an existing table using powershell $srv = new-Object Microsoft.SqlServer.Management.Smo.Server(".\CEF_2014_1") $db = New-Object Microsoft.SqlServer.Management.Smo.Database $db = ...
2
votes
0answers
41 views

Why could a SQL Server table grow far quicker than the data to it?

I've got an audit table in SQL Server 2008 R2 that has the following structure: CREATE TABLE [AuditInstance]( [oid] [int] NOT NULL, [AuditTransactionOID] [int] NULL, [pid] [int] NOT NULL, ...
0
votes
1answer
36 views

How to verify a SSAS Backup and how to perform Integrity Checks in SSAS?

I have a procedure to backup SSAS Databases that is working successfully. I also delete the SSAS backup files that are older than 2 days. What I am looking forward to implement is: 1) How to verify ...
0
votes
1answer
45 views

Delete duplicate records by column 1 but having differ values in column 2 and column 3 [closed]

I have a table like: SSN FName LName 1 a b 1 a b 1 b b -------------> to delete 2 c d 2 c d as above example I want to delete such records where SSN has different values in ...
0
votes
1answer
23 views

SQL Server job - powershell Where does “log to table” save logs

After selecting the "log to table" option and running the job, when I come back to this screen and select View, I can see the output of the powershell script in a text file. The only job step is a ...
1
vote
1answer
62 views

Create nonclustered index on uniqueidentifier type

CREATE TABLE [dbo].[session] ( [id] [int] IDENTITY(1,1) NOT NULL, [user_id] [int] NOT NULL, [session_id] [uniqueidentifier] NOT NULL, [supervisor_id] [int] NULL, some columns .. ...
1
vote
2answers
68 views

Is attaching a database on the same server under a different database name possible?

I recently offered to help a friend with some development. She isn't a technical person and it turned out what she needed was more a DBA/SQL developer. She gave me the IP and password to this server. ...
0
votes
1answer
52 views

why is my trigger called even when the underlying table didn't change?

I have a quite basic trigger defined as such: CREATE TRIGGER dbo.foo ON dbo.bar FOR INSERT, UPDATE, DELETE AS ... I also have a stored procedure which at some point does something like this: ...
3
votes
1answer
84 views

Simulate more RAM with SQL Server

Background: I'm in the process of optimizing a Data Warehouse style query with big dimension tables. The optimizer does not like to pick the typical star schema join plan at the moment. When I force ...
0
votes
1answer
13 views

I couldn't see Conflict tables in replication monitor SQL Server 2008 R2 in Merge Replication

I work with merge replication in SQL Server 2008 R2. In the replication monitor I can't see conflict table, I must to see conflict tables in "MSmerge_conflicts_info", please help me. How to see ...
5
votes
3answers
87 views

How To Strip Hebrew Accent Marks

I need a Char Encoding Trick to Strip Hebrew Accent Marks. Sample Before בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ Sample After בראשית ברא אלהים את השמים ואת הארץ
1
vote
0answers
23 views

Export hierarchy tree in a specific way

I need a big help. I have two tables (SubCells and Codes) and Visually it looks like this (We can count an order) And i need to get this final result (with SQL or even a C#) How can i do ...
2
votes
1answer
119 views

Column name or number of supplied values does not match table definition error

I have a table, with two foreign keys defined on two columns of that table. The problem is that, when I insert the values from SQL Server, I get an error: Column name or number of supplied values ...
7
votes
4answers
223 views

Transaction Log won't shrink, DB thinks it is replicating

I've got a SQL Server 2008 R2 Express database running Kaspersky Security Center, and I have no idea under what circumstances the install happened, but the database appears to think that it's being ...
0
votes
0answers
30 views

Accessing SSRS receive System.UnauthorizedAccessException

Trying to log into localhost/reports I get the following error on the screen. An internal error occurred on the report server. See the error log for more details. (rsInternalError) Access is ...
0
votes
1answer
32 views

SQL Server 2008R2 - how to install replication components

I am trying to install the Replication components for SQL Server 2008R2, on technet website it says: On the computer that is running IIS, insert the SQL Server 2008 R2, SQL Server 2008, or SQL ...
2
votes
1answer
128 views

InnoDB inserts 100 times slower than SQL Server inserts

I have a simple table with two columns: id (autonumber) and name (char(255). When I use C# to insert 100 records in a loop it takes about 30 milliseconds per insert. This is way too slow. So I ...
0
votes
1answer
73 views

SELECT with lots of left join is very slow in SQL Server 2014

I've got a query with, more or less, this structure: SELECT MAINTABLE_ID FROM MAINTABLE WITH (NOLOCK) LEFT JOIN TABLE_1 WITH (NOLOCK) ON TABLE_1_FK_MAINTABLE_ID = MAINTABLE_ID LEFT JOIN ...
1
vote
0answers
15 views

How to create a “match result” data type?

I'm building a football match table which contains one column "match result", which should consist of data like "3-1","0-0"... I'm wondering what kind of data type is best appropriate for it, varchar ...
1
vote
1answer
166 views

Why is casting a string to DATETIME not accurate to the ms? [closed]

Why does SELECT CAST('2014-11-28 15:06:02.165' AS DATETIME) return: 2014-11-28 15:06:02.167
1
vote
2answers
95 views

How to find what frequent and/or large transaction have taken place in MS SQL Server?

Each day is experiencing about 1GB sum total of all the transaction log backups that day, while at the end of that week the Full DB backup is about 180MB. For a business database for buying/selling ...
0
votes
0answers
34 views

SSIS cannot access the file

I have a SSIS package which performs a few tasks using SQL Server Agent. First it executes a script task, then accesses Excel files, executes a SQL query and moves files to another directory. The ...
0
votes
0answers
19 views

How can I copy a database from Sql Server to Azure Sql Database?

The local database has settings that Azure will not accept and that we must keep in the local copy. I tried using SSDT and with that I could publish to a new database on my local Sql Server a schema ...
2
votes
2answers
127 views

SQL Server doesn't use expected index

I have the following query (simplified from an Entity Framework query, I don't have direct control of the SQL): SELECT TOP 15 HouseHoldingRuns.Id, ( SELECT TOP 1 ManCoId FROM ( SELECT TOP ...
2
votes
2answers
73 views

Adding around 200 rows in a table grows size of the table by 400kb where avg row size is 0.2KB

We are running into an issue where if we look at the avg row size (0.2kb) x number of rows (200) inserted in one of our table, the size should grow by around 40 KB. However the total used space has ...
1
vote
1answer
62 views

Need to Send a formatted HTML Email via Database Mail in Sql Server 2008 R2

My requirement is to create the automated email as ( A formatted HTML Email via Database Mail) The basic requirement has been completed where when the Job is triggered it inserts the data into a Table ...
1
vote
1answer
16 views

Get trigger query using query analyzer

I have a server in which there is no SSMS installation, and only query analyzer is available. And all I need to do is find the trigger information (basically trying to find out what that trigger ...
0
votes
1answer
46 views

Columns count in SELECT query and SQL Server buffer cache

Let's assume that I have a table with 30-50 millions records. It has ~40 columns. Currently when I request data it always requests all columns because of legacy ORM that we use. I know that if we ...
3
votes
1answer
53 views

Help with indexing narrow table with many millions of rows

I have a good amount of experience with SQL Server, but not much with indexes and I fear I'm a little bit out of my depth in trying to figure out how to correctly structure a table that has 100+ ...
2
votes
4answers
139 views

Getting new and updated data with an archive column

I am trying to optimize an SSIS package that retrieves data from a very large transaction table that gets millions of new records daily. The data is being collected from several hundred field servers ...
0
votes
1answer
35 views

How to move data from SQL Server to MySQL database

Our MSSQL database has a table that has about 4 million rows of data. My original plan was to copy it over to a MySQL database and place it in a more optimized format. For some reason, the people ...
2
votes
1answer
81 views

Query shows SELECT 0

I'm looking through the queries being executed by a third party application. The application was flagged as being slow by some of our end-users. It seems to INSERT records into a HEAP, then DELETE ...
-1
votes
1answer
96 views

EXCEPT operator vs NOT IN

The EXCEPT operator was introduced in SQL Server 2005 but what is the difference between NOT IN and EXCEPT ? Does it do the same? I would like a simple explanation with an example.
1
vote
1answer
183 views

Setup error :Attempted to perform an unauthorized operation [closed]

Below is the detailed error message. I can't proceed with installation for the last one week. I've given full rights to registry keys that are associated to SQL Server but nothing has worked out. For ...
0
votes
1answer
73 views

EXEC Multiple procedures in parallel?

SQL Server 2008. I have several stored procedures. I would like to execute them all in parallel, not serially. How can I do this?
2
votes
2answers
44 views

Changing SQL Server service account passwords enterprise-wide

In the event of a DBA leaving an organization, what options can the surviving team members pursue to change passwords for service accounts portfolio-wide? While using Configuration Manager appears to ...
3
votes
1answer
124 views

dbcc memorystatus - buffer pool target on VM higher than max memory

I'm doing some digging into potential memory/configuration problems on a sql server 2012 SP2. I stumbled upon something that seems a bit strange in the performance counters as well as the dbcc ...
0
votes
0answers
24 views

preventing FullTextSearch from using wildcards

I am using FTS in a sql2008 sql server and had a user complain about some searches breaking. after root cause analysis we found only searches like U.S.A. fail because FTS tries to run wildcard matches ...
2
votes
1answer
22 views

How to get the spatial index in CREATE TO script?

Is it possible to get the spatial index using the create to script using SQL Server 2012? When I write out a table using SCRIPT TABLE AS > CREATE TO in Microsoft SQL Server Management Studio 2012, I ...
0
votes
1answer
26 views

Forget login from connection drop down menu [duplicate]

Recently I logged myself as a different user (testUser) but now that user seems to be persisted in the drop-down menu of connection dialogue box and I couldn't find a way of getting rid of it. Even ...
3
votes
1answer
161 views

resource wait SQLCLR - wait_type CLR_SEMAPHORE by SPID 0

UPDATE In the comments under Aaron's post is an extensive explanation why I want to find this out, please read it if you want to know. The system is running some ETL, reporting services and a ...