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

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Sql agent job fails with access denied error

We are trying to execute a SQL agent job which executes a step to shut down a service on DEV ENV using CMDexec, but it fails with error below: Executed as user: ABC\mssql. System error 5 has ...
-1
votes
1answer
48 views

How to set foreign key in table in one database that references a table in another database

Msg 1768, Level 16, State 0, Line 1 Foreign key 'FK_id' references object 'dbo.student' which is not a user table. Msg 1750, Level 16, State 0, Line 1 Could not create constraint. See ...
0
votes
0answers
11 views

Want to increase the sql server logging to some other level where we can find more explanation of errors [on hold]

I want to increase the logging level in sql server 2008 ..How to do that.please help..The present error logs have nothing to diagnose.
0
votes
0answers
9 views

Application hangs user login to apps but not able to open the other link (app is in C# using SQL Server 2008) [on hold]

The user log on to the application but does not do any other task. The application is in C# using SQL Server 2008.
-2
votes
0answers
14 views

How can I attach my database to my C# setup? [on hold]

How can I attach my SQL Server 2008 database file to my C# setup?
-3
votes
1answer
48 views

Ola Hallengren Index Optimise Script not Rebuilding Indexes [on hold]

I have downloaded Ola Hallengren's script and deployed to master database. I run it using the below... EXECUTE dbo.IndexOptimize @Databases = 'USER_DATABASES', @FragmentationLow = NULL, ...
0
votes
1answer
23 views

Error with FUNCTION ( SQL Server 2008 ) - ''Cannot find either column…'

Friends, I have this Function: create function [dbo].[fn_xxx] ( @Nome varchar(100), @Descricao varchar(500) ) RETURNS @tbDados table ( Qtd int ) as Begin ...
1
vote
0answers
31 views

When does SQL Server follow the Minimum Password Age policy?

According to this SQL Server 2008 whitepaper, SQL Server should only pay attention to the Minimum Password Age policy when the Check_Expiration (Enforce Password Expiration) option is turned on. Page ...
0
votes
1answer
23 views

When does a port get assigned if SQL Server is set to TCP Dynamic Ports

I'm trying to determine when a dynamic port is assigned to SQL Server. If the TCP/IP Properties have the TCP Dynamic Ports enabled, does that port get assigned at the time the Server is installed or ...
2
votes
1answer
32 views

Agent service account shows as not clustered

One of the SQL Server 2008 R2 instances I administer is running on a two node Windows Cluster (Windows Server 2008 R2 Enterprise) When I run the DMV sys.dm_server_services, SQL Server Service Account ...
0
votes
0answers
35 views

ComputerNamePhysicalNetBIOS and “Current Host Server” shows different machines

I have a SQL Server 2008 R2 instance on a two node (say names X and Y) windows server cluster (Windows Server 2008 R2 Enterprise). Server Manager on both nodes shows 'X' as the 'Current Host ...
0
votes
0answers
28 views

Using loops inside Openrowset

I'm trying to execute a query across around 200 servers using openrowset function. This function needs to execute in a loop - the query is sucessfull in SQL Server 2012 environments, but failing in ...
0
votes
0answers
34 views

Get list of rows in an hour bracket, grouped by 5 minute increments

Im beating my head the wall with this one. Using data from an attendance tracking table, I need to basically count how many people are inside the building at a given time, assuming that they are still ...
1
vote
0answers
28 views

Full text index does not honour deleted words - They are still indexed

I have a full text index defined as 'Automatic' radio button checked on in its Catalog. When I modify a word in the full text indexed column, the new word appears in the sys.dm_fts_index_keywords but ...
1
vote
1answer
37 views

Validate many SQL statements for correctness

I have about 150 reports generated from SQL statements. These reports are saved independently from the server. Some generated from sprocs, some from table-valued functions, but mostly just SQL ...
0
votes
1answer
10 views

skip the rows that already imported in sql server 2008 r2

I used the sql server 2008 r2 wizard to import excel file to my DB, now I'm trying to import more excel sheets may have the same data that I imported before. how can I import these excel sheets to the ...
1
vote
0answers
23 views

Is there an equivalent to sys.dm_exec_query_memory_grants for non-waiting queries?

Basically I have a proc that executes and requires massive amounts of memory. We can sometimes get into a situation where the proc executes multiple times, in which case the memory grants are visible ...
1
vote
0answers
32 views

Table queries locked during long insert SQL server

Everyday runs a sql job that loads data from bulk files and load them in auxiliary tables, to adapt and then copy to the destination table where applications read (and only read) the data. I am ...
-2
votes
0answers
14 views

How to do a lookup between three tables and update multiple columns in one table

This is a part of my previous question. How can I update three columns in tblProjects for all the records in the table using a single query, looking up in two other columns? I currently have the ...
0
votes
1answer
21 views

How to split a multivalued column, do a lookup and update another column?

This is a part of my previous question. How can I achieve the following for all the records in my table using a single query? SET @TeamMembers = TeamMembers from tblProjects where ID = '125' ...
1
vote
0answers
52 views

How does SQL Server know it was abnormally shutdown last time [closed]

I am doing background reading on this. Would like to know how does SQL Server know it was abnormally shutdown last time?
2
votes
2answers
63 views

Cannot generate SSPI context ( SQL Server 2008 ) ( RESOLVED )

When someone tries to connect to a SQL Server instance, the error shows up: It's not possible do generate SSPI context. Yesterday we had a blackout (don't know how to say this expression in ...
0
votes
2answers
51 views

AVG function returns wrong average

I have a simple table with a column of type REAL. There are 2 rows in the table and the values are 0.23 and 0.24. If I run the following: SELECT AVG(MyColumn) FROM dbo.MyTable I would expect to ...
0
votes
1answer
63 views

Single query approach to split and copy string values in a column

This is a part of my previous question. I have the below logic to split a string value from a column in table tblProjects as below: SELECT @Docs = Documents FROM tblProjects WHERE ID = @ID SET ...
3
votes
0answers
63 views

How long does it take before an index on table makes a difference?

We are using SQL server 2008. We are doing a root-cause analysis on an event in production and trying to explain everything. This is the scenario: We had a query that runs twice a minute and takes 4 ...
0
votes
1answer
40 views

How to create a stored procedure with columns from three different tables in SQL Server 2008?

I'm a fresher and I would like to get some suggestions on how to create a stored procedure in which I have to select columns from three different tables. 2 columns customername and customercode from ...
0
votes
0answers
58 views

how to restrict user to run sql server database only on partiular ip only?

How to restrict user to run a SQL server database on in particular IP only? I have one database I just want to give to clients. But I wont Restrict that the database should run only on one ...
0
votes
1answer
16 views

Run SQL requests generated by some script

I'm using this script to delete data from all the tables in my database. It generates DELETE statements in proper order, each request in one row : DECLARE @schema_name sysname; DECLARE @table_name ...
1
vote
0answers
51 views

Too big database file 90GB [closed]

I just found that one of database growth to size of 90 GB (one file) The biggest table is about 23 GB , mostly containing integer data. Till now I dont have performance problems, but I think that ...
3
votes
1answer
51 views

Full to Simple recovery mode during massive data update?

I`ve got a 50 Gb database, in which a table takes up 43 GB, and it's full of bad data(over 90%), and i plan to clean it. Database is in Full recovery mode. My plan is: 0 - take a backup for safety ...
1
vote
2answers
61 views

How do I prevent my clients viewing my database definition when it is installed on their server?

I want to give my database to the client to install on their server. However, I want to deny the client rights to see the tables and stored procedures and also want to restrict that database to run ...
6
votes
1answer
183 views

Convert clustered primary key to non-clustered and use another column for the clustered index

I have a large table with a primary key (GUID) that is also the clustered index. There is already a integer sequence based field. So I want to leave the GUID as the PK and make the integer column the ...
0
votes
2answers
35 views

Problems with Insert( simple query - can't think something )

I have 2 tables Tblservicedesk and Tblservicedesk_temp Collumns: CodServiceDesk ID_Solicitacao Solicitante Departamento Tecnico Grupo Status Prioridade ...
-1
votes
1answer
17 views

Run Sp on linked server 2008 [closed]

How could i run my sp on a linked server ? Using sql-server-2008 Exec my_sp [db-srv_name].[db-name].[dbo] Please help me i am new in sql
1
vote
0answers
68 views

How to use HTTP Connection Manager in Script Component? (Not Script Task)

I'm trying to perform the same scenario as in the following link; Create a SSIS Script Component as a Data Source that uses a pre-existing HTTP Connection Manager to retreive a page with GET and emit ...
1
vote
2answers
94 views

How to split url in sql server like this

Here is the url www.abc.com/a/b/c/d/e/f/g/h/i I want result like this www.abc.com/a/b/c/d/e/f/g/h/i www.abc.com/a/b/c/d/e/f/g/h www.abc.com/a/b/c/d/e/f/g www.abc.com/a/b/c/d/e/f ...
2
votes
1answer
55 views

T-SQL query to find backup folder for specific maintenance plan

I want to check check if backup plans are set up correctly and need to query different servers, mostly SQL Server 2008, but also 2012. Is there any way to query the maintenance plans for databases, ...
1
vote
0answers
45 views

Rebuild/Re-organize index and Update statistics in SQL server

For many of the sql servers we have seen that the SQL agent Maintenance job first runs the re-indexing and later as a second step it update stats with full scan. I want to figure out if auto update ...
0
votes
1answer
230 views

Conversion failed when converting the nvarchar value '0.000000' to data type int

I have a code select CONVERT(NUMERIC, CASE ISNULL(FLEXFIELD4,'') WHEN '' THEN 0 ELSE FLEXFIELD4 END ) FROM DEIT_INDENT_DTL_INBOUND_RXL WHERE IND_INDENT_NO='NEE15SR000003' which is ...
2
votes
1answer
73 views

SET CONTEXT_INFO for tracking specific SQL requests

I've got a problem where I'm seeing some very strange lock waits, with the process at the top of the lock wait tree in the 'sleeping' 'AWAITING COMMAND' state. I can see the machine name and ...
0
votes
1answer
58 views

Insert/Update SQL Server Stored Procedure

I have to insert or update into a table depending on a record. I am using a stored procedure to do this. I am very new to SQL Server and stored procedures. I tried to follow various articles and ...
0
votes
3answers
53 views

Keeping an up to date copy of a SQL Server database on another server [closed]

We outsourced some of our business functions to another company. That company makes use of the same software as we do and we would like to keep a update to date copy of their database on our servers ...
2
votes
1answer
28 views

How to Create Aggregate function in SQL Server 2008

My requirement is to create concatenate function so I am trying to create Aggregate function as shown CREATE AGGREGATE [dbo].[Concatenate] (@value [NVARCHAR](MAX)) RETURNS[NVARCHAR](MAX) EXTERNAL ...
0
votes
1answer
56 views

Update Statistics full scan hung up?

We have a weekly maintenance plan that does your typical Integrity Checks and then goes and does an Update Statistics on all the databases on our server. Over the weekend it appears that our job was ...
1
vote
2answers
59 views

Restored database size

I have a large (90 GB) database. About half of the space is taken up by two tables that are no longer used. I intend to truncate these two tables and as I understand things this won't free up the ...
2
votes
1answer
59 views

Job to check the status of another job

I am looking to create a job which would check a status of another job every 5 minutes. select CASE jh.run_status WHEN 0 THEN 'Failed' WHEN 1 THEN 'Success' WHEN 2 ...
0
votes
0answers
29 views

Why the simple insert into query allocated a lot of tempdb?

I'm using sp_whoisactive to monitor the tempdb and found the following query allocated 30,000,000 tempdb_allocations (BTW, what's the unit of the allocations?) select a.*, b.A, b.C, b.D into c from ...
4
votes
1answer
131 views

Sql Server - Running a Job on Multiple servers

I am using SqlServer 2008. I have a Sql Server Job that checks Disk Space and emails admins if the space is less than 15% Instead of adding that Job to all servers is it Possible to run the Job on ...
1
vote
0answers
36 views

Are there limits to SSRS 2014 RDL files going over to SSRS 2008 (or 2012)?

Is there any incompatibility with reports developed in SQL Server SSRS 2014, and then exported to .RDL files that will be imported into SQL Server 2008?
1
vote
1answer
34 views

How to get paged resultset from a table?

I am trying to get paged resultset from a table (Notes). So, I am passing the last offset id (@LastOffset) value along with the page size (@Count). My approach to achieving this is: Sort the table ...