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)

2
votes
0answers
319 views

SQL Server SSIS issue retrieve data when i enter into login of server side?

can any one try solve my problem here i am facing a problem Failed to retrieve data when i enter into login of server side here is the error message TITLE: Microsoft SQL Server Management Studio ...
2
votes
0answers
413 views

SQL Server : where with cast(value as varbinary) vs cast(value as varbinary(300))

Are there any theoretical performance differences between these queries in the scenarios below. Scenarios are: MyTable has Value nvarchar(300) MyTable has Value nvarchar(max) Q1: declare @p ...
2
votes
0answers
521 views

How to do automated archiving for a SQL Server database based on interpretation of database metadata?

I am looking for a solution giving me automated archiving of SQL Server databases based on a smart interpretation of table relationships that is able to archive records from related tables minimizing ...
2
votes
0answers
267 views

Upgrading Remote Distributor in SQL Server Replication

I'm upgrading my remote distributor from 2005 to 2008r2, it is performing transactional replication only. this is a prerequisite to completing an upgrade of the Publisher to 2008r2. Script ...
2
votes
0answers
155 views

MDX Block Calculation Optimisation

I have a query I'm trying to optimise. I have read an article here http://web.archive.org/web/20100823233821/http://www.biblogs.com/2008/03/30/optimizing-countfilter-expressions-in-mdx/ about ...
2
votes
0answers
281 views

going from heirarchical XML to heirarchical SQL tables then SQL to c# objects to go to user view, how should I store the data in the databases?

Hi I'm getting my data from a web service using their getData call and it comes in as fairly chunky heirarchical XML, first everything all at once, like <allData> <product1> ...
2
votes
0answers
566 views

Logic to convert a UTC date-time to a specific time zone

I have a table which has 1 row per event. Each event has a datetime stamp column which has values in UTC time. Each row has an associated local timezone in which the event occurred. I have a DIM ...
2
votes
0answers
269 views

SQL Server retrieval error under heavy load (200 concurrent users)

Currently I'm facing an issue in a SQL Server retrieval procedure. Stored procedure returns unexpected result when executed by many user (No. of users > 40) concurrently for the same parameter. For ...
2
votes
0answers
1k views

Could not open File Control Bank (FCB) for invalid file ID X when restoring from snapshot

We have a scenario in which we, during integration tests, make a backup of an existing database and restore it under a new name. We then create a snapshot of our "new" database. After each test we ...
1
vote
0answers
21 views

Transactional Replication - Replication Order of Related Tables

** This was previously asked on Stackoverflow - I removed it from there and recreated here ** I have an issue with SQL Server Transactional Replication. My topology is as follows (and this cannot be ...
1
vote
0answers
27 views

SQL Native backup MIRROR TO performance

We are moving to SQL Server 2014 Expensive Edition Q1 next year. Right now we are on SQL Server 2005 Standard Edition, so we don't have access to the oh-so-wonderful MIRROR TO option for our backups ...
1
vote
0answers
37 views

Why is Update Query Slow with correct Indexes?

I have a query that updates a temp table. There are 2 Filtered indexes (by date) used in this query. However, the update take 8-10 mins to run. I am struggling to find out why it is so slow. There is ...
1
vote
0answers
10 views

“Skipping the default startup of database” SQL notification for AlwaysOn Cluster

So I set up our SQL servers to notify us of alerts at severity 17 or higher (as advised by various SQL Server articles). I've done this to each node of a SQL Server Always On Availability Cluster, ...
1
vote
0answers
30 views

Database backup hangs both in SSMS and XMLA

I am using SQL Server Analysis Services 2008 R2 Service Pack 3. My database was recently upgraded from Analysis Services 2005 and since that time I have been unable to do a backup either from SSMS or ...
1
vote
0answers
42 views

File group space problem

I'm having some problems with my database usage space. I have a database with autogrowth off and limited size to 150GB. When users try to import files, large databases or other massive transaction ...
1
vote
0answers
22 views

Datamining using holidays

My setup: I am currently running a SQLServer 2012 database paired with a SSAS. My database features sales per store at specific times. My goal: I am interested in predicting future sales (amounts) ...
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 ...
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
0answers
18 views

reports on history table

Assume Trucks which travel between Cityies. I store the Cityies that a Truck has traveled to in TruckLocationHistory table, if the Truck is passing the City, State = Passed and if it gonna stays for ...
1
vote
0answers
28 views

Migration error: “Invalid date literal detected” when reading decimal

I'm attempting a migration from MSSQL to MySQL and keep coming across a "Invalid date literal detected" error when reading certain decimal columns. I'm running the following (all up-to-date as of ...
1
vote
0answers
19 views

Can CDC read through a log file when the agent job hasn't been running?

We currently had CDC running on our SQL server, however, at some point last week the CDC capture job stopped running and started throwing an error. At this point when it stopped somebody had restored ...
1
vote
0answers
64 views

Can you speed up this query to aggregate millions of rows?

We store our website traffic data in SQL Server 2005, like so: | Date | IPAddress | GalleryUserID | ThumbView | LargeView | ZoomView | | 2014-11-11 | 192.168.0.1 | 22 | true ...
1
vote
0answers
24 views

Network connection from old application to SQL Server 2008 R2 lost once in a while

I have put this question on serverfault.com as well, but since the problem concerns connecting to SQL Server, I will also put it here. We are trying to migrate an Axapta 2.5 database from SQL Server ...
1
vote
0answers
46 views

What is the RecoveryUnitID in DBCC LOGINFO

In SQL Server 2012, MSFT added a new column to the output of DBCC LOGINFO, called RecoveryUnitID. I know that this DBCC command is undocumented, but I am surprised that I can't find it anywhere what ...
1
vote
0answers
48 views

SQL Server Comparison

I am merging two different versions of a database. I want to add some specific fields from source database to destination, so I used Visual Studio to do that. It does the job quite well but only table ...
1
vote
0answers
75 views

MDF/TempDB Growth, SQL Server 2005 Enterprise

Here's my scenario: SQL Server 2005 Enterprise Records from Database A being added to Database B Size of Database A MDF file: 3.15 GB I have separate drives for Data, Logs, and System. I ran a ...
1
vote
0answers
71 views

The replication Merge Agent failed to propagate a Publisher schema change to the Subscriber

We are running 2 Microsoft SQL Servers - publisher (2008R2) / subscriber (2008 Express) with merge replication. I tried to make some schema changes via Transact-SQL and partly failed. So tried to ...
1
vote
0answers
84 views

SQL Server: Buffer page read/writes per second reported high

Our SQL Server is reporting high buffer page read/writes per second. Several documentation sources suggest these stats should be less than 90 per second. Our database server is reporting: counter ...
1
vote
0answers
84 views

Why does SSAS keep restarting every few seconds?

We have a SQL Server 2005 Analysis Server which began restarting this weekend, seemingly without any external changes. The current state of the server is that as long as the SSAS service is enabled, ...
1
vote
0answers
29 views

How To Log Select Statements from 1 User On 1 Table Into a Permanent Log Table

We have a centralized authentication library that 100+ applications use to authenticate users. That library has its own DB credentials. It would be extremely useful to log every time that library/user ...
1
vote
0answers
127 views

SQLCMD cannot find the SQL Server remotely

I am trying to use SQLCMD to remotely detach a database but for some reason it can't find the server. From the workstation, I can connect to the database instance (which is the default instance) using ...
1
vote
0answers
55 views

Integrity checks on large dbs (700GB)

What's the best strategy for integrity checks on large dbs? DBCC CHECKDB (DB Name) would probably take over 24 hours, the largest table (532GB) would probably take over 17 hours...
1
vote
0answers
58 views

Alternatives to log shipping / Replicate a local SQL Server database on a remote DB accesible only by IP

I'm trying to replicate a local SQL Server 2008R2 DB to a remote DB instance accessible only by IP (specifically, a RackSpace cloud site DB). I believe log shipping is ideal, since the remote only ...
1
vote
0answers
37 views

Is there any way to set stored procedure options like ANSI NULLs to true or false outside of creation?

I'd like to set ANSI NULLs and quoted identifier properties on a stored procedure after it has been created. Is this possible? For some context, I'm using Visual Studio Database Projects / SSDT, and ...
1
vote
0answers
66 views

DB Design: Looking for Performance improvement with a Column used in all SQL Queries

I recently got added to a new ASP .NET Project(A web application) .There were recent performance issues with the application, and I am in a team with their current task to Optimize some slow running ...
1
vote
0answers
119 views

“Failure occured while attempting to connect to the Principle server” from CLR procedure

I have a Windows Service running under a domain account which calls a stored procedure which then calls a CLR stored procedure. Initially I had a problem where database ownership chaining wasn't ...
1
vote
0answers
149 views

Connection to SQL Server failed. A network-related or instance-specific error occurred while establishing a connection to SQL Server

I'm getting this error while trying to connect to sql server. Now this never happened before and it's really annoying. I found out in my sql configuration manager that SQL server service has stopped ...
1
vote
0answers
140 views

500GB Data Warehouse - how to split it into FileGroups?

OK, so I have: 500 GB DW 5 GB in smaller DBs 220 GB TempDB 350 GB in Log files. My machine is Fujitsu Primergy 64 cores (with HT) and 192 GB RAM. I have several IO locations: 540 GB in-server ...
1
vote
0answers
941 views

how to resolve intermittent SQL backup issue?

We have this issue on aprox 100-300 SQL machines each month and it's never re-occuring. If you re-run the backup it will complete. The problem exists in both win2k8 and win2k12 machines. Backup ...
1
vote
0answers
236 views

SQL select top X rows having sum limit

I am using SQL Server 2012, I have a table with a format such as : MyOrders : ID -> PK int Cost -> float Category -> int I want to get the following : Input : category (lets say 2). ...
1
vote
0answers
76 views

How to add SQL Server in networks list?

After changing my PC name and workgroup, I am no longer able to connect to SQL Server. Currently in my servers list I have only Home & localhost. Anybody know how to add server to networks list? ...
1
vote
0answers
91 views

How to handle many columns / variable schema?

I apologize in advance in case this question has been asked already. I'm working on revamping a reporting application used within my company. The requirements are: Support addition of new fields ...
1
vote
0answers
48 views

Database Mail connection to exchange - Resets and timeouts

I am trying to send the results of a query in an email, and each time it takes longer than 5-10 minutes for me to recieve the message. The actual relay from Exchange takes less than one minute, but ...
1
vote
0answers
290 views

Sql Server Installation Code Error

My problem is this, I want to Install Sql server 2014 in my Pc but i have a problem with it: SQL Server Setup failure. SQL Server Setup has encountered the following error: The SQL ...
1
vote
0answers
35 views

SQL Server Real Time Data integration with different Instance

I have got a SQL application which needs to be merged with a new CRM applicaiton. so data coming into the source tables, then triggers push certain fields into the Staging table with a flag '0' and ...
1
vote
0answers
33 views

How to tell if Database Certificate Used?

I plan to migrate a SQL Server database to another server. There is a certificate listed under the Security > Certificates view in SSMS Object Explorer. I ran the below query to check if database is ...
1
vote
0answers
253 views

Querying LDAP multi-value attributes using Openquery

I'm using SQL Server 2012 Express to query an LDAP linked server like this: SELECT * FROM OPENQUERY (MYLINKEDSERVER, 'SELECT * FROM ''LDAP://myserver:389/o=root'' where telephonenumber = ...
1
vote
0answers
38 views

How to specify a display name in emails from SSRS subscriptions?

How can I specify a display name (e.g. "Reporting Server" <noreply@domain.com>) in the emails sent from SSRS subscriptions?
1
vote
0answers
27 views

How to cope with SQL Server 2012 vs SQL (Azure) Database sql files

I'm trying to port my system to SQL Database (Azure instance) from SQL Server 2012. I'm using Visual Studio 2013 and I have my .sqlproj with all the definition of my database inside. Given that a ...
1
vote
0answers
55 views

Slow compilation of a SQL statement

I have SQL Server 2014 and a large table (more than 200Gb) with 100M rows and more than 300 columns. For one "unpivot" query I wanted to see its estimated execution plan and it took more than 90 ...