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)

0
votes
0answers
150 views

DB_STARTUP blocking on spid 7

I have a sql server 2012 instance that I'm installing a new license on that had previously had an evaluation license. I've did this on two other servers with out incident, but this server is giving me ...
0
votes
0answers
139 views

create two foreign key from one table sql server

i am creating user table like code PK Table CREATE TABLE TblUser (UserId int identity primary key ,Name varchar(20)) AND creating one more table FK Table CREATE TABLE TblAnnouncements (Id int ...
0
votes
0answers
43 views

Best method to implement HA and DR, replication via 1 PUB and 2 SUB or replication and LS both

I need a advise on one of our projects where: We have 3 SQL database servers A, B and C: A is the live production server with around 200 users with a database of size 1.5 TB hosted. B is going to ...
0
votes
0answers
372 views

Sudden High CPU Usage On SQL Server 2008R2

Our SQL Server is experiencing sudden high CPU usage since 12:30am today. This server is used internally so nobody should be accessing the server at that time. I'm not sure why 12 hours later the CPU ...
0
votes
0answers
87 views

How to run stored procedure with EXECUTE AS OWNER which modifies data on a linked server?

I suppose this will be marked as duplicate but I can not understand solutions in other questions. I have 2 SQL servers: SQL A (I will call it SQL) and SQL B (I will call it SQLinked). The second SQL ...
0
votes
0answers
57 views

Strange SSIS-Package problem ( ASYNC_NETWORK_IO)

I've read a lot of posts here about this warning. Have been searching on the Internet, but not like this case. We are having problem with integration services packages. When I run the query (that ...
0
votes
0answers
68 views

how to join two table columns ,one column value pivot using

CREATE TABLE [dbo].[NewsComments]( [TitleID] [nvarchar](100) NOT NULL, [Comments] [nvarchar](max) NOT NULL, [CreatedDate] [datetime] NOT NULL, [Status] [char](10) NOT NULL, ...
0
votes
0answers
61 views

Log Shipping Fails to create backup after Server reboot

We made a change last week to point our log shipping backup jobs to a new Windows File Share. For three days everything was running successfully. On Saturday night we performed our monthly ...
0
votes
0answers
77 views

ASP.NET Session Database - what user to create?

I am migrating a .Net 3.5 website with SQL Server 2005 Enterprise databases to SQL Server 2012 Enterprise (website still .Net 3.5). It uses ASP.NET session state database of type "t" Temporary. ...
0
votes
0answers
26 views

Transactional replication of stored proc execution and stored proc parameters

I'm trying to design how we might go about setting up replication of just the execution of a stored procedure. If the stored procedure on the source takes one or more parameters, will those same ...
0
votes
0answers
53 views

Incoming Tabular Data Stream Error

I created a SQL Server Agent Job with two different schedules. One is at 6 AM, the other is at 11 AM. When it runs at 11AM, it works fine; but at 6 AM it fails and gives this error message; The ...
0
votes
0answers
33 views

Replicate SQL Server tables between AWS RDS instances

We are running an RDS instance in AU region and would like to replicate some tables to RDS instances in other regions. A lag of a few hours is acceptable between master and slaves. As we're on RDS ...
0
votes
0answers
66 views

Cannot Deploy SSAS Package into VM / TCPIP

I'm sure that this is just a simple settings problem but I just don't get my head around it. I installed SQL Server 2014 incl SSAS in a VM on Server 2012 (using HyperV in win 8.1) and have VS Data ...
0
votes
0answers
31 views

SQL Server Windows authentication: VMs versus others

This really seems like a weird one to me. I have two VMs of interest, one is running Win2k8 R2 x64 and the other is running Windows 7 X64. The server is hosting SQL Server 2k8 while the latter has SQL ...
0
votes
0answers
40 views

How not to keep the database offline when not accessed for a lengthy period of time?

May I know how I can manage the SQL Server database not to keep offline when not accessed for a lengthy period of time? I'm using SQL Server 2012. Almost everytime on the very first run of the query ...
0
votes
0answers
207 views

SQL Server pre-login handshake error

I am working on a system where sometimes request/sec increase up to 680. It's a .NET 4.0 web api. In normal situations when requests are fewer, everything is fine, but sometimes when the number goes ...
0
votes
0answers
111 views

SQL Server to MySQL data transfer using Talend Open Studio - recent performance drop

I have a problem with data transfer speed from SQL Server to MySQL server using Talend Open Studio. Normally my job has been able to transfer about 5000 rows/sec-7000 rows/sec. But lately the job ...
0
votes
0answers
99 views

Query to Find Cluster Nodes for an Instance

I need a way, using T-SQL, to find the nodes available to a SQL instance. I have 3 nodes in a cluster running several instances of SQL Server, each instance is 2012 Standard and so can only be ...
0
votes
0answers
137 views

How to clean DBMIRROR_EVENTS_QUEUE process on broken mirror?

We setup mirror (on SQL Server 2008 R2), but it fails during the setup. After that the mirror was moved on another server. My problem is that it left some process, because on that server I see active ...
0
votes
0answers
78 views

Load Large data set SSIS AWS EBS

We have configuration of SQL 2012 std edition hosted in Amazon cloud that has data disk of 3 TB, Index disk of 3 TB, Log disk of 500 gb all raid 0 stripped. Am trying to load a table that has 8 ...
0
votes
0answers
43 views

Changing the Service Account with SQL Server Mirroring

As the title suggests we are looking to change the service account of a SQL Server mirror implementation. I will be using the same account on all 3 servers involved in the configuration. I know each ...
0
votes
0answers
55 views

how to revoke backup and restore permission from database owner

I have SQL server 2008R2. I grant every user who wants to work on the database the database owner privileges, but recently found out that there is a database backup spam on the server, so I thought ...
0
votes
0answers
54 views

Query to List Backup Files on Azure Blob Storage

In SQL Server 2014, it is possible to restore a database from a backup stored on a URL: SQL Server Backup and Restore With Windows Azure Blob Storage RESTORE DATABASE [some_database] FROM URL = ...
0
votes
0answers
98 views

Distributed Replay DCOM issue

I have 2 SQL Servers in a Domain. Windows Firewall is disabled on both servers and there is no hardware firewall. Both servers are in the same subnet. One server, called Controller is configured as a ...
0
votes
0answers
73 views

Composite primary key in Multi-tenant sql server database

I'm building a multi-tenant app (Single database, single schema) using Asp Web Api, Entity Framework and Sql Server/Azure database. This app will be used by 1000-5000 customers. All the table will ...
0
votes
0answers
55 views

Why are transactions long running?

My stored procedure has a transaction blog. I pick up a record from a database and process it in that transaction block. I noticed that my transaction log has grown in gigabytes. But my transaction ...
0
votes
0answers
67 views

How can I replace the cursor in the below query?

I have this below query which calls a stored procedure that takes only 1 item's attributes at a time. But because of performance problems we are required to remove the cursor. How can I replace the ...
0
votes
0answers
31 views

Optimal index wasn't being used until rebuilt

SELECT COUNT(T1.RECID) FROM LEDGERJOURNALTRANS T1 WHERE PARTITION=5637144576 AND DATAAREAID='abcd' AND JOURNALNUM='abcd-00018' This query gets run numerous times when users view a ...
0
votes
0answers
52 views

Indexing on cached data from related table using triggers — Is there a better way?

Edit: Schema details per request from Aaron Betrand -- I'll break the schema down to the relevant fields of the two tables. Orders (ID int IDENTITY, Status char(1)) Services(OrderID FOREIGN KEY ...
0
votes
0answers
52 views

Rounding Casted Converting Error

The database I am working with has ntext datatypes which according to my understanding is evil. I used CAST to varchar to fix the issues in the below trimmed SQL Server query. Anyway, my question is ...
0
votes
0answers
76 views

Decimal Data Type as Primary Key

One of my tables is set up like this: create table dbo.Source ( testID decimal (10,3) PRIMARY KEY , column 2 somedatatype , column 3 somedatatype ) Whenever I perform SSIS into this table ...
0
votes
0answers
34 views

Adding an Article to an existing Merge Replication Publication only worked for some subscribers

I added 2 tables to an existing Merge replication Publication and then ran a new snapshot. After it was all said and done the publication pushed the tables to some of the subscribers when they ...
0
votes
0answers
36 views

How can I record previous data when they are updated in a table?

I would like to record all previous addresses and postcodes in my "Audit" table when they are updated in the "Customer" table. I'd like to record a primary key column, user, date of update, customer ...
0
votes
0answers
66 views

Query returns rows for the first time only (Oracle to SQL-Server using ODBC 64bit)

SELECT MJ_GR, GRP_NO, GRP_NAME, EGRP_NAME, sys_guid() rowguid FROM STK_GRP WHERE GRP_NO NOT IN (SELECT "BrandNo" FROM HH_Brand@salesbuzz) AND MJ_GR IN (SELECT ...
0
votes
0answers
166 views

Database in Suspect mode

One of my user database is showing suspect mode. To repair I have executed these scripts: Step 1: EXEC sp_resetstatus axlive’; Step 2: ALTER DATABASE axlive SET EMERGENCY Step 3: DBCC checkdb ...
0
votes
0answers
98 views

Authentication error when running Sql Server Agent job

This problem is driving me crazy... In Sql Server 2012 I have a Agent job: Job_1, a proxy account: Proxy_1, a credential: Cred_1, the job has a few steps of type SQl Server Analysis Services Command, ...
0
votes
0answers
30 views

Temp db increasing size

Is awaiting/sleeping commands shown while executing 'sys.dm_tran_locks' a reason for the increasing size of temp db? I have already tried of changing the backing up temp db in an external disk .
0
votes
0answers
88 views

Could not find prepared statement with handle -1 SQL Server Profiler

So I have this issue where I'm running Sql Server Profiler and I'm getting hundreds(at least) of Could not find prepared statement with handle -1.(error 8179) per second. I can't seem to really ...
0
votes
0answers
317 views

CROSS APPLY on Scalar function

I have this type of Code SELECT A ,B ,dbo.Func(C) ,dbo.Func(D) ,dbo.Func(E) ,F FROM abcdef WHERE 0 = dbo.Func(C) + dbo.Func(D) I read that this is not good practice because function is called ...
0
votes
0answers
22 views

What is the security model for viewing transaction history in MDS?

I'm not a big fan of how MDS handles access control. If a user has the 'Explorer' function enabled and 'update' rights to an entity, they do not seem to get the ability to view the transaction history ...
0
votes
0answers
70 views

Optimizing a CTE query - overhead in inserting into a new table from select statement

I have two tables with the same structure like so (let us call them initial_table1 and initial_table2): tempid name num_records 1 a 2 2 b 2 3 c 2 4 d ...
0
votes
0answers
67 views

Instance consuming large amount of disk space

I have an environment that is Microsoft Server 2000 and Microsoft SQL Server 2000. The database has a file size of 112 GB. The total size of the disk is 122GB. For some reason in less than a few ...
0
votes
0answers
162 views

DatabaseMail didn't start when an email is queued

This is about SQL Server 2005. I have configured SQL agent jobs to send an email when it failed. So far I have received email reliably. However, I have an weird problem where an email would get ...
0
votes
0answers
95 views

I cannot restore a SQL Server database in a new location

Made backup of the database on server c, SQL Server 2012, moved on to the local computer with SQL Server 2012, restore database does not work. When checking the validity of the file on the server ...
0
votes
0answers
150 views

Why do the databases go into the “recovery pending” state when the share permissions are changed from “everyone”?

Yesterday we had a power failure and after the power was back our financial databases on the SQL did fall into "Recovery Pending" state. After struggling a while I've remembered that a few days ago we ...
0
votes
0answers
143 views

The Local Security Authority cannot be contacted

I am not very expert with SQL Server but I have to use to for one of my application development. Issue is that when I open the PC in morning to start my work, my application couldn’t make connection ...
0
votes
0answers
96 views

SQL Server Timesheet Query Performance

I am working on a webapp for timesheet administration. I write a query to group all the time entry of an employee by week. And I also have to use paging. The query is already slow with something like ...
0
votes
0answers
54 views

SQLSTATE:HY000, SQLCODE: -385

I am getting the following error when I try to deploy my tabular model to a local instance localhost\tabular The model processes on my local PC with no errors but when I try to deploy it fails with ...
0
votes
0answers
33 views

Fill Factor - Displaying Old values

I updated my fill factor value from 0 to 75 and I rebuild all the indexes on the database When I ran select * from sys.indexes some indexes are 0 and some are 75 The Indexes that are 0 (I am not ...
0
votes
0answers
44 views

TDE state is changed after DB deployment

I have database projects in Visual Studio 2013 from which I deploying databases to SQL Server. Also I am using Transparent Data Encryption for these databases and it is in state 3 which means TDE is ...