This tag is for SQL Server 2008, major build version 10.00.xxxx.

learn more… | top users | synonyms (2)

0
votes
0answers
6 views

Intermittent DB connection failure

Recently I started to see intermittent errors in log files of my web application. Raising from different places of the application the error is always about failed connection to DB which is located on ...
-2
votes
2answers
23 views

SQL Server failed stored procedures log

How to find errors that was occurred in stored procedures in some timespan in Sql server management studio 2008 ?
6
votes
2answers
189 views

How can I determine which tables are causing the database to grow over time?

I have a database in SQL Server 2008 that is growing all the time, and I'd like to know which tables have caused the most growth over the past 6 months.
1
vote
1answer
29 views

Using NOCOUNT to Improve Procedure Performance

I am looking to improve the performance of a certain procedure and I wanted to begin with the insertion of the SET NOCOUNT ON. I've read a couple of articles on the subject: Aaron Bertrand SET ...
1
vote
1answer
21 views

DBCC DBREINDEX in MS SQL Server 2008

We have done DBCC DBREINDEX for our production database which size is about 300 gb, it was running for 12+ hours, but i found that DBCC DBREINDEX is obsolete and recommended approach is using ALTER ...
0
votes
1answer
27 views

Sql Server 2008 : What is the cost of accessing an index?

I've just read this interesting blog post about selectivity notion. In the section 'When is better to not use a database index?', the author states : Accessing the index takes time, and consumes ...
0
votes
4answers
59 views

How can I take backup of particular tables in SQL Server 2008 using T-SQL Script

I want to take a backup of particular tables available in my database in .bak file And all these should be done using T-SQL script
0
votes
1answer
33 views

How to modify maintenance plan using T-SQL script in SQL Server 2008

How can I modify a maintenance plan in SQL Server 2008 using a T-SQL script? I want to change the schedule of a maintenance plan and change the path of the .bak file . All these changes should be ...
0
votes
0answers
45 views

SQL server 2008 [closed]

I am having a problem that I can't figure out. I have one live server and one test server. The (Live) and (Test) are very similar, but there are a lot of differences because of testing reasons. But ...
1
vote
1answer
63 views

Can we create indexes on views in SQL Server? [closed]

Can we create Indexes on a view in SQL Server 2008? I have heard about indexed view, which can give performance improvement, but the problem is data refresh on those views: Can it be auto updated, ...
1
vote
2answers
66 views

How to order by alphanumeric codes in SQL Server [closed]

I have a table with some project codes. These codes are e.g.: B001, B002, Z15001, Z14001, P003,... I need this result table: Z15001 Z15002 ... B001 B002 ... C001 C002 ... Z14099 Z14098 Z14097 ... ...
-3
votes
0answers
38 views

TCP Provider: The semaphore timeout period has expired [closed]

In Sql Server2008 R2 and Windows Server 2008R2, when I start Replication I have this error: TCP Provider: The semaphore timeout period has expired Please help me to solve it... Thanks!
0
votes
1answer
43 views

LDF files vs. TRN files vs. Tempdb.MDF+LDF files.:

We have a dilemma… We have all of our MDF and LDF files in the same…\192.168.6.22\d$\Program Files\Microsoft SQL Server\DATA\Production...folder. We have all of our TRN and BAK files on ...
-1
votes
2answers
29 views

database Compatibility 90 to 100 changing causes any problem

We are planning to change Compatibility level of databases from 90 to 100. Would this cause any impact on application side? If yes then please guide me, what steps or measures we need to look upon ...
0
votes
4answers
43 views

Left Outer Join doesn't give expected result. What am I missing?

My objective is to find records that exist in Table 1 but do not exist in Table2. No record has a NULL value. I am using the following code, but it is not giving me the expected results. Select ...
1
vote
1answer
113 views

Selecting rows from same name table from multiple databases in single result set

For some reason, I have a table Table_1 in n databases (same name and schema structure) instead of one single databases. The columns are like this: | Column_1 | Column_2 | I can select data from ...
2
votes
0answers
31 views

Code required to make column not nullable

I have a table where I mistakenly allowed NULL values in a column: CREATE TABLE EXAMPLE ( EXAMPLE_ID INT IDENTITY(1, 1) NOT NULL, FOO_ID INT, CREATED_ON DATETIME DEFAULT ...
-1
votes
1answer
35 views

How to merge same values in a column and rows

How can i merge same Stock item value and get the sum of both value in the table This is Query: select Invoice_TBL.InvoiceNo ,Invoice_TBL.ClientNo ,Invoice_TBL.ClientFullName ...
1
vote
2answers
57 views

How to pull number code from strings buried in parentheses?

I have string data (ProductDescription) that includes product names and ID numbers and need to pull the ID numbers for cross-referencing... Data Samples: Widget (1234) Different Widget (123) Many ...
1
vote
3answers
67 views

Can you Schedule a job inside another job?

I have many jobs that need to run but they cant run at the same time. the first step of each checks to see if any others are running if yes it waits a little bit and checks again. This can lead to a ...
11
votes
0answers
153 views

SQL Server recreating plans each day

We have this problem in our production environment. Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) - Enterprise Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1). SQL Server ...
0
votes
0answers
17 views

The database Forms is not accessible. (ObjectExplorer)

I tried one of my Microsoft SQL Server Database Take offline (Task -> Take Offline), its takes long time(more than 1 hour) later is closed and now when i checked my Visual Studio Manage Console, its ...
-1
votes
0answers
10 views

TO SSIS PAckage when it found a special characters in the column

I am trying to create SSIS package to fail when it founds a special character. otherthan SCRIPT TASK what transformation we can use? Please help me out. -Ram
2
votes
1answer
72 views

How to display the query result separately for each item in an IN clause? [closed]

Maybe it's a novice question, but I am trying to get the sum of balances for each account present in the table. I am trying the below Select SUM(BALANCE) from dbo.account_balances ...
2
votes
2answers
57 views

How to DENY access to EXEC for a role

I have a read-only database user that I do not want to be able to run the EXEC command. I ran the following command: DENY EXECUTE to db_USERROLE_deny Which completed successfully, however when I ...
4
votes
1answer
90 views

Find what data is placed in a datafile

I have a database with 5 .ndf (secondary) datafiles on SQL Server 2008 R2. (Each of these datafiles is assigned to a separate filegroup.) I want to know what data is there in those files. Is it ...
0
votes
2answers
49 views

How to configure DBPROP_COMMANDTIMEOUT?

How to configure the property of DBPROP_COMMANDTIMEOUT ? Can this property be configured in Database ? Thanks.
-1
votes
1answer
18 views

SQL statement for comparing actual products and plan products

I need some helps for writing SQL statements to compare count of actual products and plan by like below 2 Input tables: CREATE TABLE PRODUCT_PLAN ( PRODUCT NVARCHAR(50), START_TIME ...
0
votes
1answer
41 views

Saving SQL Server DMV's for later use [closed]

Is it possible to save DMV's in SQL server database backup, which can be restored on different server, I mean with master db details( views and all)? If not, what's the best way to maintain 2 ...
0
votes
2answers
77 views

How to create a VIEW in SQL Server [closed]

I have a user table and I need to create a VIEW so a user can only see their own data/row. How could I achieve this? I have been searching online but I can't find anything useful User with user_id, ...
1
vote
1answer
26 views

can log shipping to log shipping?

I have one production SQL Server 2008 Database with log shipping set up for that server in US. I have a account in the log shipping database so I could sometimes run query on log shipping database. ...
0
votes
0answers
16 views

Identify Purchases or Redemptions with the Same Single Trade Profile but Attributed to Multiple Channels

I want to identify Mutual Fund Purchases or Redemption with the same system source ('System'), firm ('Firm Id'), CUSIP ('Product Cusip'), trade date ('Trade Date'), settle date ('Settled Date'), trade ...
0
votes
0answers
15 views

Does splitting to multiple databases has performance impact? [duplicate]

I am scaling an old application which was designed to have ten databases. These databases are related to each other. The database is SQL Server 2008. The databases combined size is less than a GB. I ...
0
votes
0answers
34 views

Strange SSIS-Package problem ( ASYNC_NETWORK_IO)

I've read a lot of posts here about this warning. Have been searching on the Internet, but not like this case. We are having problem with integration services packages. When I run the query (that ...
2
votes
0answers
27 views

How long does the final phase of an online index creation take?

In reading the whitepaper: Online Indexing Operations in SQL Server 2005 it says: The online index build process can be roughly divided into three phases: Preparation Build Final ...
0
votes
1answer
35 views

Creating database with a relative path

I am supposed to be testing a piece of software that uses mssql express as the backend for data storage. When it is creating its databases, it tries to create them in my home directory that is on a ...
6
votes
1answer
379 views

Move live SQL Server database to a new server

I have a production server running SQL Server 2008 Web Edition, and it has to keep running 24x7 with almost no down time, and it's the time for us to move to a more advanced server hardware, also it's ...
4
votes
1answer
43 views

How to tell if a backup file contains CDC?

Using SQL Server 2008 through to 2014, I know how to backup and restore a database with Change Data Capture enabled (CDC), but what I am looking for is a way to query a full backup file to determine ...
5
votes
3answers
69 views

Is there an advantage to not partition aligning an index?

I have the privilege of managing a large partitioned OLAP table. While reviewing this table I noticed one of the indexes is not aligned with the partitioning scheme. Since the author is not ...
0
votes
0answers
29 views

SQL Server Windows authentication: VMs versus others

This really seems like a weird one to me. I have two VMs of interest, one is running Win2k8 R2 x64 and the other is running Windows 7 X64. The server is hosting SQL Server 2k8 while the latter has SQL ...
1
vote
1answer
19 views

How to manually invalidate a pull merge replication snapshot from the publisher

XY Problem background info: I have a pull replication publisher in which I want to add or alter a index and have those changes be applied to the subscriber. The solution to that problem I would like ...
2
votes
2answers
48 views

idera - why it restores databases faster

We have a 2gb live database that takes forever restore whenever I need some live data to test something. If I use idera it takes 5 mins at most. When I use the restore database command it can take ...
1
vote
1answer
45 views

Identity seed increased when using IDENTITY_INSERT

Running this snippet on SQL Server 2008 produces different result than on SQL Server 2014. I need them to produce the same result. My scenario is that I am writing unit tests (using tsqlt) and this ...
-1
votes
1answer
27 views

Substract dates from previous row

I couldn't see any question matching this one so I made this question. I have this result from my code and the last thing I need is to substract the dates so I get the real dates: | EmployeeId ...
1
vote
1answer
107 views

high PAGEIOLATCH_SH waits on server [closed]

EDIT: I know this question is closed, but I hope it will help someone. The problem is on our disks ( cluster ). Using PerfMon, I could create some counters ( disk reads and writes ) and the reads ...
1
vote
1answer
61 views

Error when trying to access linked server from another machine

I have created a linked server from a Excel source and when I query or test the connection from the locally from the server everything is good but if I try the same from another machine with DBMS I ...
1
vote
1answer
46 views

Backup SSRS Encryption Keys Using Powershell

I have made the following script from google for backing up the SSRS Encryption keys: cls $pwd = "sa@123@123" $SSRSClass = Get-Wmiobject -namespace ...
3
votes
2answers
69 views

What happens with statistics when reverting to a database snapshot

Lets say I have a database FOO for which I created a snapshot (named FOO_snap). Now I'll run thousands of queries on this DB. After that I will revert DB to FOO_snap. Will I lose all of the statistics ...
1
vote
1answer
163 views

SQL Server 2014 .bak file error - The media family on device 'D:\..' is incorrectly formed

Worst case scenario - the server crashed and the 2014 SQL Server .bak file had to be recovered from the failed disk. The .bak file I have is over 20gb in size but is unusable when trying to restore ...
0
votes
1answer
48 views

SQL Server 2008 R2 error on database engine

Database 'msdb' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information. (Microsoft SQL Server, Error: 926)