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
1answer
55 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
831 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
686 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 ...
8
votes
1answer
1k 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 ...
0
votes
2answers
123 views

Migrating DB issues

I need to migrate an old database's data to a new database with a new design. One major problem for me is that the old database uses nvarchar type as the primary key in its table for some reason. In ...
0
votes
1answer
52 views

Suggest performance tradeoffs

I have a an inner query that needs outer query column values as input. It looks something like this CREATE TABLE TISSET( COL1 int ,COL2 int,COL3 int) INSERT INTO TISSET VALUES (1,1,1); INSERT ...
9
votes
2answers
415 views

Improving the performance of STIntersects

Table T_PIN has 300,000 pins and T_POLYGON has 36,000 polygons. T_PIN has this index: CREATE SPATIAL INDEX [T_PIN_COORD] ON [dbo].[T_PIN] ( [Coord] )USING GEOGRAPHY_GRID WITH (GRIDS =(LEVEL_1 = ...
1
vote
1answer
78 views

How to disable data type check while pushing data to Linked Server

I have two SQL serves one is SQL server 2005 and other SQL server 2008.I push data from SQL server 2005 to SQL server 2008 using Linked Server.I want to improve performance of data transfer. Few days ...
5
votes
0answers
2k views

How to clear an an Error 15404 after a DB restart (besides rebooting)

Every so often (e.g. ~months) a SQL Server Agent hourly Job will begin reporting an Error 15404 and continue to do so until intervened with. [298] SQLServer Error: 15404, Could not obtain ...
3
votes
1answer
740 views

In Powershell Retrieving Printed Message From SSMS

Our DBA team doesn't verify the backups using the below TSQL (which can easily be done post-backup and takes almost no time, so I don't get why not): RESTORE VERIFYONLY FROM DISK = ...
0
votes
1answer
94 views

Identity Column Behaviour After Replication

Say we have two Servers: Server A and Server B. Data is being replicated (vanilla Transactional Replication) from A to B. For one of the Tables, we have data as follows: Server A - Server B ...
1
vote
2answers
3k views

What is the best way to model an invoicing system with different forms of invoice items? [closed]

I am doing some preliminary database modelling for a Line-Of-Business application that I am creating. The application will be a Practice Management System for a medical practice/clinic. I am looking ...
0
votes
0answers
76 views

Query with large number of or'ed predicates on the same column?

At one place we need to query a table to determine whether any records exists that are in a subset of the same table. The columns that are queried are varchar columns containing file-paths, and we ...
2
votes
2answers
1k views

SQL Server Transactional replication failed due to snapshot agent failure

I'm trying to set transactional replication between 2 SQL Server 2012 named instances. I've followed a step by step manual and created a Publication. But once I look into Replication Monitor I Get ...
0
votes
1answer
162 views

Does Express Profiler have a major effect on performance of SQL Server Express

I'm wondering does running Express Profiler against an SQL Express Server have a major impact on performance. The versions of SQL Express I'm looking to run against are on 2008 and 2013. This is the ...
6
votes
2answers
247 views

Why is % forbidden char in THROW message?

Simple question: THROW 50000, 'Because of this ->%<- is this message invisible.', 1; you can't pass %s, %d parameters as in RAISERROR you have to use FORMATMESSAGE but THROW failed anyway if ...
2
votes
1answer
5k views

SQL Server : keep track of all connections/disconnections

I have a Microsoft SQL Server 2008r2 SP1. I need to know which users connect to, and disconnect from, database. Ideally, I would like a list of (datetime, username, connect/disconnect). Can this be ...
0
votes
2answers
161 views

Accept null value on parent column in multipart relationship

EDIT: I've come up with one poor solution (below) that requires some denormalization, but does avoid the risks of UDFs in CHECK constraints. I would appreciate your help if you have a better answer. ...
1
vote
1answer
118 views

SQL Server Login attempts fail when using SSMS but succeed when using SQLCMD

I have my SQLServer 2005 instance configured for mixed mode fine. When using SSMS, none of the sql server logins seem to work. Just "Login failed for user '..'" message. But when I use SQLCMD, it ...
4
votes
2answers
560 views

SQL Server 2012 CPU spike due to LinkedServer - how to find the offending query?

As part of another question (SQL Server 2012 performance issues (maybe due to linked server)) I've identified a CPU spike to be directly related to a spike in Bytes Received, which leads me to believe ...
6
votes
1answer
1k views

Why is SSIS slow to enumerate over many files in a directory and import them?

I have a terribly slow SSIS package. It's quite fast with one file, and reasonably fast with 100 files or fewer. (About one second per file) However, if my directory has thousands of (very small) ...
1
vote
1answer
102 views

Restore With Move has poor performance

As part of our regular development cycle we need to take a copy of production into development databases. To do this, we take a copy of production backups and move them to the Development Server. ...
5
votes
4answers
7k views

Executing a very large SQL file

I have a 830mb .sql file which is a scripted DB. I wish to execute this SQL so it will create and insert data into a database on a hosted server. I cannot get it to open in SQL Server Management ...
0
votes
1answer
47 views

How Many Rows om Int and Big Int [closed]

How many rows does datatype int and big int retrieve in their table when you work with fact table in SQL server?
1
vote
1answer
443 views

Browser service in sql server clustering

Straightforward this one - when failing over from one sql server 2008 node to another, should the browser service be running on the passive node ? At the moment, on attempting to failover, a an error ...
17
votes
2answers
380 views

Is it possible to view LRU-K values in SQL Server?

In SQL Server's sys.dm_os_memory_cache_entries, it is possible to view both the original cost of an entry in the cache as well as the current cost of the cache entry (original_cost and current_cost ...
2
votes
1answer
1k views

sql server 2008 r2 DBCC checktable error

This morning my database went into suspect mode. I reverted back to last night's full backup to get it back online. I went through the error log and found the last command that appeared to cause the ...
2
votes
1answer
546 views

Slow SELECT against clustered index [closed]

I have a table which will hold 10 million rows. I'm seing performance issues when quering it, and wonder if I can somehow improve the schema or query, or if I need to look into sharding. I've used SQL ...
1
vote
1answer
1k views

SQL Server 2012 Express Report Services report builder button not visible

I am trying to run SQL Server 2012 Express Report Services on Windows 7. I finally have it configured, but I'm not sure the missing steps that is preventing the Report Builder button from being ...
1
vote
0answers
455 views

Log shipping on secondary server

Log shipping fails with the below error. Sql agent on secondary server has access to the folder and files in security. It is not a firewall issue. I created the jobs using the LS scripts as it fails ...
16
votes
2answers
3k views

Why does SQL Server require the datatype length to be the same when using UNPIVOT?

When applying the UNPIVOT function to data that is not normalized, SQL Server requires that the datatype and length be the same. I understand why the datatype must be the same but why does UNPIVOT ...
2
votes
2answers
314 views

How can I prevent users from overwriting databases when restoring?

I don't want users to restore (with overwrite) on some specific databases. How can I inhibit from restoring over these databases?
2
votes
1answer
760 views

Performance issue with TOP (1) on a nullable column

I need help to identify the reason for a performance issue. Actually following query sits in a scalar-valued-function but that is not the reason for the issue since it needs the same time as query: ...
4
votes
3answers
561 views

Why does my procedure run slowly until I update statistics?

I am using a SQL 2008 database (not R2 sadly but have also tested this on an R2 database server) and have an ELT process running. Data is extracted from source and loaded to staging tables in the ...
11
votes
1answer
1k views

SQL Server 2012 Standard server with 50 instances won't uninstall instances

I suspect this is an issue because we hit the 50 instance max limit of SQL Server. At the limit it won't install more instances, naturally. However, it seems it won't UNinstall them either. That's ...
3
votes
0answers
19 views

Why does my procedure run slowly until I update statistics? [duplicate]

I am using a SQL 2008 database (not R2 sadly but have also tested this on an R2 database server) and have an ELT process running. Data is extracted from source and loaded to staging tables in the ...
6
votes
3answers
1k views

Using SQL Snapshot Replication to refresh TEST databases from PRODUCTION. Why not?

What are the drawbacks and downsides? We want to schedule automatic nightly refreshes of 20 databases, approximately 1GB each, from the PRODUCTION server to the TEST server. We're setting up SQL ...
40
votes
3answers
1k views

Huge slowdown to SQL Server query on adding wildcard (or top)

I've got a zoo of 20 million animals which I track on my SQL Server 2005 database. About 1% of them are black and about 1% of them are swans. I wanted to get details of all the black swans and so, not ...
1
vote
1answer
555 views

Improper removal of SQL Server cluster

A node was evicted from a windows cluster without first uninstalling the sql first. When the node was put back, an error was produced when we tried to failover. It was reporting a missing dll. Feels ...
0
votes
1answer
240 views

Issues installing SQL Server 2012 [closed]

I am trying to install SQL Server 2012. During the install I get an error saying Error installing SQL Server Database Engine Services Instance Features A network-related or instance-specific ...
1
vote
1answer
483 views

SSIS FTP Sending Blank Files

I'm supporting an existing data interface that is a series of SSIS packages (SQL 2008 R2) for sending and receiving data with a third party. The communication is being done through FTP, and it uses a ...
0
votes
1answer
311 views

What are all these databases with funny names?

I help support SQL Server installation that hosts SharePoint and various related services. I never really looked at the database side of things until today when I noticed a whole bunch of databases ...
0
votes
2answers
348 views

What locking can I expect with DBCC CHECKIDENT(RESEED)

I'm working on a project that has hit a bit of a snag: I'm replacing some replication with a home built system so that if replication goes down we don't blow our SLAs with our customers and shell out ...
0
votes
1answer
92 views

SQL Server 2000 Replication, Performance, and Query Priorities

I'm a developer and wanting to confirm the following: Does anyone here have experience with SQL Server Replication (transactional) on 2000? We are trying to convince the DBAs to allow this in a ...
1
vote
1answer
261 views

Login fails even though it exists when failing over to mirror

I have mirroring set up on a production database. I have a login setup on both the database serving the database and the mirror. It has identical login information and configuration. When I ...
0
votes
2answers
888 views

restore db from .bak file that contains multi backup

I backup my database and I Mistakenly saved it without a name. what happened is that instead of replace the last file it add to it the last backup. now I have a .bak file that has 74 backups I ...
0
votes
1answer
170 views

SQL Server Standard High Availability (HA) with two nodes

Is it possible to accomplish High Availability (HA) with two SQL Server Standard nodes ? We can't use SQL Server 2012 AlwaysOn without Groups as it has single point of failure by using the "single" ...
1
vote
0answers
86 views

Automatic inheritance of permissions, when databases are added afterwards

How do I give a user automatic access to all databases that's being created or imported to a database server? I have a selection of one user and two activedirectory-groups which have to automatically ...
1
vote
3answers
77 views

No of rows to be displayed [closed]

I have 100 records. I want to display only 10 rows of that record default or by specifying the number by using procedure