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)

3
votes
1answer
150 views

How can I determine what is using a particular resource (table, view, or function, etc) on my SQL Server?

I've been looking for tables that could use better indexing. I've created a stored procedure that provides a list of tables that have no indexes other than a primary key: CREATE PROCEDURE ...
6
votes
2answers
2k views

Bitmask Flags with Lookup Tables Clarification

I've received a dataset from an outside source which contains several bitmask fields as varchars. They come in length as low as 3 and as long as 21 values long. I need to be able to run SELECT queries ...
-1
votes
1answer
531 views

SSIS SQL Result to tab delimited txt file [closed]

I have created a package that Runs a Sql Query and then puts the results into a flat tab delimited txt file. When I opened the flat file in excel everything was in the right columns but in columns ...
2
votes
1answer
513 views

Setting DATEFIRST to 6

I would like to set FIRSTDATE to 6 (ie: saturday), i have read that to change it parmanently i could set the default language of the login to one of an existing language from the sys.syslanguages and ...
3
votes
1answer
248 views

SQL Server 2012 catalog.executions to sysjobhistory - any way to join them?

I have exhausted my resources and can't find a foolproof way to join the ssisdb.catalog tables to the jobs that run them. Trying to write some custom sprocs to monitor my execution times and rows ...
1
vote
1answer
200 views

How to suppress an informational raiserror message

I have a setup script that calls sp_configure a few times to set up some system variables, it works fine but I have a few of the following statement Configuration option '%ls' changed from %ld to ...
0
votes
2answers
136 views

Can I use replication/mirroring to have a “Current” database and a “Full History” copy?

I have a database that is used for current operations. The amount of data is starting to get a bit to much for the applications using it. Most of the data is older and is very rarely needed. I am ...
6
votes
2answers
220 views

How do I demonstrate Transaction Log activity?

Say I have the following setup: use tempdb go set nocount on go create table MyTest ( Column1 varchar(100), Column2 text ) go insert mytest (Column1, Column2) select REPLICATE('a', 100), ...
0
votes
2answers
1k views

Estimated Execution Plan SQL Server Sort?

I'm running a query and its taking a age to execute, looking at the execution plan I can see that 51% of the cost is in the SORT? when in the actual query i am not ORDERING BY anything. Anyone got ...
3
votes
1answer
2k views

Why is a hash match operator in this very basic query

I'm beginning to learn some about looking at execution plans and making queries more efficient Consider these two basic queries select distinct pat_id, drug_class, drug_name from rx select pat_id, ...
0
votes
1answer
362 views

Executing sys.dm_fts_parser without sysadmin server role

A web application needs to execute sys.dm_fts_parser to discover which words SQL Server Fulltext Search used to match documents for the purpose of syntax highlighting. That stored procedure can only ...
3
votes
1answer
1k views

Azure SQL Administrator Can't Access Master Database

I created an SQL server and database. I can log in to the database manage page with my administrator account, and manage the database I created, but when I try to look at the master database, it says: ...
6
votes
1answer
255 views

Role of Database Administrators

I am currently working as an application developer on a project which involves the creation of a new SQL Server database. I am actively working with a group of DBAs who will play some role in the ...
1
vote
3answers
12k views

How to migrate SQL Server to MySQL

I'm trying to migrate a SQL Server db to MySQL, and I'm having a tough time. I've tried: MySQLWorkbench -- migration tool fails because my login only shows views in SQL Server, not the tables ...
1
vote
2answers
627 views

SSIS Visual Studio 2008 reference variable scope in expression builder

When creating an SSIS package in Visual Studio 2008, in the expression builder, I know I can reference a variable by using @[User::FilePath] for example but this only works if you are evaluating the ...
-7
votes
2answers
620 views

How can I check for SQL Server performance problems using T-SQL? [closed]

I know how to use the Profiler, Performance Monitor, and Activity Monitor. I want to find a way to troubleshoot performance using T-SQL. How can I check for Microsoft SQL Server performance problems ...
0
votes
2answers
7k views

How to undo DROP TABLE statement?

I’ve accidentally executed DROP TABLE statement on a wrong table. I have backups that are several days old that I can use to recover table and most of the data but not all. I know that SQL Server ...
0
votes
2answers
150 views

SQL Server Change Tracking

I work for a company of about 80 employees and they all seem to need access to our database on a regular basis. I don't have time to write applications to meet all of their needs so I'm just going to ...
3
votes
1answer
675 views

Automatic database file creation based on database file size in SQL Server 2008 R2

Now i am using SQL Server 2008 R2 database for data logging. The name of the database profile is MASTERDB. That profile has one data file called MASTERDB.mdf and one log file called MASTERDB_log.ldf. ...
36
votes
5answers
7k views

Which database could handle storage of billions/trillions of records?

We are looking at developing a tool to capture and analyze netflow data, of which we gather tremendous amounts of. Each day we capture about ~1.4 billion flow records which would look like this in ...
1
vote
1answer
2k views

How can I skip reboot check and remove command line appearing during install of SQL Server?

While i am installing SQL Server 2008 R2 using the configuration file method I sometimes get an error in installation due to system reboot checking. After restarting my PC, SQL Server installs ...
2
votes
1answer
804 views

sp_getapplock doubt

We are using sp_getapplock as a transaction level in a procedure which in turn calls another procedure where again we use sp_getapplock with the same resource names. I wanted to know whether this ...
0
votes
1answer
127 views

Advise On SQL Server Data Replication

We have a huge enterprise system, with geographically seperated SQL servers. We have some requirements related with data replication between these servers. We have considered the Sync Framework ...
2
votes
1answer
2k views

Install by command line

I am using following command line to install sql server 2008 r2 but its not installing.Also i am not getting any error or log in summary.txt "D:\SQLEXPR32_x86_ENU (1).exe" /q /ACTION= Install ...
1
vote
1answer
544 views

Two databases of same size, backups sizes are very different

This is not a big problem for me, but still, I would like to understand what is happening here. I have two databases on my SQL Server 2008 (10.00.1600) - they are restored from the same backup (and ...
2
votes
2answers
1k views

How does ORDER BY really work? [duplicate]

I have one question that confusing me. By logical query processing, the SELECT clause comes before the ORDER BY clause, and in theory, every step in a query creates a virtual table. So, how is it ...
3
votes
3answers
177 views

Providing access to the SQL server database for outside developers

I am beginning a project that will involve insert and updates to a sql server database from a website. I maintain the SQL server database and am providing access to the sql server db. My plan is to ...
6
votes
1answer
813 views

Newly discovered SQL Server Express has all databases inaccessible/offline

We have several remotes sites at my company and today one of the employees came to me and said their SQL reporting tool stopped working. Up until this point I did not even know this server or ...
6
votes
1answer
5k views

SSIS File System Task Copy File Could not find part of the path error

I have created an SSIS package that uses a File Systen Task (copy) that copies a file from 1 folder to another. The package runs fine when I run it from my local computer but when I import the package ...
5
votes
2answers
5k views

SQL Server 2008 R2 SP1 - Tempdb “Available free space” showing negative value

Please help as this issue is driving me nuts... Tempdb has four data files & one log file. They are all located on the same dedicated drive. When I right click on tempdb in SQL Server Management ...
3
votes
3answers
615 views

Programmatically find indexes that cannot be rebuilt online

I am automating rebuild and reorganise indexes using T-SQL. I run into problems with indexes that cannot be rebuilt online. Primarily this happens because ntext/nvarchar columns are included. Is ...
13
votes
2answers
3k views

ISO Week vs SQL Server Week

Okay so I have a report that does a this week vs last week comparison and our customer noticed that their data was "funky". Upon further investigation we found it was not doing weeks correctly ...
4
votes
1answer
844 views

How long does it take to do RESTORE WITH NORECOVERY

I am in the unfortunate situation of having to do a database restoration. My full backup was at 9.30pm (157MB) and there were incrmentatl backups at 11am and 3pm. The incremental backups are less ...
3
votes
1answer
365 views

SQL Server Restore from one database to another

One of our devs backed up a dev database, and then restored it in production. It's a new database for a new app that was deployed last night intentionally to prod. Now in the backupset table ...
2
votes
1answer
198 views

FOR XML is generating a empty first line

I'm parsing with flash a XML file generated by this code: :XML ON USE MyDatabaseName GO SET NOCOUNT ON SELECT * FROM ProgramacionDia as programa order by hora FOR XML AUTO, ROOT ('toflash'), ...
3
votes
2answers
2k views

Identifying which values do NOT match a table row

I would like to be able to easily check which unique identifiers do not exist in a table, of those supplied in a query. To better explain, here's what I would do now, to check which IDs of the list ...
2
votes
2answers
552 views

Differences Between Two Different Create Index Commands

Are there differences between these two scripts? Or would all of the extra tokens/attributes (ie: NONCLUSTERED, WITH..., etc...) for the 1st script be defaults in SQL Server 2008 for the 2nd script? ...
3
votes
5answers
2k views

How can I tell if a SQL Server backup is compressed?

We have recently upgraded from SQL Server 2005 to SQL Server 2012. Under SQL Server 2005 there is no option to create compressed backups as there is in 2012. If you attempt BACKUP DATABASE ... WITH ...
4
votes
5answers
1k views

Run Multiple Remote Jobs

I need to manually run a job on more than 150 sql server instances (sql server 2000, remote) from a sql server 2005 instance (the local server). The job is the same on all these instances. The job ...
4
votes
6answers
2k views

Stored Procedures under Source Control, best practice

I am currently using Tortoise SVN to source control a .NET Web Application. What would be the best way to bring our SQL Server stored procedures into Source Control? I am currently using VS 2010 as my ...
0
votes
2answers
2k views

Secure Linked Server - Non privledged user possible? Registry corruption?

Is it possible to use a non privledged Windows domain account to impersonate itself in a linked server? And why would it be unable to read the registry for available network protocols? Overview: ...
3
votes
3answers
9k views

Moving SQL Server to different domain

What are best practices/important steps when the Windows Server machine hosting SQL Server 2008 R2 is moved to another domain? What steps definitely/might need to be done for SQL Server before and ...
2
votes
4answers
849 views

Creating a copy of production database for reporting purposes

We previously ran Crystal Reports straight off our production database. This caused a direct impact to the users using the database. We moved to a new (dedicated) server and a new database and ditched ...
2
votes
1answer
2k views

SSIS Package Data Flow Task RollBack on Error

I tried running a package and it failed but I noticed in the output box (in visual studio) that it managed to write 2000+ rows to a table. I was wondering if an SSIS package would roll back the ...
0
votes
1answer
275 views

SQL Server Express on Windows 8 isn't locking MDF database files

Historically, if I go to rename a database that is currently being used by SQL Server, I get an exception. On this Windows 8 desktop I'm in.. my primary desktop.. I'm able to MOVE SQL Server ...
3
votes
2answers
13k views

Login failed for user Error: 18456, Severity: 14, State: 11

I have an AD group XYZ that I have added to SQL Server security with data_reader permissions. The XYZ group has around 10 users in there who are successfully able to access the SQL Server database. I ...
1
vote
0answers
198 views

Why Am I Getting Deadlock - Please Read Trace

can anyone help me? i'm getting deadlock on this trace, i'm using symmetricds and i can't understand why i'm getting a deadlock on a certain table. I'm using sql server 2008 r2, ...
1
vote
2answers
699 views

SQL Server 2012, restore database

I am using MS SQL Management Studio 2012 to restore the database from a .bak file. (That file is from the backup of the database on server) In my new database, the triggers are missing. Why did I ...
0
votes
1answer
1k views

Foreign Key - One Child Table to Multiple Parent Tables

Maybe I'm thinking of this problem in the wrong way, but we maintain an AccessControl table that is a child to several parent tables (e.g. CompanyItems, SystemFiles, etc.). I'm trying to make sure we ...
2
votes
1answer
3k views

Error on creating database in SSMS

I am using SQL Server Management Studio 2008. I am connect to localhost and I want to create a database. When I click on New Database, type the name and click ok, I get the message: Index was ...