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
3answers
16 views

RAM utilization

We are using SQL Server 2014 on Windows server 2008 Web edition (64 bit). Total RAM of OS is 8 GB .When we check high physical memory usage in the task manager it shows nearly 90 to 95 % full but I ...
0
votes
1answer
12 views

Grant execute on xp_logevent to sa using sa user to do it

Running a SQL Server 2012 CLR stored procedure with this code: const string executeLog = "EXEC master..xp_logevent @errorNumber, @message, informational"; using (SqlCommand cmd = new ...
0
votes
0answers
5 views

Getting TEXT data from postgres throught linked server to MSSQL

I'm using MSSQL 2008 R2 with linked server to postgres 9.4. My problem is: when I select column with data type text it shows me only XXX first chars and adds (...) on the end. select description from ...
2
votes
1answer
36 views

Dump all Views of multiple databases in SQL Server

I need to export the views from multiple databases of an older server. (Essentially, to generate a list of views using a particular piece of SQL Server) The fastest way I've found thus far is to ...
2
votes
1answer
524 views

Slow Performance of Parametrized Query in Excel due to Parameter Datatype

I'm pulling Data from a SQL Server 2008 into Excel using a Parametrized ODBC Query created by the Excel Wizard. (Data-->getExternalData/FromOtherSources-->FromDataConnectionWizard-->ODBC DSN) My ...
1
vote
1answer
20 views

How do I create/publish a report in SQL Server 2014?

I installed SQL Server 2014 with Reporting Services but I don't how understand how to create and publish a report so that users can run it on the report server on IIS. These are the programs that ...
2
votes
1answer
419 views

Named Pipe Provider Error code 40

I have literally tried everything, from enabling named pipe to adding exception to ports in the firewall, to everything possible in surface configuration. I can connect to the SQL instance(using TCP ...
8
votes
1answer
579 views

What's the difference between “expression <=1.” and “expression <= 1”?

Reviewing code and a case statement has expression <= 1. as opposed to <= 1 I'm not sure what the purpose of the 1. is. Any thoughts?
0
votes
1answer
16 views

All actions denied on MS SQL Server on Go Daddy Hosting

i have a website hosted on GoDaddy and I need to create a database for it. So headed to the Databases section and created a MS SQL Database then on my local pc I tried to access the database via SQL ...
-1
votes
1answer
26 views

Sending an automated email through a nightly job

I had the following SQL query: select substring(PostOfficeBox,1,4) as 'Postcode' , COUNT(CASE WHEN New_accounttype = 1 THEN New_AccountType ELSE NULL END) as 'New Connections' , COUNT(CASE WHEN ...
2
votes
2answers
399 views

How do I rebuild single full text catalog (or why is “rebuild” full text catalog option disabled)

In SSMS. I have Full Text Catalog defined. If I select "Full Text Catalogs" folder - there is an option "Rebuild All" and it is enabled. But if I select individual FTC - "Rebuild" option (in context ...
3
votes
2answers
473 views

Security for Oracle linked server from SQL Server

I'm trying to make the linked server from SQL Server 2005 to Oracle more secure by not having user/pass on "Be made using this security context:" fields so only a specific user can access the data ...
2
votes
1answer
626 views

How to allow connections to SQL Server with 2 differents ip

I have a small issue here: I have a SQL Server instance 2012 (let's call it INSTANCE) on a cluster. I also have 2 network interfaces for this instance: SQLINSTANCE.my.metwork ...
2
votes
2answers
85 views

Conceptual ERD Multi-table many to many, or possibly recursive?

I'm creating a conceptual diagram [yes, I know I've included attributes and keys - but this is just for me to consolidate what I'm doing whilst learning] -- so please treat it as Conceptual with the ...
0
votes
2answers
38 views

Cannot Decrypt the encrypted columns from the database backup on local machine

I've a SQL server 2014 running on one of our server. We're in the process of implementing security steps for our databases. I've encrypted a column in one of the table in the database on the server. ...
2
votes
2answers
5k views

Cannot use SQLCMD

I have started SQL Server in single user mode like this: c:\....\sqlservr -m When I try to connect to it with SQLCMD -E, I get the following error: Msg 18461, Level 14, State 1, Server SERVERNAME, ...
4
votes
1answer
96 views

Find rows where data resets

So I have a table tbl where I'm trying to pull data that increments at a variable rate. I need to identify when the data resets so I can make a cumulative value. Here's an example table: ID VAL ...
3
votes
1answer
36 views

Any reason not to add 'rowversion' column?

The TechNet article, "Optimizing Microsoft Office Access Applications Linked to SQL Server", recommends adding a rowversion column to SQL Server tables linked from MS Access. From the Supporting ...
3
votes
1answer
15 views

How to change location of SQL Server 2012 database which is already configured with a merge replication

I have SQL Server 2012 configured with merge replication. currently the location of the replication database and the .mdf and .ldf files reside in C:\ drive. The C:\ drive is now full due to that ...
4
votes
2answers
119 views

Reseed identity column in all empty tables [duplicate]

I need to write a query that resets the identity on all tables that have an identity column and are empty.
2
votes
1answer
32 views

Hyper V replication - vs - sql replication solutions

I need to establish an offsite copy of a number of production servers, including SQL server. Hyper V replication has been chosen as a simple solution (all servers are virtual). This is to supplement ...
6
votes
3answers
633 views

Can I query stored procs in all databases with one query without dynamic sql

If I want to query all databases on a server to see if a stored procedure is present, I can combine a sp_executesql and run a cursor over a query similar to the following: SELECT 'select ' + ...
1
vote
0answers
32 views

Why are SELECT queries in sleeping status holding open transactions

Using sp_WhoIsActive, I see that I have a lot of processes in a "sleeping" status, several for hours. I am not sure of the cause and am still troubleshooting (timeout? bad code with uncommitted ...
0
votes
3answers
29 views

Merge replication throws PRIMARY KEY violation during the initialization of Subscriber

I am using SQL Server 2014 SP1 to set up merge replication on Windows 2008. The databases (Publisher & Subscriber) are restored from the production back up of SQL Server 2005 publisher database. ...
2
votes
0answers
17 views

Transaction log bloat when writing to table on replicated database with parameterized filter

We are observing abnormally large log writes whenever we update a table that is used for parameterized filter in a merge replication. There are a number of join filters as well. When executing a ...
2
votes
2answers
59 views

How to safeguard a symmetric key in SQL Server

I've got a database in which I need to store the encrypted values for a column. I use the SQL Server encryption format for encryption. The format is as follows: CREATE MASTER KEY ENCRYPTION BY ...
0
votes
3answers
52 views

SQL Server: track database changes

I have two very similar database questions related to changes tracking. There are a lot of automation tests for an application, all of them use one database backup. Currently before each test ...
3
votes
0answers
68 views

Leap second in Database system (Postgresql and SQL Server)

This night will be longer because of leap second: https://en.wikipedia.org/wiki/Leap_second My impact will be minimal in my case, I don't even know if I will recive some weird data like 20150630 ...
6
votes
2answers
1k views

Benefits of making a sql server database as read-only?

I am using a reporting database which for all practical purposes is a read only database. It is created data and dynamic reports are generated and viewed on this database. I was thinking of making ...
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. ...
2
votes
3answers
783 views

Is it OK to create hundreds of databases in SQL Azure versus one big one and run the risk of deadlocking

I need to create highly scalable solution - where field devices in thousands of sites are delivering data in real time to a back end system, and SQL Azure seems to fit the bill nicely in terms of ...
5
votes
4answers
2k views

What is a good way to verify that a restore completed successfully in SQL Server?

Right now, we test our SQL backups once a month by pulling the most recent backup file and restoring it onto a test database. If SQL Server says the restore is successful, we spot-check a few tables ...
2
votes
2answers
76 views

SQL Server 2008 R2 Memory Pressure

My SQL Server has a weird problem. It seems it happens with the same matter. It always restarts after running a period of time(about one month long). And I used dbcc memorystatus to check the problem. ...
1
vote
0answers
20 views

Unable to connect to SQL Server on AWS

We have two Sql database servers (windows 2008 datacenter r2) with same name but with different IP. can it be possible? we are not able to connect second one which we have created after. Both are on ...
3
votes
2answers
85 views

check when last backup was taken

Brent Ozar had an interesing newsletter on 2015-06-22; How do you manage dbas measuring backups, where he thinks that a good DBA should check when the last backup was done it was last restored ...
6
votes
2answers
381 views

Why is SQL Server 2014 consuming so much RAM with no active data stored?

I'm running SQL Server 2014 on my laptop along with a ton of other installed applications, from Visual Studio to video games. This is obviously not a production server, but for development and ...
2
votes
2answers
9k views

How to improve sql server 2008 table scan speed? [on hold]

I have a table with 1.5 million records.It takes 24 seconds for one table scan.It's too long.
0
votes
0answers
6 views

Replication Conflict tables in SQL Server 2000

Due to previous several replications during these years in a database I'm working with, there are several tables with names with this format : *onflict_AllData_[Tablename] which * can be a, b, ... ...
7
votes
2answers
175 views

Migrating from text and image to varchar(max) and varbinary(max)

I have a SQL Server database which contains a number of image and text columns, and I'm studying potential problems that might arise from migrating them to their non-deprecated counterparts ...
0
votes
1answer
173 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 ...
3
votes
1answer
45 views

Mirror db from production to test and acceptance nightly or weekly

I have read this Easy or Schedulable way to move data from Production to Test and it seems not automated. I would like to have a daily or weekly push of my production server data to one or two ...
3
votes
3answers
149 views

Make a column for each count(*) in a day of the week

I have a table of people who are doing piece work. Every entry in the table has a user-ID, name, and a Date for each report they enter. I need to make a weekly report of what these people have done ...
1
vote
1answer
58 views

What is the best option to easily fix fragmented heap indexes?

I have SQL Server 2008 R2 SP2 and also SQL Server 2012 SP2 on these servers. I have a database in which there is a lot of heap indexes which are more than 90% fragmented. What is the best option ...
3
votes
1answer
37 views

Insert a range of numbers from a call to sp_sequence_get_range

Given the following code: CREATE SEQUENCE dbo.NextTestId AS [bigint] START WITH 10 INCREMENT BY 2 NO CACHE GO DECLARE @variableNumberOfIdsNeeded INT = 7, -- This will change for each call ...
7
votes
1answer
1k views

Non-yielding IOCP Listener

Does anyone know what `Non-yeilding IOCP Listener' indicates? On of our SQL Servers just had a bugcheck dump: ===================================================================== ...
2
votes
2answers
59 views

concatenating columns from multiple unrelated 1-row resultsets

Assume I have these two queries in SQL Server 2014, both of which return one row from unrelated tables: SELECT SUM(A) A, SUM(B) B FROM X SELECT SUM(C) C, SUM(D) D FROM Y I'd like to combine these ...
0
votes
1answer
33 views

Filtered index throwing error - UPDATE failed because the following SET options have incorrect settings: ANSI_WARNINGS

While executing proc1, I am getting error as below: UPDATE failed because the following SET options have incorrect settings: 'ANSI_WARNINGS'. Verify that SET options are correct for use with ...
0
votes
2answers
117 views

Sql server 2008 - server name changed

I have changed the computer name of the server where sql server 2008 r2 is installed. Old name was WIN-OUJEKRMGXXX and new server name is KASURDYYY When i configure replication following error ...
0
votes
0answers
31 views

SQL FullText Search and pdf

First of all, thank you for comming here : I wrote a script in SQL able to find words in a file, with a lot of help of some websites ...
5
votes
3answers
9k views

What permissions are necessary for truncating a table?

I have a sql account with the following permissions on a database: The db_executor role you see this account being a member of was created by this script: CREATE ROLE [db_executor] AUTHORIZATION ...