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
282 views

sql server 2008 email notifications

I have set up a profile and operator within SQL Server 2008. I also have an operator that is a group in MS Outlook. When I use the single user address as the notification address when a job ...
1
vote
2answers
1k views

SSIS error Property BackupDirectory is not available for Settings

I am trying to edit the SSIS Back Up Database Task And it gives the folowing error Property BackupDirectory is not available for Settings 'Microsoft.SqlServer.Management.Smo.Settings'. This ...
4
votes
2answers
2k views

How to obtain SIDs of Sql Server installed NT Service Accounts

I am using WMI to obtain members of server local groups, as well as the SIDs of the members. The WQL queries work for members that are local users, local groups, AD domain users and AD domain groups. ...
1
vote
0answers
588 views

Why is the next scheduled run date for my SQL Server job NULL? [duplicate]

I've been dealing with the Microsoft SQL Server Agent with regards to scheduling jobs. I'm trying to find out what the next scheduled run date for a bunch of jobs that were created where the job ids ...
-3
votes
5answers
14k views

Safely deleting a SQL Server log file (.LDF)

I can make sure my app is in a consistent state. I can rollback all the uncompleted transactions if any (just in case) it's ok I can DETACH the database What do I need the log file for after that? ...
5
votes
1answer
1k views

How can dm_db_index_usage_stats show 0 for user_seeks and user scans but a large number for user_lookups?

I'm probably not understanding something but here is the question. I have done a query on dm_db_index_usage_stats. I've noticed that a couple of my indexes have large numbers (6.5 million and 20 ...
0
votes
3answers
203 views

Is it possible to check a date in SQL?

I'm trying to write a Microsoft SQL Server stored procedure which takes an account ID, and returns an authentication ticket and whether the ticket is expired. Something like this: SELECT ...
0
votes
0answers
32 views

Fix missing performance counters [duplicate]

Possible Duplicate: How to revive SQL Server 2008R2 performance counters? On one machine, I have an instance of SQL Server 2008R2 Enterprise, Visual Studio 2010 and VS 11 Developer Preview. ...
2
votes
1answer
163 views

Profiler: Only want to see Provider Errors

I'm replaying a trace in Profiler, and I'd like to only see the Provider Errors. Granted, there are ~30,000 of them but I'm not concerned at the moment about row update conflicts, foreign key or ...
3
votes
1answer
1k views

Migrating Sql Cluster Installation To New Drive

We are migrating from an old SAN to a new SAN and need to migrate our Sql instance to new LUNs. We are able to migrate the data without any problem, but the Sql instance itself is clustered ...
26
votes
2answers
11k views

What is the difference between a connection and a session?

What is the difference between a connection and a session and how they are related?
3
votes
1answer
145 views

Table view created with triggers, someone please explain why?

I'm part of a project that inherited a piece of software that has a unique MS SQL database design that I'm trying to understand why they designed it the way they did. Basically for every table, for ...
0
votes
2answers
84 views

SQL Server Stored Procs not parameterized, leading to high compilations?

We're experiencing about 300 SQL Compilations per second, and we use very little dynamic SQL. However, I noticed that in SQL Profiler our calls look like: exec cid.dbo.uspCIDLog ...
2
votes
1answer
285 views

Execute Queries Against CMS within SSRS Reports?

Is it possible to execute queries against a Central Management Server (CMS) using SSRS? For example, I know of no way to tell a stored procedure that it is inherently supposed to call the CMS, so it ...
5
votes
1answer
2k views

Performance difference between SQL Server Linked Server and direct query

A Management Studio query pane connected directly to a remote sql server executes and displays a simple table query of (SELECT * FROM table) in just under 2 seconds. The same Management Studio but ...
6
votes
4answers
2k views

What is the best approach to parsing a large amount of strings?

I have a table with over 400,000,000 records and I am looking for advice on how to parse it quickly. TheNameTable ( NameID int primary key, TheName varchar(500) ) The names are stored like ...
13
votes
3answers
2k views

Does a SQL Server bit column really use a whole byte worth of space?

I was poking around SSMS and noticed the "size" of my INT columns were 4 bytes (expected) but I was a bit shocked to see my BIT columns were a whole byte. Did I misunderstand what I was looking at?
2
votes
1answer
266 views

Query tuning - SQL Server

One of our developers are trying to run the below query on a development server, which involves pulling data from a linked server, production. The query ran for more than 14 hours before it was ...
2
votes
1answer
105 views

don't want to be able creating stored procedures with incorrect

Right now I can execute a CREATE PROCEDURE or an ALTER PROCEDURE script with incorrect table and column references in the MS SQL Server Management Studio and using ADO.NET commands. The scripts run ...
5
votes
1answer
221 views

Does the transaction isolation level affect indices as well?

Here's one for the SQL Server gurus: if I set my SQL Server 2008 transaction isolation level to READ UNCOMMITTED, does that also affect the index pages? E.g. using ISOLATION LEVEL READ UNCOMMITTED, ...
3
votes
3answers
917 views

Does sp_spaceused data contain more than the sum of each table data?

I wanna monitor the size of each table in my database. After doing so, I was wondering why the sum of the data of each table does not correnspond to the data size of the whole database I get after ...
10
votes
3answers
6k views

Where can I find example databases for MySQL, SQL Server and Oracle?

I want to experiment with the 3 large database management systems. For this purpose it would be cool to have the same database (the same tables, etc.) for each of those. Where can I find sql scripts ...
6
votes
3answers
3k views

SQL Server Primary key / clustered index design decision

Looking for some advice regarding a table / index design decision I've got to make on some tables that I've got to port into SQL server from an existing 4GL based database. I've got a product history ...
0
votes
1answer
167 views

Connect to a Windows Authentication SQL server in SQL Server Authentication mode?

Is it possible to connect to a SQL server in SQL Server Authentication if the server has been installed with Windows Authentication?
5
votes
1answer
3k views

On-Demand Fuzzy Lookup

We've got a customers table (Who doesn't?), containing many records that are, from a business perspective, duplicates. I've been able to create an SSIS package to perform fuzzy grouping, and report on ...
1
vote
1answer
225 views

Is it possible to schedule table update/refresh in Oracle Application Express?

I have SQL Server data dumped into a text or csv file available via HTTP. Is is possible to schedule Apex to create a table on that data and keep it updated? How?
1
vote
3answers
1k views

SQL Server : Execute as multiple users simultaneously?

I need to query a proprietary database where the software vendor has set tight permissions on each schema (one username per schema), and each schema-user is only allowed to read from their own schema. ...
1
vote
1answer
570 views

Get statistics of open connection to linked servers

How can I get information about connections from my MS SQL 2008 server to linked servers (actually it's an Oracle db)? Things like number of currently open connections, and history of opened and ...
0
votes
1answer
261 views

Thwarting some awful parameter sniffing

I've got this fairly simple reporting procedure that searches through inventory transaction data (stuff being received, moving around the warehouse, etc). The whole thing is listed below - I've only ...
3
votes
1answer
806 views

How can I execute multiple DDL statements within a transaction in Oracle?

Is it possible to execute multiple DDL statements under a single transaction with Oracle database (10g etc.?) What I'm trying to accomplish is some sort of "upgrade" functionality of the database ...
2
votes
3answers
4k views

How can I set up SQL Server 2008 users without Windows/Domain accounts?

I'm trying to do this through the SQL Server Management Studio GUI. The user accounts will be accessed by applications directly, so I don't want to create Windows user accounts. I'd rather use ...
2
votes
1answer
992 views

tempdb on raid1 isolated or raid10 shared with high write db

PROPOSAL 2 8x600gb raid 10 mdf array 4x600gb raid 10 ldf array PROPOSAL 3 8x600gb raid 10 mdf array 2x600gb raid 1 ldf array 2x600gb raid 1 tempdb mdf/ldf array READ/WRITE STATS ON ...
4
votes
6answers
1k views

Does SQL Server execute queries in parallel?

Does SQL Server execute queries in parallel? In other words, if I run a heavy query that takes 10 seconds to execute, and at the same time start another heavy query that takes 10 seconds, will the ...
18
votes
5answers
7k views

SQL: What is slowing down INSERTs if not CPU or IO?

We have a database for a product that is write-heavy. We just bought a new server machine with a SSD to help. To our surprise, the insertions were not faster than on our old machine with much slower ...
2
votes
2answers
273 views

Can I query a copy of a database without impacting performance of the primary?

I am working with a partner who has a large (150,000,000 records and growing) MSSQL database. They query and populate the database with proprietary software which I cannot easily influence. I would ...
2
votes
1answer
318 views

SSAS Dimension Help - Finding Values Not In the Dimension using Role Playing

I have a Fact / Fact Less table that has a list of Products likley to be purchased by client. Client ID Product ID 1 1 1 2 2 2 2 5 etc... I need to to allow ...
2
votes
1answer
899 views

Index physical stats DMV - Object ID/table not found

I have installed SQL Server 2012 RC0 on my laptop recently and I was trying a demo which illustrates how shrink database will cause fragmentation. I created a table, a clustered index on the identity ...
8
votes
3answers
636 views

Would it be considered as a bad practice to have multiple nullable FKs on a table in SQL Server

On my database structure in SQL Server, I have 3 types of products which requires different information about the order. So, I created one Customers table and three different orders tables: ...
1
vote
1answer
281 views

Sending SQL Server query as CSV via e-mail

Currently I'm using SSIS w/ a hacky solution to get around it not supporting auth on SMTP servers. Is there a better way I can save a query to a CSV file, then mail it as an attachment? Thanks
3
votes
1answer
64 views

Do SQL Server disabled databases cause any usage concerns?

I have a SaaS e-commerce app. When clients stop using the service I disable their SQL Server Database and User Account rather than delete them. Do these disabled databases cause any concerns related ...
4
votes
2answers
241 views

Can I be notified of a rollback in my DDL Trigger?

I'd like DDL changes in SQL Server to trigger an external process (outside of SQL). The problem is, is there a way for me to be notified via my trigger that a rollback occurred? For instance, with ...
24
votes
1answer
6k views

Why is using a table variable more than twice as fast as a #temp table in this specific case?

I was looking at the article here Temporary Tables vs. Table Variables and Their Effect on SQL Server Performance and on SQL Server 2008 was able to reproduce similar results to those shown there for ...
11
votes
3answers
3k views

Insert if not exists, concurrently

I am having concurrency issues with my inserts in a stored procedure. The relevant part of the procedure is this: select @_id = Id from table1 where othervalue = @_othervalue IF( @_id IS NULL) BEGIN ...
0
votes
3answers
142 views

What should I use as a primary key/index for a table with no unique columns that are mostly written to?

I have a table on a SQL server database that stores logging information about various user activity. Date/time, user id, and a few columns that specify where and what was done. None of this data is ...
1
vote
2answers
173 views

Execution Plans Query

I want to check the estimated number of rows of a query in MS SQL Server. I can right click on the query and select "display estimated execution plan". but I want to do the exact thing with a hard ...
3
votes
2answers
970 views

Shrink Log File without breaking Log Chain

What is the best way to shrink a log file without breaking the log chain? I realize you can do something like: alter database yourDb set recovery simple go dbcc shrinkfile(LogFileName, 0) go alter ...
3
votes
3answers
2k views

Is it good idea to change Simple Recover Model into Bulk-Logged on ETL system?

We are having an ETL process which inserts lots of data into tables. This database is set to Simple Recovery Model and the transaction log is growing a lot. I was thinking that would it help to set ...
2
votes
1answer
828 views

Sql Server 2005 - sqlcmd with output to shell and file

I do some command line batch (.bat) with sqlcmd as this way: sqlcmd -i Scripts\STEP01.sql -o PROCESS.log -S MYSERVER -E -d MYDATABASE and i need an output file (it's works currently) and also the ...
2
votes
2answers
69 views

Best index for this scenario

There is a table in our database tblCustomText( ParentID int NOT NULL, CustomFieldID int NOT NULL, Value char(50) NOT NULL, Log_CreateDate datetime NOT NULL ) (ParentID+CustomFieldID) is ...
2
votes
3answers
4k views

After I replaced master mdf/ldf files, can no longer log in

Today I couldn't start SQL Server process anymore. Reason: The log scan number (213:18:1) passed to log scan in database 'master' is not valid. This error may indicate data corruption or that the ...