Tagged Questions

This Tag is for SQL Server 2008 R2, major build version 10.50.xxxx

learn more… | top users | synonyms

0
votes
0answers
39 views

I am trying to implement Scott Chamberlain's code in SQL Server 2008 R2 . Getting Assembly not present errors

I am trying to use Scott Chamberlain's code, here: http://dba.stackexchange.com/a/17466/45380 I was able to compile it and create the DLL, but now when I try to run SQL CREATE ASSEMBLY I get: Msg ...
3
votes
2answers
243 views

Can I update every datetime in bulk?

The current database assumes all times are local to the user. Now we're changing this so the database stores everything in UTC and our application converts the UTC time in the database to the correct ...
0
votes
1answer
64 views

User defined data types causing implicit conversions

user defined datatypes, i'm looking at some execution plans and seeing implicit conversions happening in the background when a var is declared of type user defined data type and pulling a value into ...
0
votes
0answers
29 views

Run SSIS task regardless of checkpoint

Is it possible to make a task always run, regardless of whether the package starts from scratch or from a checkpoint restart?
5
votes
1answer
90 views

Full Text Search Term Casing Affects Results

I have been experiencing a full text problem when searching using CONTAINS. I have the full text catalog accent sensitive setting set to false. The table contains following rows: Microsoft C# ...
0
votes
3answers
58 views

List all tables that a specific login has permissions [duplicate]

This might be repetitive, but I haven't found a solution that serves my purpose 100%. What I'd like to achieve is to have a script (or SP) that'll list all tables that a user has permissions on. Any ...
0
votes
1answer
51 views

How to find when change tracking was enabled?

How can I determine when change tracking was enabled on a table in a SQL database? Assume that this table has a regular cleanup routine, which means that looking at the oldest record in the change ...
2
votes
1answer
71 views

Reporting services scheduled reports are clogging up sql job history log

This is a bit of a cross-disciplinary question - Hopefully I’ve posted in the right place. SQL server 2008 R2 Question: How can I limit the number of rows in [sysjobhistory] for specific jobs, ...
0
votes
1answer
129 views

SQL Server 2008 R2, error creating file for FileStream

I'm trying to create a file to add to a filestream file group and I get the error: Msg 5120, Level 16, State 106, Line 1 Unable to open the physical file "d:\data\filestreamstore.mdf". Operating ...
3
votes
2answers
69 views

How to tell what invoked a trigger in SQL Server?

I'm working on a legacy SQL Server application, with close to 3,000 tables and more than 10,000 stored procedures. One of those stored procedures is deleting some needed data from a table. I don't ...
-4
votes
1answer
68 views

How to run mssql server dependent application to mysql workbench [closed]

I am very new in mysql workbench. I have created an application in c# which uses sql server 2008 r2 database. Now i have migrated my database on mysql workbench. i want to run my application now. My ...
4
votes
2answers
175 views

How to write a query which finds all circular references when a table references itself? (II)

I have the following schema (names changed), which I cannot change: CREATE TABLE MyTable ( Id INT NOT NULL PRIMARY KEY, ParentId INT NOT NULL ); ALTER TABLE MyTable ADD FOREIGN KEY ...
0
votes
1answer
237 views

How to deploy SSIS package with XML config, using SQL agent

I wonder if anyone can help me with a question. Context I've created a database which needs a front end in MS Excel. When the user presses upload button I want it to start an SSIS package which moves ...
0
votes
0answers
53 views

How to avoid copy of audit trace files

My database is copying all of SQL-Server trace data file everyday. The result is I have to delete them manually everyday because hard disk gets filled. How can I stop this?
1
vote
1answer
303 views

SQL Server database Mirroring on different servers

I tried to perform SQL Server database Mirroring(with SQL Server 2008R2). And I got success to perform mirroring with "High Safety" mode. And for that I have used three instances of SQL Server ...
0
votes
0answers
34 views

Sql Server Agent Job

In my Local SQL Server 2008 I created a scheduled job (like daily email will send to particular user from the database based on condition). Now I decided to host my schedules in hosting server so can ...
4
votes
2answers
147 views

What are the risks (if any) of sharing a service account on more than one server?

I use domain accounts for SQL Server service accounts. Sometimes, when I have multiple servers that are logically or thematically related, I'll use the same set of domain accounts for the service ...
1
vote
2answers
283 views

Joins between linked servers are dangerous, so can we just load the data into a local table before doing the join?

I was just reading the following article which states that it's a worst practice to do JOINs between two linked servers. The only alternative I can see is to get the necessary data from both linked ...
1
vote
2answers
228 views

Fixing an error 9004 without taking the database offline

My database (SQL Server 2008 r2) is running fine but I’m getting the following error in my event log. Error: 9004, Severity: 23, State: 6. An error occurred while processing the log for database ...
2
votes
3answers
115 views

Should I shrink my database?

I have a 1.2Tb SQL Server 2008 R2 database which is more than 50% empty, because I migrated a lot of functionality to PostgreSql. The database is still in use, and still somewhat growing, but I do not ...
3
votes
4answers
882 views

How do I place leading zeros for numbers less than 10 without affecting those 10+?

Probably a newb question, but... I have a table with a VARCHAR field containing numbers 1 through 300. I need to place a leading zero in front of any numbers less than 10 while retaining the original ...
1
vote
1answer
46 views

It is mandatory to create a route when creating an event notification?

I'm starting with service broker. Already managed to setup an event notification for blocked processes based on this answer and it's working flawlessly. Then I wanted to setup another one to notify ...
3
votes
1answer
135 views

difference between index REBUILD and REORGANIZE in relation to recompile in SQL Server 2008 R2

Does the INDEX REORGANIZE index cause recompilation of the stored procs the same way as INDEX REBUILD
0
votes
3answers
127 views

How to display posted on date and time like1 hr ago or 30 min ago

i want to show the posted date like 1 hr ago.. or 30 min ago.. declare @date datetime ='2014-07-24 11:50:22.033'; SELECT CASE WHEN DATEPART(DD,@date)=DATEPART(DD,GETDATE()) THEN CASE WHEN ...
0
votes
1answer
59 views

Securing an Internet Database Connection

I am looking to setup a website and database that are connected via the internet, and am looking to secure the connection. The connection will probably not be over a VPN, so shall be openly exposed. ...
0
votes
2answers
241 views

SQL Server 2008 R2 memory issue

I have read many posts regarding the memory but still its not clear. I have dedicated server SQL Server 2008 R2 with Windows 2008 R2, 32 GB RAM, 2 6 core processor and a database of around 60 GB on ...
2
votes
0answers
236 views

CREATE DATABASE defaulting to wrong log path

I have a script that automates creating a database across multiple servers and on one of my servers a, SQL Server 2008 R2 SP 2 instance, the script failed with: CREATE FILE encountered operating ...
3
votes
1answer
716 views

SQL Server 2008R2 convert collation

I have an existing database that uses the Arabic_CI_AS collation, but I need to convert it to SQL_Latin1_General_CP1_CI_AS the default collation for the server, but the problem is when I use the ...
0
votes
0answers
68 views

full text index not being updated

I have a table that has a full text index defined on it. Change tracking is set to 'Automatic' but I can see that 'Table Full-Text Pending Changes' is set to '58429', and recently added rows (for the ...
0
votes
1answer
38 views

Merge Replication - Merge initial data contained on subscriber

I have two identically structured databases on two separate servers. Both have different data within them. I have set one of them up with merge replication as a publisher and I want the other to be ...
0
votes
2answers
131 views

How to provision the SQL Server Agent service after SQL Server Edition upgrade

I have upgraded SQL Server 2008 R2 Express to SQL Server Standard Edition. After I have upgraded it, the SQL Server Agent was stopped. I have tried to start but it fails. Only when I have changed ...
3
votes
1answer
71 views

Use of Trigger After a Transaction

I have a scenario where there is a transaction being executed to update a few tables. On one of these tables there is a trigger that accesses the data on those tables, but is only planned to be on ...
0
votes
2answers
118 views

Upgraded from SQL Server Express to standard but CPU usage is maximum 50% on dual core [closed]

I have upgraded SQL Server Express 2008 r2 to SQL Standard Edition on amazon EC2 with a Intel Xeon E5-2670 v2 (Ivy Bridge) Processors with 2 vCPU. I have verified the edition by running this: SELECT ...
2
votes
2answers
295 views

Table with 4 million records - different size and performance in development and production

At my company we use SQL Express 2008 R2, which supports databases up to 10GB. We have 2 databases with almost the same number of rows in all tables. But, one of them is 4.5 GB in size (which is in ...
0
votes
2answers
72 views

Analyse what caused a pagesplit afterwards?

Ok normally we have 0-20 page splits per second, but last night it spiked to ~500. Now is there any way to figure out what caused it? I know i can run the following to find mid page splits but it ...
0
votes
2answers
154 views

Query Optimization required - Subquery using Inner Join

Could anybody advise how can I optimize this query below please? SELECT IT.[iInternalTransactionID] , IT.[iInternalAccountID] , C.[iContractID] , IT.[dtTransactionDate] AS TransactionDate , ...
0
votes
0answers
117 views

SQL Server 2000 Named Instance cannot connect remotely

To facilitate a migration I installed SQL Server 2000 Standard Edition and Service Pack 4 as a named instance on server with an existing instance of SQL Server 2008R2 RTM. The issue I have is ...
1
vote
2answers
277 views

Rapidly increasing TempDB write latency

We have two servers that were set very similarly, but not identically. These two servers have hugely different performance running the same application. On server A the application runs successfully ...
4
votes
2answers
849 views

Is it possible for SQL Server to miss rows on a select * where PK = “value” query

We have just migrated an application to an SQL Server 2008 R2 from SQL Server 2005 and moved from a physical to virtual hosting environment. I have a very strange error in our application and I was ...
1
vote
1answer
109 views

Sql Server sys.Traces log

Working with traces on production server I found some mysterious entries to me in sys.Traces, When I run below query it shows me status of all traces as ‘Paused’ along with entries in ...
0
votes
2answers
325 views

Where are my .NDF files located?

I have created a sample database called TestDB. After that, I ran this select: select * from sys.master_files I found my .MDF, .LDF files from this select. Then I want to find out the .NDF file ...
0
votes
1answer
22 views

Can I set up a SQL Server database based on an excel file which refreshes automatically with any changes in the source excel file?

Can I set up a Server database based on an excel file which refreshes automatically with an changes in the source excel file? I am currently using SQL Server 2008?
2
votes
2answers
84 views

Switching from SIMPLE to FULL recovery mode implications

I have several databases that I'd like to move over to FULL recovery mode so we can have point-in-time restore capability. We don't need it on all of our databases, just the ones that are transaction ...
2
votes
1answer
110 views

Database backup taking longer than usual to a networkshare [closed]

The SQL server does backups with this command to a network share \BackupServer\weekeklybackups" BACKUP DATABASE DBNAME TO DISK = '\\BackupServer\weekeklybackups\DBNAME.BAK' There is a 1 gig network ...
1
vote
0answers
26 views

Unable to locate database - Login failed

I am having trouble locating the database and when I go to SQL it wont even allow me to refresh nor back it up. Below is the error that I get. Unable to open database "XimbaTC". Reason: Cannot open ...
1
vote
1answer
128 views

Enforce referential integrity between two groups of data

I have two sets of records: A collection of rules. A collection of actions to perform based on those rules. What I'm trying to model is something like this: Multiple rules can be grouped ...
0
votes
0answers
49 views

Why a select from the tables, joined by a CASE statement, could be 7x slower?

There are two queries from the same two tables: one joins them on the columns @t1.b and @t2.x, the other uses a case statement as below. The 2nd query is 7x slower. The record counts are only ...
0
votes
1answer
153 views

SQL Server 2008R2 Migration to new Platform - What Steps Required?

We are migrating our SQL Server 2008R2 instance from one Windows Server platform to another. SQL Server will remain as 2008R2. The new plaform will have more disk space, memory and CPU. I am doing up ...
1
vote
1answer
354 views

Two SQL Server databases setup with same .mdf and .ldf files

In a SQL Server 2008 R2 instance two databases (the second one being a restore/copy of the first one) have been setup against the same .mdf and .ldf files. How would I go about either deleting the ...
3
votes
3answers
129 views

Log File Management - Space on Disk

At our organisation we have several non-Production environments where Developers run free and wild with TSQL code and databases. The DBA team do not normally monitor or maintain them. Recently several ...