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
0answers
3k views

Transaction log full due to log_backup

I am testing how certain operations are logged under different recovery models.Below are steps i have did till now 1.create database in full recovery model 2.take backup 3.create a table and insert ...
1
vote
0answers
109 views

SQL Server : ALTER TABLE tablename SWITCH PARTITION 2 to tempempty

Have a sliding partition where I need to remove the trailing partition when they expire. I create an empty table that matches the existing table. When I create the empty table, I specify the file ...
1
vote
0answers
488 views

Is it possible to use a temp table in a data flow source?

I have a data flow in a 2012 SSIS package where I'm trying to use a temp table as the data source. I'm using an OLE DB data source with a SQL Command Data access mode. My code looks like this: ...
1
vote
0answers
49 views

Column Data Type for Bitwise Comparison?

I have a table where I have an int32 column storing values for bitwise comparison. I've ran out int space with a int32. I can convert to int64 but that will just prolong the inevitable. Is there an ...
1
vote
0answers
47 views

Will redeploying a project to the SSISDB invalidate current jobs

I’ve been given 2 dtsx packages to replace 2 in production. This is for a SQL 2012 server with the packages deployed in the project model. The only way I see to do the update is to export the project, ...
1
vote
0answers
78 views

Errors in the metadata manager. The process type specified for the Effect dimension is not valid since it is not processed

Trying to hunt down an issue with an SSIS package we have and I don't know what to look for to help correct this issue. Error: Errors in the metadata manager. The process type specified for the ...
1
vote
0answers
52 views

Database Structure Definiton

This is a question more so on the table definition vs actual programming. I have 6 sets of potentially 255 unique fields. I have a potential of getting 40 million records per year of these. For the ...
1
vote
0answers
51 views

Creating SQL Azure login for single database

I want to create separate logins for each database we create on a SQL Azure database server which only have read / edit permissions for a single database and do not have drop permissions, and to ...
1
vote
0answers
98 views

What are the “additional actions” available for “Recovery Pending” databases?

I've used powershell to run a sql script on several databases on a test server. Disk space was low, so the script failed on 34 out of 75 databases. All fair enough. In any case, afterwards 10 of my ...
1
vote
0answers
55 views

Scheduling a task to run after a SQL SERVER 2012 executes a different set of scripts?

Im working on a project for a job I am interning for. I've had a few months of database design. I am still learning all the techniques. I am currently trying to schedule a console app to run every ...
1
vote
0answers
451 views

Error while Installing SQL Server 2012

I am facing the problem while installing SQL Server 2012 on my Lenovo ThinkPad. The same was working till now. However it seems, registry has been deleted. So I try to re-install same. But have no ...
1
vote
0answers
361 views

db_owner Member Can't Delete on Tables

SQL server 2008 R2. A user is part of an AD group. That AD group has a SQL account in this instance. That group has the following access to a Database: db_datareader db_datawriter db_ddladmin ...
1
vote
0answers
35 views

Extended Events missing documentation

I have been looking pretty hard for the documentation regarding the RingBufferTarget <RingBufferTarget truncated="0" eventsPerSec="1370714" processingTime="7" totalEventsProcessed="9595" ...
1
vote
0answers
48 views

Manual Fulltext index population time in SQL Server 2012

I would like to know if there is a way to see how much time did it take SQL Server 2012 to index all the data in a table? In my example I create the table, create the index and set the population to ...
1
vote
0answers
78 views

Database Mail not sending

I'm trying to send email using the DatabaseMail on SQL Server 2008, I can see my emails sitting in the msdb.dbo.sysmail_unsentitems But they just sit there, I get no error messages. I've checked ...
1
vote
0answers
67 views

Issue with MDS data when viewed in Excel addin after connecting to MDS Model

In MDS 2012, while exploring for a entity, I can see the data in Client and Product column are properly assigned as Code and Code {Name} as seen below: but while connecting to the MDS model via ...
1
vote
0answers
43 views

Identify SQL Server Version in TSQL

I need to identify a SQL Server 7 in TSQL, I try serverproperty but this isnt supported in this version, I have now sp_MSGetVersion but it returns a table and I dont know how I can get only the ...
1
vote
0answers
109 views

DBCC TABLE CHECK seems to hang

Our nightly maintenance plan includes a database integrity check which normally takes 45 minutes to complete. Now it appears to hang. When looking at the Activity Monitor, a series of process items ...
1
vote
0answers
171 views

SQL Server Reporting Services (MSSQLSERVER) Process using high memory

We have the Reporting Services installed on our database but we are not actually using it. Generally, the running process takes up a few MB but all of a sudden it has jumped to 4GB. We have restarted ...
1
vote
0answers
90 views

“Replicate” Table structures with sp_addscriptexec

In our customers environment is a massive central server (running SQL Server Enterprise 2008R2) and some distributed PCs (running SQL Server Standard 2008R2). The central server has a replication for ...
1
vote
0answers
388 views

exec sp_getapplock - Different behaviour using go or without go

we have a strange behaviour while using sp_getapplock (we tried to use this to solve a problem with a deadlock involving some insert while another session was trying to execute a ALTER SWITCH ...
1
vote
0answers
84 views

CONTAINS does not work with ROW_NUMBER

I have the following query: SELECT RowNumber = ROW_NUMBER() OVER (ORDER BY ID DESC) , ID , Name FROM Clients WHERE CONTAINS (Name, 'Jose') My client table has a single ...
1
vote
0answers
250 views

Backup failed due to lack of hard drive space…how?

I had a maintenance plan fail last night (runs daily) for the first time in ages. The following is the specific error I received, minus the actual database name: Extend Disk Backup: failure on ...
1
vote
0answers
43 views

What happens if SQL Server mirroring fails over and during synchronisation?

I have two sql boxes, one primary and one mirror. The mirror stopped synchronising last night for about 12 hours and so now the primary is transferring about 25GB of logs that built up. However ...
1
vote
0answers
63 views

Does reporting webservice url contain the function that helps to export the report to the client version?

The reporting webservice url contains the webservice url that contains all the information of the Reports which are created in SSRS. As the report has been created on reporting service, i want to ...
1
vote
0answers
164 views

How to get usage based optimization working on SSAS?

I have set up the configuration for SSAS to log the usage into the database, since the table did not exist I let it do that. However SSAS created the table OlapQueryLog under the schema of the SSAS ...
1
vote
0answers
818 views

Possible schema corruption. Run DBCC CHECKCATALOG

Good Evening to all. I was working with sql server 2008. Thing i did: Actually i was noticed that the free space available in C drive reaches below 1 GB .So i thought to Club the D drive with C ...
1
vote
0answers
629 views

Backup Restore Procedure error SQL Server 2008 R2

We use a stored procedure to do a backup and restore of databases as a copy function. This allows our front end users to spin up sites from pre created template databases. Lately we've been getting ...
1
vote
0answers
75 views

Why is this query stuck if there are no waits?

I am working with a vendor's activity logging system. One of the tables has 70+ million records and is constantly increasing at several hundred records per minute. They have a utility to delete old ...
1
vote
0answers
48 views

Transactions using Isolation Level on databases with FileStream

We have a highly transactional application. We have a requirment to upload huge data into our database that can happen for a duration of 5-10 minutes. During our upload time, the tables are getting ...
1
vote
0answers
66 views

Execute SQL at different server (with dynamic server name)

I'm using a settings table to configure on which servers a specific kind of data is stored, and I would like to do this as dynamic as possible without having to add the server as a linked server ...
1
vote
0answers
94 views

SQL SERVER 2008 Cursor Problem

I have a table that has some missing values for certain transactions. The value for a particular transaction is going to depend on the value of all preceding transactions. Because the preceding ...
1
vote
0answers
234 views

Loading image from file system into SQL query using openrowset

I have a directory with images and a table in my DB with the path of each file. The main application allow me to create reports where I can display an image, so I was thinking to use a query like: ...
1
vote
0answers
1k views

Management Studio Generate Script Errors

I am trying to generate a script (right click database, tasks, generate scripts, tables) from SQL Server Management Studio 2008 R2 Express and I keep getting an error. I read somewhere that it could ...
1
vote
0answers
500 views

Calculate the compound interest with variable annual rate

I'm moving this question from SO Some years ago I was asked to create something to calculate the current value of a lot of insurance policies, I came out with a query that worked fine, but I was ...
1
vote
0answers
31 views

data conversion error in SSIS 2005

I am encountering a tough problem when doing data conversion. My work is to generate fact table in ssis 2005, and there are several data that should be converted to other data type, so I use data ...
1
vote
0answers
92 views

How to copy a subset of SQL objects across databases within a transaction?

We already have a .dtsx package to copy a subset of tables (about 20) from one database to another (at least once in every month). It is using "Transfer SQL Server Objects Task". However this does not ...
1
vote
0answers
48 views

Index Maintenance

I have a query thats performing badly and has a RID lookup. There are already quite a few indexes on the table and in the query stats I can see they are used although some less than others and all ...
1
vote
0answers
229 views

Best practice - SQL Schema to store Timerecords for a Time and Attendance module

I'm starting a time and attendance module in C# and SQL. There will be many time rules depending on every shift. For example: Shift 7:00 - 14:00 for Administratives: 15 min grace time, but if ...
1
vote
0answers
208 views

AlwaysOn Availability Group: Users on Secondary Server

We have an AlwaysOn Availability Group setup (DB1+DB2) and also a web server (Web1) outside of the domain that we need to connect to the AG using Windows Authentication. The following Windows ...
1
vote
0answers
103 views

user rights validation inside stored procedure?

You have an application with a Users table, and the Users table has various columns to indicate what rights a User has within the application. Ignoring for the purposes of this question what should ...
1
vote
0answers
74 views

Tools and techniques for untangling monster views (nested views)

First a bit of context (venting). I'm working with a new vendor product which is really nothing more than a SQL Server database with a .NET interface. First few weeks with this client and users are ...
1
vote
0answers
165 views

CHECKDB Allocation Errors Msg 2576, could not repair, object id does not exist

I inherited a database that has no value in LastKnownGood. I ran repair allow data loss, says it was successfully repaired, but no change to the errors when I run checkdb again. In case it was a SQL ...
1
vote
0answers
105 views

Using #temp to work around Reporting Services blocking issue

Having utterly failed to resolve why a perfectly acceptable but admitidly large stored procedure was suffering the blocking process lck_m_s when called via a report in SQL Reporting Services I have ...
1
vote
0answers
83 views

RETURNING syntax with multiple columns

Again, another question related to the answer of the one there: Insert with OUTPUT correlated to sub query table So I ended up with this query, written for SQL Server: CREATE TABLE tempIDs ( ...
1
vote
0answers
65 views

Multi-victim deadlock in SQL Server

I have been seeing a lot of deadlocks occurring on a system with deadlock graphs similar to this one: I have been advised that it is a multi-victim deadlock but I cannot re-create a deadlock graph ...
1
vote
0answers
354 views

Importing bulk csv file to oracle database

I am going to import a bulk csv file to oracle database. This file contains around 200m records. I was wondering what is the best way of importing this file? I check the performance of SQL developer ...
1
vote
0answers
89 views

Phantom insert query

I have a log table which I have to clean up a bit because it is growing very fast. While deleting some historical data I reached count zero for that condition on which I have deleted the entries. 5 ...
1
vote
0answers
66 views

Bind web service/Report Manager based on IP address AND hostname

I'm trying to get Apache installed on our main database/application server, and I'd like to give it its own IP address on a secondary NIC so I don't have to use a nonstandard port. This requires that ...
1
vote
0answers
91 views

What type of fact table / loading solution for a reservation system?

I am designing a Data Warehouse with SQL Server 2012 and SSIS. The source system handles hotel reservations. The reservations are split between two tables, header and header line item. The ...