SQL Server 2008 (major build version 10.00.xxxx). Please also tag with sql-server.

learn more… | top users | synonyms (2)

3
votes
2answers
527 views

Migration to databases Domain Users do not have access

I migrated databases to new servers, however the applications that were previously used with the databases are failing to load. I have changed the connections and etc. The jobs also seem to be failing....
1
vote
2answers
45 views

SSRS 2008 Broken in Chrome

Note, this is 2008, not 2008 R2. This isn't an unknown problem, but I can't seem to get it to work. Seems like all of the solutions I've tried relate to 2008 R2 and above versions. Chrome updated and ...
0
votes
1answer
59 views

Effect of Reorganizing and Rebuilding an index [closed]

What are the effects of Index Rebuilding and Reorganizing on clustered and non-clustered indexes. How does these 2 operations affect the logical storage and physical storage of data in Hard disk?
1
vote
0answers
31 views

Migrating from DEV SQL Server to PROD - Any Point to Script the Statistics from DEV to prod?

I have a new database (powers a new website) in a dev environment. I have everything scripted out to create the DB, objects, and data in my production environment. In that DB, auto create and auto ...
0
votes
1answer
145 views

Maintaining multiple build versions of asp .net / SQL Server applications

We have new versions of .net applications deployed every week for testing given in form of new build files. Can any one suggest how I can maintain many versions of the builds without having to keep ...
0
votes
1answer
787 views

Select Query takes more than a minute to retrieve data

I have a table that has 99 columns, all of them are not needed but they were there when we started. There is a Primary Key (Objectuid) which is a GUI and has the Clustered Index on the PK. The Table ...
8
votes
1answer
1k views

MSG 666 when running an insert query on 80M-row indexed table

Strangely, my stored procedure started to receive Msg 666 for some input data. Stored procedure fails on the last step when it tries to insert a row into a table with the following structure: ...
1
vote
0answers
21 views

Minimum permission needed for GRANT CRUD ON

I have a certificate set up to do cross database CRUD operations. The certificate is linked to a user in each destination database. I sign any stored procedures in the source database with the ...
-2
votes
0answers
64 views

Replace string between single quotes

How to replace text between quotes in SQL? I am retrieving the top 50000 expensive queries from the database. In the query output I am seeing the same queries with different parameters populated. ...
4
votes
1answer
2k views

SQL Server: update trigger fires before insert trigger

I have an application with a SQL Server-hosted database. I do not have access to the application code, but I do have full access to the database. I have added my own custom auditing to a table to ...
0
votes
1answer
50 views

SQL Server : View names

I'm coming from an Oracle background and came across code to create a SQL Server view which I've never seen before. We have a view called viewA (for example) Within the script to generate the view I ...
0
votes
0answers
30 views

Export Stored Procedure Results To CSV

I have seen many options for doing such, however most of them involve using bcp or using exec master..xp_cmdshell which I am unable to use on my server (security restrictions). I was looking at ...
20
votes
6answers
61k views

How to query last restore date in SQL Server?

Is there a T-SQL query that shows the last restore datetime for a certain database?
9
votes
5answers
24k views

How to prevent transaction log getting full during index reorganize?

We have multiple machines where we have pre allocated the size of the transaction log to 50gb. The size of the table that I am trying to reorganize is 55 - 60 gb but is going to continuously increase. ...
0
votes
1answer
20 views

Howto transfer tracefile into a trace table without loosing the sort order?

I have traced some data into a trace table into Sql Server using the Profiler GUI. This table has the following structure: It contains the SQL statements as well as execution plans in the TEXTDATA ...
1
vote
1answer
26 views

Combining multiple-row data into a single row

I have a table that has columns like following ID Number Value1 User1 Value2 User2 Value3 User3 -- ------ ------ ----- ------ ----- ------ ------ 1 123 0 Jack 1 123 ...
0
votes
1answer
2k views

syspolicy_purge_history job failed at step 3

In one of my SQL Server 2008 sp1 standalone instances, syspolicy_purge_history job is fails at step 3 Erase Phantom System Health Records. Below is the command - (Get-Item SQLSERVER:\SQLPolicy\...
1
vote
0answers
29 views

Re integrate MSSQL 2008 to new Active Directory

I have a server which was joined to an AD Domain, then installed with MSSQL Server 2008 R2 and System Center Operations Manager 2012's Reporting Server on it. The same server had the Active Directory ...
4
votes
1answer
380 views

Updateable Subscriptions: Rows do not match between Publisher and Subscriber

I have transactional replication with updatable subscribers set up in SQL Server 2008. It has 3 subscribers and 1 publisher. I had to setup replication again due to some errors related to the database ...
1
vote
2answers
53 views

Query to extract all SQL database roles with INSERT and/or UPDATE privileges

I've taken over the support for a SQL 2008 database and there are a multitude of custom roles (25+) associated within. I'm trying to figure out which of the custom roles have the ability to perform ...
0
votes
1answer
30 views

Upgrading SQL Server 2008 failover cluster node to SQL Server 2012 failover cluster node [closed]

Please I want someone to help me with step by step method of upgrading SQL Server 2008 with failover cluster node on two different machines to SQL Server 2012 without losing the existing settings/...
4
votes
1answer
152 views

Scenario of huge SQL Server Database backup

I use SQL Server and have a huge database with large compressed backup size (about 250 GB). The backup scenario of this database is: Create full backup at the first day of each month. Create ...
1
vote
1answer
27 views

Database engine installation failed

Being asked to implement an application for purchasing management, the database managing system which I have to install, is SQL Server 2008. I am having some issues while installing the main ...
-1
votes
2answers
129 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 ...
1
vote
2answers
184 views

Which data type should I use to store a 11 digit number [closed]

Which data type I should use to store an 11 digit number? It must store '0' as the first digit. For example, if I store 02421402015, it must show 02421402015. I tried using varchar and it shows ...
5
votes
4answers
579 views

The column order of composite clustered primary key on a partitioned table?

I have the following table. create table T (K1 date, K2 int references S(Id), ....) on partitionScheme(K1) The table will be partitioned by K1 (K1 has low selective. the data will be appended in ...
4
votes
2answers
15k views

SQL query that concatenates values from duplicate rows in a single table

Let's say I have a table of employees, like this: Name Sex Role Bob M Developer Joe M QA Now, I have a problem with duplicated rows in this table. I will fix it ...
17
votes
3answers
6k views

Dynamically Define a Range in a Dimension

I have an issue that I face every time I decide to build a cube, and I haven't found a way to overcome it yet. The issue is how to allow the user to define a range of things automatically without ...
12
votes
4answers
29k views

How to view an encrypted view or stored procedure

I am working on a third party database. When I try to view the definition of a view by right clicking, CREATE TO and then to NEW QUERY EDIT WINDOW, I am getting an error: This property may not ...
7
votes
1answer
1k 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 ...
15
votes
3answers
7k views

Schema design - best practices?

I understand the capabilities of SQL Server Schemas, but what are the best practices? Sure they give another layer of security, and provide logical grouping of database objects within the database, ...
1
vote
2answers
727 views

SQL Server Linked Servers and Remote Statistics

I'm trying to get a better understanding of how SQL Server uses statistics on remote SQL Servers (e.g. a Linked Server). I understand that the user needs db_owner/db_ddladmin rights to be able to use ...
5
votes
2answers
15k views

Restore Backup Fails - File 'Db' cannot be restored to '{…}.mdf'. Use WITH MOVE to identify a valid location for the file

I am getting the following errors trying to do a restore using the restore command on a backup file I recieved from a customer. RESTORE DATABASE SFDB FROM DISK = N'C:\Backup\Backup.bak' Any ...
25
votes
2answers
5k views

Using EXCEPT in a recursive common table expression

Why does the following query return infinite rows? I would have expected the EXCEPT clause to terminate the recursion.. with cte as ( select * from ( values(1),(2),(3),(4),(5) ) ...
3
votes
1answer
65 views

Delete User View named the same as system view

I am exporting a database to Azure and have found a user view created in a previous version of MSSQL (Currently running 2008) that is name INFORMATION_SCHEMA.TABLE_CONSTRAINTS which obviously should ...
1
vote
2answers
3k views

Insert Missing Dates from a query

How can i insert missing dates from a query i created. The result below: Date Frequency 2014-05-18 5 2014-05-20 7 2014-05-25 7 2014-05-27 6 I want the result to have missing ...
0
votes
2answers
32 views

text positioning for select list

I have following issue, I have hierarchy table where every record has level, code and description and I need to have description to look as it is was one column. Example code CREATE TABLE #tmp (...
0
votes
2answers
1k views

How to remove orphaned Log Reader Agents from Replication Monitor?

How do I remove the two Log Reader Agents with errors from the Replication Monitor? As you can see, the job does not exist (Error message produced by right click > Properties on errored Log Agent ...
9
votes
4answers
69k views

I can't connect to my servers SQL database via an IP Address

I have setup a server that runs Windows Server 2008, and has SQL Server 2008 Express installed. I can connect to the machine's SQL Server Express database via the MACHINENAME/SQLEXPRESS. However ...
6
votes
3answers
10k views

Connect to SQL Server 2012 from an Windows XP client

We have an SQL Server 2012 Standard database, to connect to it we use SQL Server 2008 Management Studio (since 2012 SSMS is not supported on Windows XP). The problem is that SQL Server 2008 gives all ...
5
votes
2answers
5k views

Error Querying MySQL server linked to SQL Server 2008

I've created a linked server in MS SQL Server 2008 to a remote MySQL server. When I try to query any tables, I get an error: .tablename. contains no columns that can be selected or the current user ...
1
vote
2answers
48 views

User cannot select from table but their permission appear to show that they should be able to

I attempted to revoke delete permissions to most users in a database by using the deny and revoke sql commands and checking the deny box for delete when adding the table as a securable in the UI. ...
1
vote
1answer
1k views

Creating indexes with t-sql scrips vs rebuild indexes in maintenance plan

I’m using SQL Server 2008 and I am running several (15) scripts each day to bulk insert to tables. Each script drops the table at the beginning. I create indexes in the scripts. Some of the scripts ...
8
votes
1answer
21k views

SQL Server 2008 R2 high Buffer I/O causes

Am trying to troubleshoot performance on a SQL Server that we have for our document management server and today performance has hit an all time low. Looking at the Management Data Warehouse (MDW) I ...
0
votes
1answer
69 views

Index Maintenance Plan

At our organisation we are migrating to SQL Server from visual foxpro dbf and hence had no maintenance plans and have no DBA. We have gone through our backup plans and Index maintenance is only index ...
2
votes
3answers
86 views

Join between different frequency tables

Assume that I have two tables, DailyTable and QuarterlyTable, where each have 3 columns: ID, Date, and Value. As the names indicate, the frequency of data stored in DailyTable is daily, while the ...
5
votes
2answers
26k views

Granting Execute Permissions on Stored Procedures, Functions and Views

I am using a user which has read permission only. It basically has permission to Connect Execute However, it does not have execute permissions on Functions and Stored Procedures. In part of my ...
0
votes
2answers
47 views

Create a copy of a SQL Server Job

Using T-SQL or Powershell, how can I create a stored procedure that performs the following: Copy a SQL Server Agent Job to another backup Job on the same server (with a new name) Disable the backup ...
4
votes
1answer
2k views

Windows native backups makes SQL Server think that databases backup has been done

community. I've Windows Server 2008 R2 which hosts few virtual machines. One of machines is Windows 2008 R2 server with SQL server 2008 R2 Express installed. Here's the thing: I wrote a script that ...
6
votes
2answers
41k views

Primary filegroup is full SQL Server 2008

I have a large table (~50 million rows) I'm trying to bulk insert into SQL Server and I get the error: Could not allocate space for object 'myDB' in database 'I 3 Stroke' because the 'PRIMARY' ...