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

learn more… | top users | synonyms (1)

1
vote
0answers
12 views

How can I get my linked server working using Windows authentication?

I'm trying to get a linked server to ServerA created on another server, ServerB using "Be made using the login's current security context" in a domain environment. I read that I'd need to have SPNs ...
3
votes
1answer
53 views

Central stored procedure to execute in calling database context

I am working on a customized maintenance solution using the sys.dm_db_index_physical_stats view. I currently have it being referenced from a stored procedure. Now when that stored procedure runs on ...
0
votes
1answer
56 views

SQL Server automatic transaction log truncation

Have looked through msdn but cant find answers to these: Any help much appreciated: In simple recovery mode: Is there any TSQL or alternative functionality that will provide a notification either ...
3
votes
1answer
69 views

Insert performance with Geography column

I've been tasked with inserting data into a SQL Server table with a geography column. I've found that my times for doing inserts (same data 1.5 million rows) go up increasingly. I started out with no ...
5
votes
6answers
338 views

Find procedures that haven't been called in <n> days

We are deleting old stored procedures and tables. How can I know what procedures haven't been called recently? dm_exec_procedure_stats and dm_exec_query_stats aren't reliable, since they only return ...
0
votes
1answer
42 views

Update performance: clustered versus covering index

I have a simple, 3-column table with about 50 million rows in it. This table gets about 5,000 inserts/updates per second, and perhaps 20 queries per second are executed against the table. The table ...
1
vote
0answers
114 views

sql server 2008 execution plan different on two production servers [closed]

We have two servers running SQL server 2008 R2, with identical databases, where we implemented a datawarehousing solution. The cube processing operation was taking a VERY long time in one of the ...
1
vote
1answer
164 views

SQL Server stored procedure working when run manually, not running from SQL Server Agent

I have a procedure that runs fine using the execute command in SSMS, however putting the same command in a job gives the following error. line 9, character 9, unexpected end of input The code ...
1
vote
2answers
56 views

How to find memory usage by table? [duplicate]

I want to discover how much memory is being used by each table. Is this information available in DMVs or elsewhere?
1
vote
1answer
38 views

Database denormalization: multiple rows into single column. How bad is it? [duplicate]

We have few join-heavy queries to our SQL Server 2008 database and in an attempt to optimize them I thought of having a view that would produce this OrderID Number Traveller 1 102 ...
4
votes
1answer
362 views

SQL Server 2008 R2 replication high delivery latency

I am seeing an unusually high delivery latency between our distributor and subscribers and i do not understand why. We have in this configuration 3 sql servers using transactional push replication to ...
5
votes
1answer
79 views

SQL Server not giving back memory - staying at Max Server Memory setting

I'm the only one working on this server and followed documentation about optimizing SQL memory usage when I saw that SQL was using all of the memory available of the server. One of the steps I did is ...
3
votes
4answers
678 views

How to Handle TimeZone Properly in SQL SERVER?

I have some issue which needed to be fixed quickly. My local development server is in middle east. But my production server is in UK. Now, I need to show the date to user to thier timezone. For ...
0
votes
3answers
36 views

Access to tables in SQL Server

I would like to know if there is a table where accesses to tables are saved, per user or per system. I'm using both SQL Server 2005 and 2008.
5
votes
5answers
3k views

CXPACKET Waits performance tune for SQL Server 2008

I have a SQL Server 2008 query that is working on millions of records. The query is w/in a proc that is run nightly by a job. The query can take a full day to run when I first put it on the server, ...
2
votes
1answer
85 views

How to partition a very large table with limited db space?

I have a very big table. I want to partition it, but I cannot. Database size: 1TB, Free space 200GB Table: Size: 165 columns (row lengh 4216 KB, no LOBs), 500 million rows, 600GB of data. ...
6
votes
5answers
9k views

Restore SQL Server 2012 backup to a SQL Server 2008 database?

Is there a way to restore a SQL Server 2012 database backup to a SQL Server 2008? I tried to attach file, it does not work.
0
votes
2answers
69 views

Database Mail sending functionality not working on local system

I am using Database Mail functionality to send mail from a SQL Server 2008 database via following stored procedure execution: EXEC sp_send_dbmail @profile_name = 'MyProfile', ...
4
votes
4answers
78 views

Backup not creating a new file

I run a daily backup of my database through command prompt: c:\sqlcmd -H localhost -Q "BACKUP DATABASE test TO DISK='c:\test.bak'" But the new backup replaces the previous backup. Please tell me ...
9
votes
7answers
16k views

Moving tables to another SQL2008 database (including indexes, triggers, etc.)

I need to move a whole bunch (100+) of large (millions of rows) tables from one SQL2008 database to another. I originally just used the Import/Export Wizard, but all the destination tables were ...
3
votes
0answers
33 views

Severity 016 Backup virtual device fail

My backup on one of my servers is failing once a week. This is the alert I'm getting: DESCRIPTION: BackupVirtualDeviceFile::PrepareToFreeze: failure on backup device ...
1
vote
2answers
65 views

How do I rollback a dropped table using log?

I have dropped a table from a SQL Server 2008 database. How do I unroll the transaction log to recover the table and latest contents? The database recovery model is "Full". Is there any way or ...
1
vote
1answer
76 views

dead lock when updating

Update Operation.TrTable Set RecordId = RecordTABLE.newRecordId From Operation.TrTable tr Inner Join ( SELECT r.Id AS newRecordId, r.KeyM AS MappingKey From ...
1
vote
1answer
26 views

Can a partitioned table span on multiple files across different file groups?

In SQL Server 2008 and above, if a table is partitioned, can it span across multiple files across multiple filegroups? Thanks
1
vote
2answers
37 views

DBCC CHECKDB command creating database file with same name but with space character in extension

I am running simple DBCC CHECKDB ('DBNAME') command on my machine every thing works perfect! But when i execute same command on the live server the command executes without any error, but it creates ...
2
votes
1answer
104 views

Twice job results in sql server, last one is left in progress

I have the job MP - Create CSV which execute a package SSIS in sql server 2008, when I check for the job history I see the result at step 0, I expand and I have 2 results for the step 1. Fist result ...
10
votes
2answers
1k views

Parameter Sniffing vs VARIABLES vs Recompile vs OPTIMIZE FOR UNKNOWN

So we had a long running proc causing problems this morning (30 sec + run time). We decided to check to see if parameter sniffing was to blame. So, we rewrote the proc and set the incoming ...
0
votes
4answers
98 views

Importing data with a lot of SELECTS during transaction

I'm using SQL server 2008 R2 and I have a products table with an auto increment integer id column as primary key and a product_no column (unique) and 6 tables like articles and product_assets which ...
3
votes
2answers
89 views

DBCC SHRINKFILE works with file_id but not with logical name

I am trying to shrink a database file but am running into errors. Using the file_id from sys.database_files works, but using the logical file name yields an error. The logical file name is the same ...
4
votes
2answers
1k views

Best block/stripe size for log volume?

I know the common recommendation for the data volume in SQL Server is to use 64 KB blocks/stripes, since the I/O is typically done by entire extents. I can't find any good information regarding log ...
-4
votes
2answers
461 views

How database administrators can see my requests to SQL Server?

I'm a SQL Server 2008 user. I have access to some tables. I need to request few columns from table as I usually do. But I need to do it once (for example) in 5 seconds and system administrators ...
3
votes
2answers
70 views

Best high availability solution to avoid maintenance downtime?

We currently only have one production SQL Server 2008 server. Anytime we need to perform maintenance or install patches, it causes downtime as the server reboots. In addition, if the server ever ...
2
votes
0answers
25 views

Cannot Delete FileStream Group from Sql Server 2008

We have migrated all our varbinary(max) column data to Azure Blob Storage and so we want to remove the old filestream columns that remain in our Sql 2008 database and the filestream filegroup but when ...
0
votes
1answer
43 views

Copy a SQL Server database from one server to another on demand

I have two servers, Prod and Test, both running SQL Server 2008 RTM. Is it possible to have a PowerShell- or VBScript that could copy a database from one server to another? The copy should of course ...
3
votes
0answers
88 views

select top x works, but x+1 runs endlessly

Something happened to a table, that results in an endless executing select and I'm trying to figure out the reason. What I tried and found out: This runs endlessly: select * from dbo.MyTable As ...
2
votes
1answer
29 views

Data sharing between client and server two ways

One of my Silverlight applications is running. This Application is using one central database (SQL-Server 2008) and three other client databases (SQL-Server 2008) in server other locations. Our ...
2
votes
1answer
14 views

Restore of logfiles in SQL Server

I'm trying to write a script which will read a folder containing a full backup and X number of log files. My script fails when it starts the loop to read the log files. The error is cannot convert ...
0
votes
0answers
18 views

Data Sharing between Client and Server Two Way [duplicate]

Please solve my query One of my Silverlight application is running. This Application is using one central database (sql server 2008) and three other client databases (sql server 2008) at other server ...
3
votes
1answer
564 views

How to succesfully run a batch file in an SQL Agent job?

I have a SQL Agent Job which generates a specific report in PDF-file and then copies the PDF to a network directory and then deletes the PDF file in the source directory. The SQL Jobs consists of 2 ...
0
votes
0answers
19 views

SQL Server 2008 log file growing and wont shrink. Hard Drive Space running out [duplicate]

I have a SQL Server 2008 database which has a log file (.ldf) with a size of 360GB and growing every day. The .mdf file is only 25GB. The hard drive is 950 GB and has 150GB free space. I want to ...
1
vote
2answers
143 views

Database running out of space

My database has 16MB of space left. I used to just truncate as I was taught but I found these links that advise against truncating: ...
3
votes
2answers
183 views

Reduce Clustered Index seek cost SQL Server 2008 R2

I am running a query and it have records in lakhs, it takes more than 20 mins to fetch data. After running the execution plan i noticed that clustered index seek cost can be be the reason. How can I ...
0
votes
1answer
102 views

Data from two table in SQL server 2008 R2

i have 2 tables: Codes table with following column: Name, Code History table with following column: Name, BU, Plan. Now, I want code column ...
0
votes
2answers
75 views

How to merge data sets without including redundant rows?

I think this must be a fairly common thing to do, but I haven't been able to find an example. It involves merging data that involves dates/times (or more generally any sequential values) without ...
3
votes
2answers
67 views

If I update a column record in a table, will indexes that do NOT have this column in it be affected?

In terms of performance if I have a table like so: CREATE TABLE [TESTDATA].[TableA]( [Col1] [nchar](5) NOT NULL, [Col2] [nchar](2) NULL, [Col3] [float] NULL CONSTRAINT [TableA_PK] PRIMARY ...
-1
votes
3answers
127 views

How to restore SQL Server 2008 R2 backup to SQL Server 2008 [duplicate]

I am unable to restore a backup from a 64-bit instance onto a 32-bit instance. Source Server: Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Destination server: Microsoft SQL Server ...
2
votes
4answers
33 views

What happens when I try to store more 8019 bytes in a SQL Server table row?

I read - total fixed and variable length data are still limited to 8019 bytes total But my data can possibly be more than this. What happens if it's more. Does it still store the data correctly? ...
2
votes
1answer
33 views

Strategies for summary data in parent record based on detail data?

I have parent-child relationship as shown below. I need to find the first order date for each customer. Obviously, writing a query to do this is fairly straight-forward but it does require reading all ...
0
votes
0answers
14 views

Increasing time-out period for schema compare (windows server 2008, Sql Server 2008 R2 and VS2012)

I need to increase the time-out period for schema comparisson using visual studio 2012 to compare two sql server 2008 r2 database on a windows server 2008. I believe this is somenthing I need to set ...
0
votes
0answers
50 views

Error 0xc02020f4: Data Flow Task 1: The column cannot be processed because more than one code page [closed]

SQL SERVER : i executed an query and i got result of 8 million data. I have to create a table out of this result output. SO i simply save the result out to table1.csv. Now when i try to import ...

1 2 3 4 5 42