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
votes
1answer
390 views

Deleted rows but database size is still large [duplicate]

I am using SQL Server 2008 Express which has maximum database size limit of 10 GB. Every month I hit the limit and the application can't store more data. To overcome this problem we run a job every ...
7
votes
2answers
3k views

Updating a table with more than 850 million rows of data

I have been tasked with writing an update query to update a table with more than 850 million rows of data. Here are the table structures: Source Tables : CREATE TABLE [dbo].[SourceTable1]( ...
2
votes
3answers
3k views

Getting 'specified network password is not correct' when trying to change password

After changing my network password, I went straight to the SQL Server Configuration Manager (SQL Server 2008) to update the passwords for the SQL Server and SQL Agent services. (Background info: the ...
0
votes
1answer
834 views

How to fix filestream?

I have SQL Server 2008 R2, when I try to access any value stored in filestream I get the following error: Msg 233, Level 20, State 0, Line 0 A transport-level error has occurred when receiving ...
1
vote
0answers
163 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 ? ...
2
votes
2answers
141 views

After moving a DB to a new disk, the log file isn't dumping data to the DB

I recently added a new disk to our SQL Server box and followed these steps from Microsoft to move the .mdf file to the new drive. I opted to leave the log file on the original disk for performance ...
0
votes
0answers
189 views

SSIS Data Flow Task Slows Down [closed]

I am trying to transfer data from one table to another in the same database using SSIS. It seems to go fine (I can see the record count going up) until it gets to about 30 million records, then it ...
1
vote
1answer
1k views

How do I specify a linked server to a remote database over tcp/ip?

I have a remote database running on an IAAS provider and I need to be able to execute joined queries from my local workstation. I am having trouble because when I attempt to create the link it is ...
0
votes
1answer
102 views

Accidentally Deleted SQL Server Log Reader Service Account [closed]

Uh, I accidentally deleted the Security Login in my SQL server that allows for the reading of log files. Now, I can no longer see any of the log files in my SQL Server Logs node of SMSS:( What ...
1
vote
1answer
755 views

sql web-application Connection String for member of a domain group [closed]

In my testing environment, I have a local sql express (2008R) server instance. I've created a domain group and given it a login in the database. But now, how do I consctruct the connection string ...
4
votes
1answer
320 views

Accidentally turned down SQL memory too low to log in, how do I fix?

I turned down the Maximum Memory of the my SQL Server instance to 15 MB... Now I can't log in to increase it. How can I increase the maximum memory without logging in? Version is SQL 2008 R2
6
votes
2answers
2k views

Why use separate databases for high traffic/volume tables?

While looking at the database structure of an application I am using I recognized that it uses 3 different databases on the same SQL Server instance for different things. The first one contains the ...
1
vote
2answers
344 views

Clustered vs Nonclustered Index

My database currently has a primary Key/Clustered index on the ID column for each table. However, the application that connects to the database is always looking at views defined as: SELECT * FROM ...
6
votes
1answer
1k views

LATCH_EX Waits on Resource METADATA_SEQUENCE_GENERATOR

We have a process that generates an inventory report. On the client side, the process splits of a configurable number of worker threads to build a chunk of data for the report that corresponds to one ...
3
votes
1answer
3k views

How Should I Configure Memory for Multiple Instances of SQL Server?

We have a set of SQL Server instances (2008 R2) that run on the same virtual server. Each instance represents a stage in our development cycle (Dev/Test/Stage/etc.). The instances all need to be ...
2
votes
3answers
3k views

SQLCMD command is not able to insert accents

I am trying to run sqlcmd.exe in order to setup a new database from command line. I am using SQL SERVER Express 2012 on Windows 7 64 bits. Here's the command I use: SQLCMD -S .\MSSQLSERVER08 -V 17 ...
1
vote
1answer
1k views

Limiting user access to tables based on a ROLE

I have a SQL Server 2005 database to which I would like to LIMIT access. I have done the following: Created a database role called NO_HR Added the tables to this role under Securables that should be ...
4
votes
1answer
1k views

Compress backup file using T-SQL

Is it possible to compress a backup file to .zip (or another) in a stored procedure invoked from a maintenance plan? My maintenance plan contains these steps: check DB (consistency, re_index, maybe ...
-3
votes
1answer
812 views

SQL Server backup devices autentification by user without access to local computer account or AD [closed]

Please is there way to create procedure to create Backup Device by using different user account, for user account without acces to local computer and not defined in AD too, because description from ...
0
votes
2answers
152 views

Server side trace to database

How can I set up a server side trace that dumps to a database instead of a trace file? I set-up and tested a trace configuration I want with Sql Server Profiler that dumps only needed info straight ...
1
vote
1answer
311 views

I'm trying to disable xp_Cmdshell and rpc_out and when i run the commands on query analyzer it shows its diabled

I'm trying to disable xp_Cmdshell and rpc_out and when i run the commands on query analyzer it shows its diabled But after this i need to run a security scan report which provides me the following ...
2
votes
1answer
637 views

Update “NULL” string to Actual NULL value

I have a table that contains NULL values but the problem is that some of the values are actually string "NULL" and not actual NULLS so when you trying something like where date is null it will not ...
0
votes
2answers
1k views

Pull Subscription: process cannot read file due to OS error 5

I am trying to migrate a working pull subscription for transactional replication from one subscribing server to a new one. The subscribing server is at another site and is connected via a VPN tunnel. ...
3
votes
2answers
288 views

Reducing Log Impact During Re-Indexing

We use Ola's maintenance solution and its great. Regardless of method for re-indexing a major friction point with IT is the amount of log generated during the weekly re-indexing process. For a 1TB ...
3
votes
2answers
487 views

Time to apply transaction logs: does it matter how many logs?

When restoring from a backup in SQL Server, the procedure is to restore the .bak file and then apply any .trn files since the last full backup. Does it make a difference how many .trn files there ...
5
votes
3answers
5k views

Best practice for tempdb log file

I have read many blogs here and there about how to configure tempdb data files but i didnt found any information regarding the tempdb log file. Here's the strategy that I'm presently using with my ...
1
vote
0answers
841 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 ...
4
votes
1answer
754 views

.mdf vs .ldf Performance considerations

I just learned from an answer to this question that the .mdf and .ldf files that SQL Server uses are an important pair for the database. I previously thought the .ldf was just a non-critical log for ...
1
vote
2answers
83 views

Optimizations Possible - SQLServer

I have been given a query that takes about 1:30 to run. I was asked to optomize it as much as possible but am having issues making any headway on it. SELECT DISTINCT B.PROV, ...
1
vote
3answers
135 views

Proper way to export database to other servers

I am using SSMS (I am a software developer, not a DBA) and in each application release I need to release the database with its tables (some with data some with scheme only). I tried doing 3 things ...
-2
votes
2answers
137 views

SQL Server Transaction logs [closed]

Could someone tell me the role of transaction logs in SQL Server ? I have a transaction log file, after making a lot of transactions for testing purpose I take the backup of it via command. Sometimes ...
0
votes
2answers
86 views

How to write a script to push the server time to out?

Background: I am programming a database in Ms-Access and using SQL-server as the Back-end. But since my database will be a multi-user platform I need to make sure that whenever a user is posting data ...
0
votes
2answers
936 views

Only allow one checked row in a Column in SQL Server [duplicate]

Background: I've only just begun programming in SQL... barely begun even. But I have been thrown into the deep-end left to find a way and learn to program SQL. Question: Is is possible to have a ...
2
votes
0answers
228 views

Can't get users default schema to change - SQL Server 2008

We are migrating from a SQL Server 2008 instance on a shared host to our own box. Our issue is we have a bunch of tables, procs and views that are prefaced with a schema (let's call the schema 'me') ...
7
votes
1answer
2k views

SQL Server Transaction Backups vs Logs

I've inherited a moderately-sized business-critical SQL Server 2008 database and am trying to wrap my head around backup planning. (I'm a developer, not a DBA.) The way our system is set up right now ...
2
votes
2answers
180 views

Moving one TempdB on 3 instance server

I have a large virtual SQL Server (Full 2008R2). I run 3 SQL instances and would like to relocate the TempdB database file to another location, splitting off from the TempdB log file. The trouble I ...
6
votes
2answers
940 views

problem running xp_cmdshell when Application Name set in connection string

I have an app on 10 or so servers that runs a few xp_cmdshell statements against MSSQL 2008. It works fine on all the servers except for one. To make things worse, I can run all the commands in SQL ...
7
votes
1answer
1k views

How does SQL Server generate a query execution plan that adds up to 6,000%? [duplicate]

Today I was on The Heap and was looking at a query plan for something I thought could be improved. However, it created something that shook my belief in the SQL Server query optimizer. Can I still ...
0
votes
1answer
273 views

exec xp_cmdshell 'sc \\<servername/serverip> start <service_name>'

When I execute this on sql server on another machine (in same sub net) I am getting "Access is denied". But when I did it from command prompt (sc \ start ) it is working. Please advice why I am ...
5
votes
1answer
169 views

Best practice for copying tables from server to server

Not being a DBA and not having sysadmin privileges to do a backup/restore, would the following be a good solution for copying a set of tables? (I have a linked server from serverA to serverB) ...
5
votes
5answers
4k views

SQL Server 2012 AlwaysOn: need to automatically add databases by script- T-sql or PowerShell

I've installed and successfully configured our SQL Server 2012 AlwaysOn 2-node servers for our new "Intranet" that is coming out. I've gotten AlwaysOn working great, and our Front End servers for the ...
14
votes
2answers
14k views

How to optimize a query that's running slow on Nested Loops (Inner Join)

TL;DR Since this question keeps getting views, I'll summarize it here so newcomers don't have to suffer the history: JOIN table t ON t.member = @value1 OR t.member = @value2 -- this is slow as hell ...
4
votes
1answer
261 views

Buffer usage for index with no reads

Using SQL Server 2008 R2, the main transactional table in a vendor database is massive compared to all others and has about 14 indexes. Some of these indexes don't get used in our environment, but we ...
7
votes
3answers
190 views

How can I verify that a full database restore reflects the exact source database in SQL Server?

We are decommissioning our old SQL Server 2000 Ent. instance in favor of SQL Server 2008 R2 Ent. My planned migration path is: Terminate client connections (2000) Full Backup (2000) Restore (2008 ...
4
votes
2answers
297 views

Executing Child packages without using master package

I have many Fact and Dimension packages which are executed using vb script . Today one of my seniors proposed that these packages should be executed individually instead of creating a master package ...
1
vote
2answers
2k views

Can SQL Server 2008 / 2012 have execute permission in a function for a user, but not for a table used in the function?

I have a function that returns a table. This function SELECTS DB1.dbo.table1 user1 has SELECT permission in this function only, but when selecting from the function error comes up stating that the ...
1
vote
1answer
348 views

SQL Server 2012 Availability group disk configuration options

Background I am quite far into the process of setting up a 2 server SQL Server 2012 Always on availability cluster to provide redundancy with a readable secondary replica of all our databases. Since ...
2
votes
1answer
3k views

Migrating from SQL Server 2005 to SQL Server 2008 R2 on a different box

We currently have a SQL Server 2005 instance hosting a lot of application specific databases (ArchiveManager, SolarWinds, Kaspersky etc). We are planning to deploy a new SQL Server 2008 R2 instance on ...
2
votes
2answers
102 views

Querying number of subscription to each publication

We have a production box that has about 60 publications on it. Some of these are used, and some seem to not be... What I need to do is create, or find, a script that will get the count of ...
1
vote
2answers
375 views

Unique Constraint with multiple null columns

I have two tables PC(Id,EmpName Not NULL, PCName NULL, HostName NULL,.... PhysicalLocation NULL, PCType Not NULL) PCNetwork(Id, EmpName Not NULL, PCName NULL, HostName ...