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
1answer
893 views

In SQL Server, how to launch a python script from an insert trigger? [closed]

We have a nice piece of python that sends some emails and interacts with a cloud system. Works fine. But we have to fire it every few minutes to poll the db. We really need, for business purposes, to ...
4
votes
2answers
453 views

Why can't I view the SQL Server database created by a web application?

I have an ASP.NET MVC web application deployed to IIS on a Windows Server 2012 machine. When the application first starts, it will create the database and tables it needs if necessary through Entity ...
3
votes
0answers
51 views

How do i Optimize/Improve ram while running a massive import into sql server [duplicate]

I currently am importing a massive database of around 180 million records with roughly 300+ columns. I am sure you are all aware this takes a very long time. I am using sql server on a windows server ...
1
vote
2answers
73 views

Recommended best practice for server naming [closed]

We're currently in the process of upgrading to SQL Server 2012, in the past all servers have been installed with a naming convention which contains a "-" in the middle i.e. TS-DBL01 I'm trying to ...
8
votes
3answers
284 views

“When a connection is closed and returned to the pool, the isolation level from the last SET TRANSACTION ISOLATION LEVEL statement is retained”?

The MSDN online article "Snapshot Isolation in SQL Server" states: "An isolation level has connection-wide scope, and once set for a connection with the SET TRANSACTION ISOLATION LEVEL statement, ...
4
votes
1answer
107 views

Why do row-versioning isolations use a linked list of versions of record? [closed]

Trying to better understand row-versioning based transaction isolations in SQL Server... According to Kimberly L. Tripp, Neal Graves's "SQL Server 2005 Row Versioning-Based Transaction Isolation": ...
6
votes
1answer
96 views

Does RCSI use less or same space than SNAPSHOT? Why?

Trying to better understand row-versioning based transaction isolations - RCSI (Read Committed Snapshot Isolation and SNAPSHOT) - in SQL Server... MSDN online article "Choosing Row Versioning-based ...
7
votes
1answer
437 views

Specific TempDB insert of UserDB select results in SOS_SCHEDULER_YIELD to ENCRYPTION_SCAN

One of our production systems has exhibited a problem with a single insertion statement into a temp table from our user database. When I comment out the insert/select, the stored proc in question runs ...
4
votes
1answer
1k views

Optimising a query against sys.fn_dblog

Looking for assistance improving a query. This query is used to review the last N transactions in the LDF file and then add some useful information like the user, start time, query text, etc.. Here ...
2
votes
1answer
197 views

Can I limit the time a table lock is being held server side?

I have a SQL Azure server with some stored procedures with TABLOCKX hints that I call from C# code on a Windows Azure web role VM. I'm kinda paranoid about those hints - what if there's some network ...
4
votes
3answers
114 views

Enforce Schema-bound views

For reporting purposes, I need to be able to query dependencies between views and underlying tables at column level (via sys.sql_expression_dependencies). One way to get SQL Server to store ...
3
votes
0answers
901 views

High CPU in SQL Server supporting SharePoint databases while running FAST search crawl

I have a a SQL Server 2012 (SP1) #cu5 (X64) instance used as SharePoint 2010 back end and for the most part use only 10 - 30% CPU but there is a high CPU usage when running FAST search crawl(both ...
-1
votes
1answer
719 views

Is my SQL Server 2000 connection string compatible with SQL Server 2012?

Currently I have an application in Visual Basic 6. This application connects to a SQL Server 2000 server using a Data Link file (.UDL) through the OLE DB provider for SQL. The server will be ...
8
votes
1answer
278 views

Does SQL Sentry Plan Explorer count the reads in UDFs?

I have a query like this: select dbo.fn_complexFunction(t.id) from mytable t In SQL Sentry Plan Explorer, I noticed I have to run Get Estimated Plan in SQL Sentry to make the Query Plan include the ...
1
vote
0answers
2k views

MS SQL Server - Login timeout expired

I am doing this tutorial of Microsoft: Basic Data Mining Tutorial http://technet.microsoft.com/en-us/library/ms167167.aspx I am using SQL Server 2012 and SSIS - SQL Server Integration Services but I ...
1
vote
1answer
55 views

Changes to main Database during Transactional Replication

Can you please advise how can I keep slave database up to date while it's in transactional replication with master. I mean what If I change indexes, columns, tables or sthm else in master dabase? ...
6
votes
1answer
252 views

sql server auto statistics in data warehousing scenario

I have a relatively large data warehouse in SQL Server (200 GB). I have been experiencing really show execution times of a certain query (12 hours for a simple delete query with an inner join). After ...
0
votes
1answer
274 views

Can we set LOCK_TIMEOUT instance- or database-wide?

It is possible to change the SQL Server's default (which is -1 or indefinite period of time) LOCK_TIMEOUT value session-wide. Is it possible to set LOCK_TIMEOUT default value server-, instance- ...
0
votes
2answers
102 views

Backup and truncate LDF with xp_sqlmaint

A job is backing up an LDF with the following command: EXECUTE master.dbo.xp_sqlmaint N'-PlanID <the id> -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpLog "\\server\sqlbak$" -DelBkUps 6HOURS ...
2
votes
1answer
384 views

Interpretation of a column in SQL Server profile trace

In a trace table generated by Profiler I tried to determine the origin of a lock using the column ObjectID2 joined to sys.allocation_units. The results are not good. It identifies many tables that ...
0
votes
1answer
160 views

Active directory automatic login to SSRS

I have a server running SSRS 2012 at address server1.olddomain.com. This is working fine. My users will be accessing this server from another address (the server is not physically moving). The new ...
0
votes
1answer
900 views

Help with Transferring Linked Server to another server?

Please advice me as I'm trying to move the linked server (Providers with the tables in Catalogs) from SQL server 2005 to another upgraded sqlserver 2008, I scripted out everything from there, but not ...
1
vote
1answer
50 views

How to document an archived database? [closed]

You've stored the backup file in a safe place, but what kind of info do you store with it? database type (SQL Server) compatibility level (SQL Server 2008) application name application owner ...
0
votes
1answer
186 views

Creating plan guide for query called through sp_executesql

To make a long story short, I have a view called vwRelatives which uses CTE recursion to build family trees. It's meant to be queried for a single person at a time. This runs in about a quarter ...
1
vote
1answer
103 views

How do Identity Columns get Replicated?

During Transactional Replication, we have data going from Server A to Server B. Say we were to reseed an Identity Column on a Table on Server A (for whatever reason), how would this affect the data ...
1
vote
2answers
133 views

Empty SQL Server 2000 LDF File

I have a 1 GB .LDF for a test database which I want to shrink right down. I am happy to delete its contents if needed. How can I do this for SQL Server 2000? I have tried the following to no huge ...
0
votes
1answer
58 views

best practices indexed views computed columns [closed]

I have a some data in one table which has rules about its validity stored in another table. The combinations leading to a valid / non valid bits and or dates being returned are quite complex but very ...
1
vote
1answer
94 views

Server audit with more than 1.000 entries

On my Mssql 2008r2 I created a server audit for all login and logout: USE MASTER GO CREATE SERVER AUDIT audit_test TO FILE (FILEPATH = 'D:\Audit') GO ...
0
votes
1answer
1k views

SQL Server is started but didn't listen on any port

I newly installed SQL Server 2012. No database created yet. And I can open the Management Studio with sa/password. The Binn\sqlservr.exe is started as a service and I can see it started in the service ...
0
votes
2answers
54 views

How to set up where to store data in SQL Server

My C:\ drive has a size of 99GB and my D:\ drive has a size of 2TB Here comes the problem: where does SQL Server store data in the database? Can I control it? Actually, my C:\ has been full of data ...
0
votes
0answers
99 views

How do i replace DENSE_RANK() with a SEQUENCE object

I have the following select DENSE_RANK() OVER (ORDER BY A, B) AS C from ATable this select statement does the job but I have been told to replace it using a sql SEQUENCE object. Does anyone know ...
2
votes
0answers
653 views

Microsoft Sql Server 2012. 100 000 000 rows table select/insert performance [closed]

This is first time i am working with huge database ( 100 million rows in table Events). Use case here is to quickly select and insert x and y for selected Organisation and datetime. My database ...
0
votes
1answer
611 views

Deleting Record from Linked Table Slow in MS Access

I have a Microsoft Access database that is linked to a SQL Server 2000 backend. It has one form with several subforms, all using information from linked tables. When I try to delete a record from one ...
1
vote
2answers
769 views

What is index fragmentation percent a percentage of?

So I am familiar with the concept of index fragmentation and how to fix it but I'm not really sure of one specific item: When you look at index fragmentation, it's always reported in terms of ...
0
votes
2answers
396 views

Hierarchy of Employee “names” with CTE: Cannot create a correct version

I am trying to create the correct structure of my sql (CTE) query, but I can not. This is a version I want to have . And this is my current version: . As you can see there are duplicates and i have ...
0
votes
0answers
52 views

Have non clustered index but no clustered index [closed]

If a table have two columns say (say Id and Name) has only non clustered index on name column but no clustered index, then what happens to performance of the table ?
1
vote
1answer
474 views

Import XML data retaining while creating ID's with relationships

I need to parse XML from a file into tables while retaining their relationships through custom-generated ID values. IE, if I had the following XML: <root> <construction> ...
1
vote
0answers
49 views

Multiple backups during the night but only one instance of the maintenance plan [closed]

FIRST THING FIRST: I'm a C# developer, I'm the only person here that know how to manage an SQL server, but I met my limits on this one. Thank you in advance for your help. I'm not sure if my title is ...
1
vote
1answer
214 views

Language difference in full text search for numeric strings

If I create this table on SQL Server 10.50.2550 (SQL Server 2008 R2): CREATE TABLE test( id BIGINT IDENTITY NOT NULL, number VARCHAR(10), CONSTRAINT test_pk PRIMARY KEY (id) ); CREATE FULLTEXT ...
2
votes
1answer
56 views

Why - read but not update ops fail in case of lacking space in tempdb database?

MSDN online article "Choosing Row Versioning-based Isolation Levels" states: "tempdb must have enough disk space for the version store. If there are very long-running transactions, all the ...
1
vote
1answer
936 views

Fastest mechanism to move data between tables in SQL server

We are building a data warehouse. For some of our target tables, the only way to manage the process correctly is to re-transform all the data every time something changes. Currently we do this using ...
8
votes
1answer
1k views

SQL Server's READ COMMITTED SNAPSHOT vs SNAPSHOT

I was researching the differences between SQL Server's READ COMMITTED SNAPSHOT and SNAPSHOT isolation levels and came across the following resource: Choosing Row Versioning-based Isolation Levels ...
1
vote
2answers
37 views

SQL Server Redundancy without Client Application Changes [closed]

We have a custom .NET build application that has different clients which access the DB residing on SQL Server 2005 Standard. Now we want to add another SQL Server to create redundancy so that in case ...
1
vote
1answer
95 views

Are string columns with very few different entries automatically compressed?

We have a table which contains a column with only a dozen different strings in it. Is there anything I need to do in order to get the DB to compress this information? We don't have too much disk space ...
3
votes
2answers
2k views

Using SQL Server SMO with a Port number

In SSMS if you are connecting to SQL Server instance set to specific port other than 1433 you simply put ",port number" after the instance name. In the same regard if I am using ...
1
vote
1answer
54 views

Why did my indexes drop in size?

I've got the following SP which I wrote to calculate the size of all the tables on my database SELECT name,dbo.nice(rows) as [rows], dbo.nice(CAST(total-indexes as DECIMAL)/1024) as [data ...
0
votes
0answers
596 views

How to determine if SQL Server Reporting Services database is being used?

I have a SQL 2005 server that needs to be decommissioned. For regular databases, I have a couple scripts that look at sys.dm_db_index_usage_stats to determine last access. My normal process is to make ...
1
vote
1answer
493 views

Why isn't SQL Server using the Max Server Memory setting?

I have a SQL Server machine with the following: Windows 2003 Enterprise SP2 (32-Bit) SQL Server 2005 (32-Bit) 12GB RAM /PAE switch set in boot.ini 6 SQL instances, all with AWE enabled No other ...
4
votes
1answer
810 views

Using SQL Server 2012 Standard with Bitlocker

We're trying to use Bitlocker to secure an SQL Server 2012 database. We don't have any issue getting bitlocker to work... the issue we have is that once the drive is locked, SQL Server can no longer ...
3
votes
1answer
2k views

SQL Server, attaching a database with Filestream, error 2

I'm trying to attach a database sent to me by someone. Unfortunately no backup is available, so I've been sent the raw files themselves. I'm getting the following error in Management Studio: Unable ...