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

Hyper-V Dynamic Memory and SQL Server

I will probably get voted down for this, but does anyone have a good place to start other than the Best Practices Documentation for using Dynamic memory with SQL server. We are experiencing issues ...
1
vote
0answers
24 views

Can we configure Certificate-based Authentication to connect(logon) sql client?

Can we configure Certificate-based Authentication to connect(logon) sql client? or any other method to connect sql client using mutual authentication(sql server and sql client)?
0
votes
2answers
51 views

Find tables with modified data after a specified datetime [duplicate]

I am performing few inserts and updates on my database using tool provided by app supplier. I want to compare the updated database and backup after running the tool. But my database size is around ...
2
votes
3answers
300 views

Why is the SQL Server query plan not using indexes in a query almost similar to one that uses indexes?

I have two UPDATE queries that are similar in structure, yet the SQL Server query plan for one shows indexes being used, and for the other it shows only a regular table scan. The following are the ...
0
votes
3answers
73 views

Script to merge-replicate two MDF database files?

I have a program on a computer and on a tablet. The program uses SQL Server Express to interact with a local database (the same information on both) from a .MDF file. So if I plug the tablet into the ...
1
vote
0answers
25 views

Alwayson Database Recovery Failure during TDE encryption

Last week I enabled TDE encryption on my AlwaysOn Availability Group databases of SQL Server 2012. During the encryption of one of the larger databases, bigDB (~200gb) a failover event occurred. Of ...
8
votes
2answers
206 views

SQL Server - Changing a column from NOT NULL to NULL - What's going on under the hood?

We have a table with 2.3B rows in it. We'd like to change a column from NOT NULL to NULL. The column is contained in one index (not the clustered or PK index). The data type isn't changing (it's an ...
5
votes
0answers
141 views

Crashing CLR on SQL Server 2014 (windows 2012R2)

I have this small CLR that does a RegEX function on a string in columns. When running on SQL Server 2014 (12.0.2000) on Windows Server 2012R2 the process crashes with Msg 0, Level 11, State 0, ...
1
vote
3answers
98 views

How to restore mdf file in sql server 2005?

I have a .MDF file and no .LDF files for a database created in SQL Server 2005. When I try to attach the .MDF file to a different SQL Server, I get the following error message. I would like to ...
0
votes
2answers
28 views

Sudden Slow Reports [closed]

we have reports on our report server that are running slow all of a sudden. They were working fine and then all of a sudden over the weekend they started to process incredibly slow. It appears that ...
0
votes
0answers
16 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
1answer
60 views

SQL Server : execute stored procedure from another stored procedure

I have two stored procedures. Proc1 executes a SQL statement and results a data table as a result set. I need to use the datatable in a select SQL that resides in proc2 as a datasource. like, ...
0
votes
1answer
39 views

Operating system disaster recovery strategies

I have read a lot about disaster recovery planning of databases (mainly SQL Server). There are multiple articles/book chapters about backing up databases and recovering them from backup. But what if ...
1
vote
1answer
98 views

How to get the return value from a stored procedure executed with sp_executesql

I need to call a stored procedure in another database and check the return value. The name of the other database can vary so I'm trying to use sp_executesql, but I haven't been able to find how to get ...
0
votes
1answer
39 views

Clustered Index Update

I am trying to understand why is my query (update statement) causing clustered index update in the plan? Based on my clustered index (in the where clause), I am just updating columns in my table. What ...
12
votes
1answer
112 views

What exactly can SQL Server 2014 execute in batch mode?

When a columnstore index is being used in a query SQL Server is able to use batch mode. Documentation is thin on what can run in batch mode and what can't. Please look at the following (motivating) ...
0
votes
0answers
33 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 ...
1
vote
0answers
31 views

DBCC SHRINKFILE (N'XYZ' , EMPTYFILE) using single core

Is there any way to force DBCC SHRINKFILE to use more than one core? We're running SQL Server 2014 on a hex core machine - and SHRINKFILE is using one hyper threaded core. I/O is at a small fraction ...
1
vote
1answer
17 views

Groups relationships - Detailed or Direct?

I have a Person model: PersonId Name ----------- ---------------- 1 Jessica 2 Jennifer Then I have a ShareModel which have the Personand an ...
0
votes
0answers
47 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
1answer
35 views

sync all tables between 2 databases [closed]

I need some information on how to synchronize all tables and views in sql server. What I wanted to do is basically I want all production server has the same tables and views structures as the staging ...
0
votes
1answer
74 views

is high cpu a bad thing [closed]

I had a heated discussion today with some colleagues about high cpu. We db guys are conditioned to believe that high cpu is a bad thing. I think we spend too much time worrying about cpu and not ...
2
votes
1answer
125 views

Stored Procedure with Table Value Parameter

I'm attempting to write a stored procedure that will have two parameters. ComputerName | nvarchar Monitor_Serial | Table-valued parameter (TVP) I'm using a TVP because some computers have an ...
1
vote
2answers
50 views

How to Limit Access in a Database System

I have a question related to the limiting of the access to a database network for the users that are allowed to log on to it. The problem is that the databases are huge (they contain hundred of ...
1
vote
2answers
31 views

How to identify and remove the SQL table row which contains UTF 8 BOM characters

I recently identified that some of the rows in our table contains UTF 8 BOM (Byte Order Marking) characters ().. Is there a way to identify those rows and removing the BOM characters from those ...
1
vote
2answers
47 views

Different table size on sp_spaceused and standard report “Disk Usage by Top Tables”

I ran sp_spaceused and Disk Usage by Top Tables standard report for a table. The results for sp_spaceused are: name rows reserved data index_size unused SomeTable <1301755> ...
0
votes
0answers
62 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
1answer
33 views

Can I Upgrade SQL Server 2008 R2 Express to SQL Server 2014 Developer edition

I currently have SQL server 2008 R2 Express installed for my QA/Dev environment on Amazon EC2 instance. Now my database is growing beyond the 10GB limitation of Express edition, so am planning to buy ...
0
votes
2answers
22 views

how to make shapefile in geometry column of ms sql?

I was tried ogr2ogr command like this. ogr2ogr -f "ESRI Shapefile" "C:\temp\sqlexport.shp" "MSSQL:server=[RemoteServerIp];database=[dbname];User Id=[user];Password=[password];trust_connection=yes;" ...
2
votes
0answers
40 views

speed up ghost cleanup

In SQL Server I have a table that is filled often and also gets deleted often. Because several threads write and erase data from that table I cannot even truncate it because there is always someone ...
0
votes
0answers
20 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
16 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 .
-2
votes
1answer
53 views

How to scale a write intesive application with a SQL Server 2014? [closed]

I am studying about many databases lately and the one thing I can't get the hang of is how to scale a write intensive application in SQL Server, I'm talking about native features, not third party ...
0
votes
2answers
21 views

Transform 14 columns into 2 (SQL Server 2008) - Pivot/Cursor not helping

After hours googling pivot and cursors. I couldn't think or figure out how to do this. I have this query: declare @banco varchar(100) set @banco = 'CascVW' declare @tbltemp1 table ( ...
0
votes
1answer
31 views

SQL Server stored procedure to insert/ update which has date

The source which has date in dd-MMM-yy format , have to convert it yyyy-mm-dd hh:mm:ss:SS and insert/update into the Database using stored procedure.New to stored procedure I am managed to write a ...
-2
votes
2answers
38 views

UPDATE() Function (Insert and Update Triggers)

Is there a way to have the column name dynamic in this function? For example, passing a parameter to a variable named @FldName = 'Name'. e.g. UPDATE(@FldName). Basically, what I want to do is to have ...
4
votes
2answers
139 views

External Memory Pressure

I have a few "gaps" in my understanding of external memory pressure. I've found quite a bit of helpful information online, including this info from SQLSkills.com. SQL Server has a built-in ...
1
vote
2answers
70 views

Monitoring free space in SQL Server data files

I have manually resized mdf/ndf files to a big size to avoid autogrow operations on SQL Server databases. Since the files are bigger there is very little free space on disk partitions and the ...
4
votes
1answer
103 views

Understanding below execution plan

I have two tables tb1 and tb2, tb1 doesn't have any indexes on it. I populated tb1 with 1000000 rows and tb2 has 500 rows in it and with a clustered index on ID column. To understand nested loop ...
1
vote
1answer
26 views

Alternative approaches to “primary” record in child table

I have a database with a Customers table, and two child tables Addresses and Contacts, as customers often have multiple locations and contacts. However we also need a "primary address" and a "primary ...
2
votes
2answers
70 views

Should a SQL Server DBA know Windows Server and vice versa? Are these roles soon to become synonymous. Or at least more encapsulated/?

I have Jr. experience with SQL Server and a desire to dive deep into Windows System Administration. Are these fields too separate to combine skill sets? Would I be marketable as a Windows Admin who ...
0
votes
1answer
27 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
23 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
51 views

SQL Server 2012 Express installation failed

I'm trying to install SQL Server 2012 Express on a computer with Windows Server 2012 Foundation, I must recall that this is an Active Directory domain controller but I cannot install the server on ...
2
votes
0answers
40 views

Using SQL Server with BitLocker

I have an application that is running on a device that has two partitions: C and D. The application runs off of C while D contains the SQL Server database (mdf file). In addition, D is also encrypted ...
0
votes
0answers
29 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 ...
2
votes
0answers
24 views

Alwayson cannot fail over using tsql

I have an Alwayson test environment with the following settings. My test goals are as follows: When SqlNod1 is primary instance, I want SqlNod2 to answer read-only queries. When SqlNod2 is primary ...
1
vote
0answers
32 views

Moving Large Tables and All Indexes to a new File Group

I'm looking at implementing File Groups on an existing database that's roughly 600GB. The largest hurdle I have is actually setting this up in production. I need the database to still be available but ...
0
votes
2answers
25 views

Does a mirroring configuration requires the database do stop receiving requests?

I want to configure a SQL Server 2012 Mirroring. I know that I have to create a full backup of the Principal server and restore it at the Mirror server. After that, I will backup the transaction log ...
4
votes
0answers
93 views

How to set MSDN in order to open on a certain version of Microsoft SQL Server?

In a network, there are certain different installed versions of Microsoft SQL Server, starting with 2005, 2008 and 2008 R2. Is there a specific option of MSDN that can fix the opening of new pages on ...