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
0answers
301 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 ...
1
vote
0answers
88 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 ...
1
vote
0answers
3k views

How to speed up query on table with millions of rows

The Issue: I'm working on a big table that consists about 37mln rows. Data include measurements of many devices made in certain time e.g. '2013-09-24 10:45:50'. Each day all of those devices are ...
1
vote
0answers
41 views

Default Trace activity object not in database listed

I've been collecting information on the default trace however i've noticed something strange. Below is a what i'm running , DECLARE @trc_path VARCHAR (500) SELECT @trc_path = CONVERT(VARCHAR ...
1
vote
0answers
314 views

Using Mirroring to upgrade SQL Server 2008 R2 to SQL Server 2012

I am attempting to mirror a SQL Server 2008 R2 database currently in a fail over with the purpose of doing an in place upgrade. I have installed SQL Server 2012 on another machine to serve as my ...
1
vote
0answers
114 views

Automatic Version increment on Data-Tier Applications

In the project settings of a database project I can set the version number form my data-tier application, however setting this manually is a bit inefficient. I would like to automatically increment ...
1
vote
0answers
82 views

The correct way of representing folders

I'm trying to kind of emulate a folder structure in my application. Now I've thought of two ways to achieve this, but what is the best practice for that? Table: Attachments Columns: Id (PK), ...
1
vote
0answers
396 views

Unable to insert into or update table

A have the following table in a SQL Server 2000 database (service pack 2), with about 600,000 rows: Id [int, primary key] Form [int] Element [int] Data [char(8000)] MoreData [varchar(8000)] ...
1
vote
0answers
31 views

sp_spaceused and replication question

I have been replicating data from a table to 2 different locations and was just looking at sp_spaceused to see the size of the tables. I have noticed that the replicated tables are smaller than the ...
1
vote
0answers
378 views

How do I convert unicode data from UTF-16LE to UTF-8 when migrating from SQL Server to MySQL?

Objective: Ensure existing Unicode (UTF-16LE) data is displayed the when moved to MySQL (UTF-8). Background: I'm migrating 1TB from SQL Server to MySQL. The current Collation in SS is ...
1
vote
0answers
105 views

Row not being deleted from the publication when it's deleted in a subscription

We've merge replication configured in our environment(1 Publisher, 3 Subscribers) and We know by default merge replication is bi-directional. Its working fine in case of inserts i.e, if a row is ...
1
vote
0answers
196 views

SSRS switch statement

I have a report with a variable number of columns. I can hide columns with the ismissing function based on an expression like Iif(Fields!Site.ismissing, true, false). However, the hidden columns still ...
1
vote
0answers
117 views

Linked server query in profiler

I was profiling a DB for queries against it but have noticed that when a table in the DB is accessed through a linked server this does not show in profiler. Can anyone advise on why this is or what ...
1
vote
0answers
164 views

Way to make differential backup from full different but from same database

I have the following situation: Our sql server is running in a cloud service. The database to be backed up have 60gb. We need to make a local copy of the database for some tests, and it need to be up ...
1
vote
0answers
149 views

How to check what stats were used in query

respected DBAs . . . is it possible to tell when statistics were last accessed by a query using T-SQL? I'm trying to ascertain what statistics are involved in a query, I know I can check the visual ...
1
vote
0answers
361 views

How to shut down clustered SQL Server 2008 R2 with NOWAIT?

Is it possible to shutdown with nowait on a clustered instance? I want to delay recovery to when the instance starts, and I want to shut down as quickly as possible without issuing checkpoints to my ...
1
vote
0answers
137 views

UPLOCK to avoid multiple reads

Given the following table structure... Orders ====== OrderId int PK OrderEvent =========== OrderEventId int PK OrderId int FK EventTypeId int FK I've got multiple concurrent processes SELECT-ing ...
1
vote
0answers
264 views

Allow developers to run database maintenance

We use the database solution by Ola Hallengren. We're trying to give our developers a way to run the maintenance stored procedures after they do an ETL. Our developers have locked down permissions. ...
1
vote
0answers
192 views

No SQL Server instances show in upgrade setup

I'm trying to upgrade SQL Server 2005 sp4 to SQL Server 2008 R2. However on the upgrade wizard doesn't show me any instances to upgrade. Any ideas? The instance is there just fine. I can connect ...
1
vote
0answers
46 views

Backing up the SQL Application

I have a Windows 2008 R2 server that needs to be periodically reset to a clean state. Normally I would look at creating an image of the system drive, however due to organizational reasons I cannot use ...
1
vote
0answers
397 views

Transactional Replication Failing Suddenly - Distributor Error

I have two databases (both SQL Server 2008 R2) taking part in transactional replication. This exists to pass data to a customer of ours, so I am troubleshooting from the Publisher side. Replication ...
1
vote
0answers
452 views

Linked server error when querying one table

I am running 2 queries using the same linked server. SELECT * FROM [SERVER].[Customer].[dbo].[ccr_AxCust1] SELECT * FROM [SERVER].[Customer].[dbo].[ccr_AxCust2] For Query 1 this returns results ...
1
vote
0answers
122 views

Inline TVF with One Row Result

I have several times converted scalar functions into inline tvf. Usually this is the basic design I used in inline tvf: CREATE FUNCTION TVF(@ID INT) RETURNS TABLE AS RETURN( WITH BASE AS( ...
1
vote
0answers
90 views

Backup headerinformation hold wrong database name

We're in the proces of preparing our migration to our new servers aswell as SQL 2012 and everything is looking fine and dandy and i'm testing some of the scripts we will be using. One of these ...
1
vote
0answers
399 views

Configured values different to Running values, even after full restart

I am trying to change the FILESTREAM Access Level property on a SQL Server Express database. The Configured values section of the Advanced tab of my Server Properties dialogue box looks like so: ...
1
vote
0answers
137 views

What is an incremental checkpoint (in the context of indirect checkpoints)?

I was using extended events to trace checkpoint activity of a database with indirect checkpoints enabled. The event stream looks like this: And the details of the selected event are: The ...
1
vote
0answers
244 views

How to delete orphaned records from sysmergesubscriptions table?

I have some old orphaned records for old subscriptions that I want to delete from the sysmergesubscriptions table. Each time I delete unnecessary records, it show up again after it syncs with any ...
1
vote
0answers
39 views

dbo.M7_* objects (stored procs) in my production database. What product are these from?

I have inherited a database from a predecessor who is long gone... There are about a hundred stored procs in the database that all start with dbo.M7_ They appear to be something to do with source ...
1
vote
0answers
221 views

How to change x-axis labels in a report

I am creating a trend report, in which the x-axis labels are first laywr as year (2014), second quarter (1,2), third period (month) (3,1), fourth week (3,4,5,1,2). I need to change these labels as ...
1
vote
0answers
635 views

Should xp_logevent and RAISERROR … WITH LOG work on LocalDB?

I need to run a script to configure a LocalDB (v11.0.3000) instance and database (from a .NET 4.5 program) and I want to record results at various stages. Someone suggested xp_logevent but it doesn't ...
1
vote
0answers
2k views

Troubleshooting a SQL Server instance that won't start

I've had a problem with one instance of SQL Server 2008 (the free version) not starting automatically. I always have to right click on the icon in the task bar and start it manually. It is set to ...
1
vote
0answers
99 views

Is there a way to generate an execution plan for a stored procedure before executing it?

We have a very large (many millions of rows) table that contains some (few million) rows with invalid values in particular columns. A stored procedure exists to correct the invalid records but it ...
1
vote
0answers
2k views

DELETE failed because the following SET options have incorrect settings: 'ANSI_NULLS'

I have inherited a few scripts that are pumped through a c#.NET custom app to update a SQL2005 SP3 database. One of these scripts does a deletion on a user table called msw_timer_task, based on a ...
1
vote
0answers
418 views

Denying direct remote access to SQL Server

I am trying to stop our valid database users accessing our SQL Server remotely via applications other than our system application (e.g., MS Excel). These accesses need to be prevented because they ...
1
vote
0answers
96 views

Monitor For Disabled Queue On RDS SQL Server

I would like to somehow get notification of a queue being disabled due to poisoned messages. (The issue is occasional resource contention. Until we solve it, monitoring would help us be aware.) In my ...
1
vote
0answers
409 views

Registering a SSDT database project as a data tier application fails

I am having problems publishing a SSDT database project and registering it as a data tier application. Let me explain. I have a database (A) which references two other databases (B & C) through ...
1
vote
0answers
55 views

Slow Response: Initially it's slow and on subsequent restart of the host it works normally

We have SQL Server 2008 R2 32 bit installed on the following hardware: CPU: Intel Xeon E5310 @ 1.60 GHz RAM: 4 GB HDD: Raid Server: HP Proliant 120 OS: Microsoft Windows Server 2003 R2, Standard ...
1
vote
0answers
154 views

how can Audit All Login To SQL Server BY ODBC Connection

I MAke Report By Access Form On SQL database I make ODBC Connection For login To Update the data From Database Now I want Audit All logins To know who make Update today Or who make Update Now ? ...
1
vote
0answers
761 views

SQL pre-login handshake connection failure

I'm having an intermittent problem with one of my old SQL 2000 servers. Every once in a while it stops accepting logins. I fix the problem by bouncing sqlservr.exe and then it starts working properly ...
1
vote
0answers
1k views

SSIS Merge Join Trouble: 3 tables into 1

So I am having trouble merging three tables into one. All sources are DB, and I am using the MERGE JOIN function. When I join my first two tables, using standard left inner join, it returns the exact ...
1
vote
0answers
101 views

Transfer data from DynamoDB to SQL server 2008?

I want to transfer data from amazon dynamo DB to SQL server 2008. What are the tools or methods which can be used to do this ?
1
vote
0answers
140 views

SQL server slow on Xeon machine, fast on Corei7 x990

i have searched this problem but have had no luck find any improvement. I have a complex application that used stored procedures in SQL server. Some of the stored procedures use cursors due to the ...
1
vote
0answers
252 views

Database Timeout Error from VB Application

Recently we are receiving so many database timeout error from different servers we are using vb application -- which will use ODBC connection to connect database - here no problem when we run the ...
1
vote
0answers
1k views

connect sql server using windows authentication in another pc

I am having sql server 2008 r2 express installed in a PC. I have some other PC which are connected to this pc in a local network.Now those PC connect to my pc's sql server using sql authentication. ...
1
vote
0answers
196 views

Why Am I Getting Deadlock - Please Read Trace

can anyone help me? i'm getting deadlock on this trace, i'm using symmetricds and i can't understand why i'm getting a deadlock on a certain table. I'm using sql server 2008 r2, ...
1
vote
0answers
514 views

SSRS Timeline Chart for each day / minute

I'm asked to make a Timeline Bar Chart with SSRS 2012. There should be 1 chart per day/employee, and this chart should have a x-axis of 1440 minutes (or 24 hours). The bar should have 2 different ...
1
vote
0answers
564 views

How to represent class table inheritance (current DBMS-specific way please)?

I want to implement class either-or table inheritance (Account, CatAccountDetails, DogAccountDetails) in SQL Server. I found a recommendation for MySQL here (How do I map an IS-A relationship into a ...
1
vote
0answers
456 views

sp_testlinkedserver taking long time to time-out

I'm using the following code to check if a linked server is available before running queries on it: declare @srvr nvarchar(128), @retval int; set @srvr = 'my_linked_srvr'; begin try exec @retval ...
1
vote
0answers
449 views

Collect CPU, reads and writes when replaying SQL Profiler Trace

I'm trying to replay a trace on a test environment with SQL Profiler in order to benchmark a database prior to making some performance tweaks. I intend to replay the same trace at various stages to ...
1
vote
0answers
226 views

Troubleshooting Database Mail issues and Service Account permissions in SQL Server

I am having difficulties troubleshooting a Database Mail issue. When I try to stop and start the service using sysmail_start_sp and sysmail_stop_sp, I see a critical error in the Administrative Logs ...