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

Transaction log reported full but is not

Batch jobs error emails report: The transaction log for database 'WebDB' is full. No, it isn't. Its 90% free. The transaction log backups run normally. My hardware guy tells me the hardware is ...
1
vote
0answers
42 views

Failed to notify 'DBA Team' via email

I setup a test job to test out my failure notifications and now I'm getting the following stating it did not notify my operator via email. The strange thing is I ran the same exact setup script on ...
2
votes
0answers
36 views

SQL Server transaction log reported full when it isn't [duplicate]

The transaction log for database 'WebDB' is full. No, it isn't. Its 90% free. The transaction log backups run normally. My hardware guy tells me the hardware is running perfectly, with plenty of ...
1
vote
0answers
46 views

SQL Server transaction replication agent error

We are running transaction replication on SQL Server 2008 R2 SP3. Distribution agents are reporting : "Agent is retrying after an error. 3 retries attempted" every 10 minutes. Tried changing ...
1
vote
0answers
28 views

Replication / Bulk Update between Servers

I'm looking to update several tables between two servers daily to have a replica of the data available. My question is, what is the least resource heavy and most effective method to implement this? ...
-1
votes
0answers
22 views

Need urgent help for DataBase design decision [duplicate]

I am designing database for B2b market. Catalog: is Colletion of Product,size,prices,delivery date and other data. I need to design catalog on basis of three datasourceType .On The basis of ...
0
votes
0answers
31 views

RapidMiner Not Connecting To SQL Server Database Connection

I recently installed RapidMiner and tried connecting the application to my MS SQL database connection via the Manage Database Connections feature. I have followed video tutorials on integrating SQL ...
0
votes
1answer
37 views

How to get average according to last update time?

There is table - Item below, how can I get the average Value according to its 15 minute value from last record time? I am using SQL Server 2008. Table -- Item Table 15min_AVG
0
votes
0answers
17 views

Missing index recommendation for an already existing index [duplicate]

SQL Server missing index DMVs suggest to create an index which already exists. The existing one and the suggested one exactly overlap each other; they are single (same) column index with no included ...
0
votes
1answer
47 views

SQL Server CONTAINS ignores single quote before asterix [closed]

Let's say I have table NamesTable, which has text index on Name column DECLARE @String2 NVARCHAR(20) = '"SomeName''*"' SELECT * FROM NamesTable WHERE CONTAINS(Name, @String2) What does single quote ...
1
vote
1answer
50 views

Executed a Stored Procedure in the Production Server and the following warning message is shown [closed]

I executed a stored procedure on the production server; and though it shows that query has been successfully completed it doesn't allow me to close SQL Server Management Studio and the below warning ...
1
vote
0answers
47 views

Upgrade to SQL Server 2014 from 2008 R2

We are currently running SQL Server 2008 R2 and want to upgrade to 2014 but we need to leave some DBs at 2008 so we have decided to create a separate 2014 server and just migrate some DBs to it. Is ...
0
votes
0answers
24 views

Set up sql server db mirror specifying IP address for mirroring_partner_instance

Ok. I run: ALTER DATABASE DbName SET PARTNER = 'tcp://10.0.0.0:5022' Command completed succesfully Then run SELECT DB_NAME(database_id) AS 'DatabaseName', mirroring_partner_instance FROM ...
1
vote
0answers
50 views

Zero rows updated while archiving rows [closed]

I'm trying to archive rows from one schema to another on the same server using the approach outlined here: http://dba.stackexchange.com/a/31461 BEGIN TRAN BEGIN TRY INSERT INTO ...
1
vote
0answers
47 views

When will SQL Server automatically use a supporting indexed view?

I have the following expensive query that runs against our data warehouse: SELECT d.DateYear, COUNT_BIG(*) AS WidgetCount FROM Widgets AS w JOIN Dates AS d ON d.DateId = w.DateId WHERE ...
0
votes
0answers
30 views

Scheduled Job Succeeds, Does Nothing; Manual Job Succeeds, Performs Requirements

I have a job in SQL Server Agent (2012 Instance) that deletes rows from a table. When I manually run the job, it succeeds without issue and in reviewing the table, does exactly what I want it to do. ...
0
votes
0answers
48 views

Error: Package ‘Microsoft SQL Server Management Studio Package’ failed to load [closed]

I have SQL Server 2008 R2 64bit installed with SQL Server Management Studio (SSMS). I've been using SSMS for log time but recently when I try to open SSMS, I get the above error. I've tried all the ...
0
votes
3answers
98 views

Database design what are your thoughts

For years I have dinked with and now considering making it into a real project. I am thinking about developing a 'driver' of sorts that sits on top of RDMS( oracle, MSSQL, MySQL - others to follow). ...
0
votes
1answer
49 views

How to determine which statement is blocking an update in SQL Server

We have an UPDATE statement running in a large J2EE application that is getting blocked by some other statement. The update is using the primary key, so it should affect only one row. The isolation ...
1
vote
1answer
24 views

Clear missing index DMVs

How can I clear missing index DMVs such as dm_db_missing_index_group_stats, dm_db_missing_index_groups and dm_db_missing_index_details? I don't have an option to restart the server or taking it ...
3
votes
1answer
94 views

How to avoid Forced reboots using unattended upgrades to SQL Server 2014

Upgrading seven instances from SQL Server 2008R2 to 2014 via the ADMINISTRATOR command line using a configuration file. The upgrade runs fine but when I move on to upgrading the next instance I get ...
0
votes
0answers
29 views

SQL Server 2008 Linked Servers Consistently Dropping Connections

I have set up a Linked Server between 2 SQL Server 2008 R2 databases (both 10.50.1600). The linked server worked normally for several weeks until I received reports that users were not able to hit ...
1
vote
1answer
31 views

SSRS executionlog having rowcount 0

I'm reviewing some execution logs for long running queries in SSRS. A common thread I'm seeing is reports that seem to take a few hours to process, with a rowcount of 0. I'm using the following query ...
-2
votes
1answer
43 views

Find difference between two database and output them in a script sql [closed]

I had a SQL Server 2008 R2 database. I have dump it and made some mods in a copy. So, I have two databases: 1) the older version 2) the new version I need a script SQL to update the number 1) to ...
0
votes
1answer
46 views

SQL Server 2012 Enterprise: Copy Databases to New SQL Server, Same Domain, Users, Etc

Am having trouble with what seemingly should be an easy process. I'm a SQL Server n00b, so please be gentle and very explanatory with your answers. Currently, I have a SQL Server 2012 cluster ...
0
votes
1answer
66 views

Identity/Primary Key columns pattern for performance in SQL?

I was discussing about database layout/design with a friend and I got some questions about performance and best practices. I'm mainly a software programmer, so I may lack "common sense" regarding ...
-1
votes
2answers
51 views

What happens when play with constraints [closed]

I'm inserting data from one DB to one other on another instance by using the following method: Create insert into scripts from the source DB. TargetDB: DROP constraints, insert data and Create ...
1
vote
2answers
118 views

Programmatically determine whether a database was shut down cleanly or whether it required crash recovery

There are various ways to shut down the SQL Server service (I can think of at least: SHUTDOWN, SHUTDOWN WITH NOWAIT, stopping the service (including bugs), killing the process, power loss). An ...
2
votes
1answer
47 views

Listing expired SQL logins

For audit purposes, we need to list all SQL logins with their creation and expiration dates. Is there a way to script this for all of my SQL Servers, rather than performing the task manually through ...
1
vote
1answer
73 views

Powershell Output Help

I have wriiten the following SQL script to execute using powershell. cls foreach ($svr in get-content "demo.txt") { $con = ...
0
votes
2answers
51 views

what is a good use case for splitting user table by role

I have a requirement where there are primarily 5 roles in the system. Each of these roles increase in hierarchy from junior to senior most role. Each junior role is a subset of its immediate next ...
0
votes
2answers
76 views

Writing Conditions in Left join sql [closed]

I want to know why these queries give different results Select * FROM Table1 T1 Left Join MyTable MT ON MT.studentId = T1.StudentId AND T1.class = 7 Select * FROM Table1 ...
2
votes
1answer
50 views

Having problems with concurrency while trying to lock a record in custom messaging system (Queue)

We are building our own custom messaging system and are having concurrency issues. Here are the rules: A process (EXE) console application locks 3 records and returns them No other process running ...
0
votes
2answers
84 views

Adding Last 12 Months to a row in a table (SQL Server)

I want to add the last 12 months to a SQL Server table, something like the following: FixedText Jan-14 Feb-14 Mar-14 Apr-14 May-14 Jun-14 Jul-14 Aug-14 Sep-14 Oct-14 Nov-14 Dec-14 Jan-15 Please can ...
7
votes
4answers
577 views

At What Point Should I Split or Partition a Very Large but Simple Table

Our site has some large but simple (INT, INT, DATE) tables for stats. Each table has up to 300,000,000 rows, and gets bigger every day. The hosting provider has suggested that we split or partition ...
3
votes
1answer
50 views

How to create a Relation between a table and a many-to-many relation table

I am buildng a new database inside an Sql server 2008 r2.I have the following tables & business rules:- Skill that have predefined levels assigned to it, such as junior, senior, manager. Staff ...
2
votes
1answer
45 views

Resource cost of a blocked query

I'm currently reviewing a case where an SSRS server is experiencing frequent blocking and deadlocking. The reports are not business-critical, and they are frequently killed to alleviate the blocking. ...
1
vote
1answer
47 views

Add a column with Not Null [duplicate]

I have a existing table in which i am adding a column as NgoId whose datatype is int. I want to add as NOT NULL to the column . When I'm adding this I am getting the following error: Unable to ...
2
votes
1answer
63 views

How to remove identity specification for multiple tables

I am having total 109 table in Database and now i am migrating to Amazon server with identity insert and now i want to remove auto increment column specification for all tables. How set auto increment ...
5
votes
1answer
285 views

Why not rebuild indexes with page count <1000?

I use Ola Hallengrens script for Index maintenance. Before I did that, I used the following query to see which indexes are fragmented most: SELECT dbschemas.[name] as 'Schema', dbtables.[name] as ...
1
vote
0answers
46 views

Import a directory of dbf files to sql server

I am trying to import .dbf files using for each container in SSIS. But i keep getting errors to map the files and other errors. Here is what did. Use for each container. Use a data flow task in ...
4
votes
2answers
1k views

Join on dm_db_index_physical_stats very slow

I'm running a small query below in a MS Dynamics AX 2012 database and it runs more than 5 minutes which I had to cancel and it is showing PAGEIOLATCH_SH wait type. The database data file is 560GB and ...
1
vote
0answers
35 views

Error 18456 State 38 on Deleted Databases [closed]

I deleted some databases but a service account keeps trying to access them. This is filling up my SQL Server errorlog file. I used profiler and got the names of the databases, but I do not know how ...
3
votes
2answers
77 views

Store Repeated Data

I have a table (Key tinyint, Value bigint). There are a billion rows for each distinct Key value and only about 100 distinct Key values. Is there a way to not have to store Key in the every row ...
12
votes
2answers
242 views

Paging performance with customizable sorting over many millions of rows

In our application we have a grid where users can page over a large number of records (10-20 million). The grid supports sorting in ascending and descending order in a number of columns (20+). Many of ...
4
votes
1answer
67 views

Schemas and user permissions

When our custom, home-grown CMS creates data tables using the GUI, it creates them against the site-specific user schema (i.e. sitename) instead of the dbo schema. The issue is that our ...
1
vote
0answers
38 views

There was an unknown error applying the filestream settings. check the parameters are valid. (0x80070002) [closed]

I am getting the following error while trying to configure FileStream in SQL server 2012. There was an unknown error applying the filestream settings. check the parameters are valid. (0x80070002) ...
9
votes
2answers
158 views

Understanding statistics, execution plans, and 'ascending key problem'

I'm trying to better understand (conceptually) the relationship between statistics, execution plans, stored procedure execution. Am I correct in saying that statistics are only used when creating the ...
2
votes
1answer
82 views

Why can't trigger be dropped from database?

One of the databases I manage is provided by my company's vendor which we restore in order to pull data out for our data warehouse. I'm writing a stored procedure to go through the database users and ...
6
votes
2answers
296 views

Using indexed views for aggregates - too good to be true?

We have a data warehouse with a fairly large record count (10-20 million rows) and often run queries that count records between certain dates, or count records with certain flags, e.g. SELECT ...