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

mssql restore dabase is terminating abnormally

when i'm trying to restore databse.i'm getting this error in mssql : Msg 3287, Level 16, State 1, Line 16 The file ID 1 on device ...
0
votes
0answers
10 views

What is the best Technical Advice to setup Microsoft SQL Server in an Entry Level Server with 2 SATA Disks?

SOS!!! What is the best Technical Advice to setup Microsoft SQL Server in an Entry Level HP ML310e G8 E3-1220V3 Server with 2x500GB SATA 7.2K Disks, 16GB RAM, Intel® Xeon® ...
6
votes
2answers
5k views

What are Measures and Dimensions in Cubes

I'm very new to Microsoft Sql Server Business Intelligence and Analysis Service(but I'm programming for years with SQL Server).Can any one describe Measures and Dimensions in Cubes in Simple words(If ...
1
vote
0answers
68 views

SQL Script - SSMS Good, Job Bad

long time lurker and this is my first post. I have a SQL Server 2005 pro box running a handful of databases. I also have a few scripts I run once a week through SSMS to update data, so I thought I ...
0
votes
1answer
40 views

SQL Server: query for getting TOP X groups of records which have highest subsequent values

I'm querying each SQL Server DB CPU usage (based on query from here -- Get CPU utilization by database (Query 29) (CPU Usage by Database)) every 60 seconds and storing this information in dedicated ...
0
votes
1answer
48 views

Corrupt SQL Server 2008 database

I am running a donor program on a Windows Server 2008 box, running SQL Server 2008. The primary database file now fails when I run the integrity check on it and we are starting to see errors. I ...
5
votes
1answer
164 views

How can we determine the SQL server version and edition from the available set up, before actually installing it?

We are going through the downgrade activity from SQL Server 2008 R2 Enterprise to Standard edition. To kick off the above activity we were looking for available standard edition of SQL server. We ...
2
votes
0answers
34 views

SQL Server 2005 Datawarehouse DB - Integrity failure caused by NonClustered indexes

Last year I've been working with a data warehouse database (SQL Server 2005) loaded on a daily basis during the nights. Overall database performance is acceptable. However, there is a "known error" ...
0
votes
1answer
25 views

Limit the number of votes

I have a table of content. Users can vote on a content row. They can vote up to three times. I'm looking for the most efficient way to make sure they don't go over three votes. I can think of two ...
0
votes
0answers
6 views

How to Extract suffix from the table column names [on hold]

I have 2 tables , 1 contains answers and columns are A1, A2, A3 so 3 in A3 means this is answer to the question 3. tblAnswers Personid A1 A2 A3 =============================== ...
0
votes
1answer
27 views

When doing an update on a set of records, how do i get previous updates to show on current row to update in UDF

SO i have a rowset of 10 UIDs. They are all dupes, lets say DUPEUID. I have a UDF that will take the UID, check it against the table to see if there is a dupe, and update the UID to DUPEUID01. The ...
2
votes
1answer
1k views

Connection to local SQL Server 2012 can be established from SSMS 2008 but not from SSMS 2012

I have two local SQL Server instances running on my local machine. The first is SQL Server 2008 R2 Enterprise Edition (named MSSQLSERVER) and the 2nd is SQL Server 2012 Business Intelligence Edition. ...
0
votes
1answer
41 views

Enhanced ER Model Supertype / Subtype modeling issue with inheritance and recursion

Before posting, I have looked for a good solution on internet and I have coined this post for 3 days in row and trying to think through it prior this post. So if I have missed something or got it ...
0
votes
1answer
44 views

DB Permission: User can drop only their created db's?

I want to set permission against a user, which can create database and drop on their created databases neither any database. Any idea/suggestion ?
2
votes
1answer
21k views

SQL Server is configured to allow remote connections

I use SQL Server 2012 and SSAS Tabular Mode (My Instance Name Is MSSQLSERVER2012T) Then I download AdventureWorks Tabular Model SQL Server 2012 From This link I open it with Visual Studio 2010 and ...
0
votes
0answers
8 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
1answer
1k views

SQL Server - linked Oracle server: EXECUTE permission denied on 'xp_prop_oledb_provider'

Inside of our SQL Server, we have created a linked server to an Oracle server. We ave mapped several users to the Oracle server and specified the credentials. On the Linked Server 'Security' ...
0
votes
2answers
267 views

SQL Server 2005 to 2012 Replication, cannot access replicated data

I have created publication (snapshot, small table with 10 rows) on MS SQL Server 2005. Then, I created push subscription on MS SQL Server 2012. When I try to select data form table, process takes ...
3
votes
2answers
66 views

Is it good or bad practice to have a fact table relate to the same dimension table multiple times?

I'm new to DW/BI, and this seems like a pretty basic question, but I can't seem to find a good answer. I have a fact table that would have more than one date associated with it, so I was thinking ...
0
votes
1answer
103 views

How to perform same DML statements on two different servers (Oracle and SQL-Server) simultaneously

I have two servers, Oracle and SQL-Server. I have same database on both the servers. I want to perform DML (insert,update,delete). How can I perform same DML statements on both the servers ...
0
votes
0answers
36 views

sp_WhoIsActive is not displaying results

I'm trying to use the sp_WhoIsActive stored procedure that I've downloaded from here: http://sqlblog.com/files/folders/release/tags/who+is+active/default.aspx I'm running the procedure without ...
0
votes
1answer
339 views

SQL Server replication - set PollingInterval in sp_addmergepushsubscription_agent

I am trying to create replication subscriptions to and SQL Server 2008 R2 via a script. There are 3 subscribers so this script creates the subscriptions by calling sp_addmergesubscription and then ...
2
votes
1answer
32 views

Can't seem to understand why STUFF isn't working

I've got two tables that store questions and possible answers. The questions table can have multiple possible answers to it. I want to display the possible answers it can have per question.. For ...
2
votes
1answer
1k views

Dropped Database Connections in SQL Server 2008R2

We are having an annoying intermittent problem where database connections from our client application on a variety of stations will get dropped. We have applications that use ODBC, Borland Database ...
0
votes
0answers
21 views

Restoring SQL 2012 DB - OPEN SYMMETRIC KEY SKey DECRYPTION BY CERTIFICATE NAME Not working

Database Admins, can you please help me out and let me know why my script is not allowing me to DECRYPTBYKEY once I restore my DB from PRODUCTION BACKUP.... -- SET Staging to Single User Mode to be ...
1
vote
1answer
25 views

How to define the logical name in a backup ? ( Sql Server 2008 )

I saw : This question but it didnt help me. In a simple way, Is there a way to do : Backup database SomeDatabase to disk ='c:\teste\SomeDatabase.bkp' configuring the Logical Name? Because we ...
1
vote
0answers
18 views

Best practices to segment people and attributes for advertising database

we have a database where we store people some attributes per person in the following tables: people (id, name, email, phone) people_attributes (id, person_id, attribute_name, attribute_value) ...
0
votes
6answers
10k views

How to recover deleted/updated record in sql server or mysql?

I want to know that is there any way that I can can recover the deleted or updated record in the sqlserver and mysql as well?
1
vote
1answer
474 views

What are alternatives to Replication to distibute data (Microsoft SQL Server)

Is anyone knowledgeable of alternatives to SQL Server replication? I have a scenario where separate databases will share a lot of the same data which complex queries will match against. We want to ...
0
votes
1answer
206 views

DELETE from Linked Server table using OPENQUERY and dynamic criteria

I'm attempting to run a DELETE statement from my local MSSQL Server to delete appropriate records from a table in my remote linked server using OPENQUERY(). I'm using the following code, but it seems ...
4
votes
1answer
152 views

Page compression not working?

I have created a table where I have around 100 partitions (per month), all of them are configured to use page compression. After that I'm inserting data to this table month by month. I now would ...
0
votes
0answers
15 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
45 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
1answer
153 views

Need Advice on Normalizing Database

I have a group of database tables that lack normalization. They all have a similar primary key called 'doc_index', which is either a PK by itself or part a composite PK. As you can see below, there ...
1
vote
2answers
108 views

Check entry based on entry in another column

Still fairly new to databases and SQL, so bear with me. I'm trying to check whether or not data can be inserted depending on data in another column, create table Table1 (PaymentType varchar(5) ...
0
votes
1answer
29 views

Can I recover a damaged SQL Server 2005 database with the undamaged .mdb and .ldf files?

We have a client who has suffered a power spike and it would be helpful to somehow reconnect with their SQL data. Their original SQL Server was 2005, with SP unknown, but installed on D: and C: ...
1
vote
1answer
50 views

SQL Server Mirroring can't connect to mirror database

I am at my wits end with this. I am trying to set up mirroring between a development server and my local machine. The error that keeps coming up is: Msg 1418, Level 16, State 1, Line 1 The ...
3
votes
1answer
582 views

Network issues with sql server

There are two servers on co-location. First is Windows Server Standard 2008 R2 SP1. Second is Windows Server 2012 + Sql Server Standard 2012 SP1. First server has a task with a report against tables ...
10
votes
3answers
301 views

Best way to migrate a huge SQL Server database with low downtime over network

Problem definition Our database server needs to be transferred to an other datacenter. It runs on Microsoft SQL Server 2012 Enterprise (64-bit) and contains two databases of about 2TB and 1TB. ...
0
votes
1answer
14 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
1answer
40 views

Multi Tenant Identity

Is there any way to declare identity partitioned by tenant id? For example I want to have this structure: tenant_id | record_id (auto increment) --------------------- 1 | 1 1 | 2 ...
1
vote
1answer
68 views

Copying SQL Server database

I am working on a SQL Server on which I have three databases: User: This is the one where real data resides Test Development: This is used for testing and developement. From time to time I want ...
1
vote
1answer
31 views

In SQLCMD is there any way of shelling out to run arbitrary programs?

In the past I have dropped json into a table in a nvarchar(Max) column. This is structured data but it needed serving back to the client as json and came in from the client as json so it seemed a bit ...
0
votes
1answer
26 views

SQL Server : how can I measure database performance increase after index maintenance?

We are using a SQL Server 2005 database. We currently have no maintenance on our databases indexes. Some of our indexes are showing over 85% fragmentation when looking at the table ...
0
votes
2answers
74 views

How can I replace the following query with ISNULL function in SQL?

I have the following query. For performance optimization reasons I have been asked to replace the logic with ISNULL function in SQL. How can I achieve this? please advice. SELECT ...
1
vote
1answer
522 views

SSIS - insert system date variable as a execute sql task parameter

I am trying to insert the system:starttime variable into a table by passing a parameter into an execute sql task. I dont have much knowledge of SSIS data types, and I am currently having trouble ...
0
votes
1answer
57 views

SQL Server table and view show different values

I have a view that selects data from a table that is showing different data. The table is dbo.user, the view is dbo.users (don't judge, I inherited this system). The view is simply select * from ...
0
votes
1answer
36 views

SQL Server 2008 R2 service packs

Are the SQL Server service packs 'cumulative' or 'incremental'? The scenario is that we have a couple of instances running on SQL Server 2008 R2 RTM and we have been asked to patch it up to SP3 ...
2
votes
1answer
272 views

How to troubleshoot how resource governed query is being throttled in SQL 2012?

I have a parallelized query on SQL 2012 SP1 (ent) that is running in a user defined resource governor pool much much slower (2 seconds versus 125 to 140 seconds under user defined pool = ~75 times ...
0
votes
0answers
47 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 ...