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

learn more… | top users | synonyms (2)

1
vote
1answer
80 views

Can we create multiple users in one login in SQL Server 2008?

I have one database where I want 4 users in that particular database, so do I have to create 4 logins, one for each user ? I want multiple users from one login. I tried to create a second user by ...
1
vote
1answer
47 views

SQL Server IO per session

Activity Monitor can show real time the overall IO performance in MBytes/s on a server, but cannot show the same per session level. I know about DMVs, and sp_who2 to retrieve session level io ...
0
votes
0answers
23 views

Advice on query optmization - Multiple Unions

I'm trying to understand how this might be better optimized. I currently have these three different queries to union the results of each. The first case finds all records with the where condition of ...
2
votes
2answers
201 views

Convert hexadecimal to varchar

I have a column with values saved as hexadecimal. When I run this query: select column from table where column like '%22639935-KCN%'; This is the output I get: ...
4
votes
1answer
89 views

Finding changed column values

Table 1 ID |COL2|COL3|COL4|COL5| ROW1| 1 | 1 | 1 | 1 | ROW2| 1 | 3 | 2 | 6 | ROW3| 1 | 1 | 1 | 1 | ROW4| 1 | 1 | 1 | 1 | ROW5| 1 | 1 | 1 | 1 | ROW6| 1 | 1 | 1 | 1 | Problem ...
0
votes
0answers
30 views

Case Statement to Identify Multiple Errors

I'm trying to write a statement that identifies any of 200 potential errors / illogical combinations in a data set for each line item. My first thought was to write a case statement for each error ...
2
votes
1answer
53 views

Query Each Database in A Table [closed]

We have it set so that any database that shows an error code during the server scan is set to write the database name into a table. What I want to do is then have an email generated that will send the ...
-1
votes
1answer
46 views

SQL command or trigger needed to capture changes in tables [duplicate]

I want a query or trigger that will identify what changes done in the database tables from the Third Party Software such CMS etc. I want to check that which data is modifying with time. There is no ...
1
vote
1answer
72 views

Issues installing patches on SQLserver 2008

There are multiple issues with a server I manage, we cannot start management studio on it and when we try to install patches to SQL Server the setup never shows up. I run the patch as an ...
1
vote
1answer
51 views

Can I bring a warm standby SQL Server database online and then return to standby mode?

What I'm trying to do falls outside of the normal SQL Server work flow so might be impossible. I'm implementing a system that serves out copies of a large production database to multiple test / dev / ...
0
votes
1answer
31 views

Sql Server Security Scenario

I need some advice/help... I need to implement database security in some Databases but I don't know how to do that with this given scenario... Using LDAP Auth We have Table1 In Table1 one we have ...
0
votes
1answer
47 views

Error from Program Compatibility Assistant when installing SQL Server 2008

I am new to this so please do not mind if this is dumb question. I am receiving an error while installing SQL Server 2008 on Windows 8.1 I have .net 4. I have windows installer 4.5
0
votes
0answers
13 views

Connecting SQL Server using Server IP Address

This works when I try it internally (Within the LAN network) sConnString = "PROVIDER=SQLOLEDB;" & _ "Data Source=192.168.1.200,1433;" & _ "Initial Catalog=MyDB;" ...
0
votes
1answer
34 views

A login is a member of db_datareader and public roles only, but it is not read-only

I'm an accidental DBA in a small company that doesn't have a dedicated DBA. I need to set up a read-only login/user for SQL Server 2008 database using SQL Server authentication that could be used by ...
0
votes
1answer
23 views

Automatically replicate table data into another table

Is there a way to automatically replicate the table into another table where in if table A has changes, then it will also change the data in the 2nd table.
0
votes
1answer
48 views

SQL Server Backup - move to new server - Media Failure

I've got a server in the UK with SQL Server 2008. It's very locked down firewall-wise. We want a local duplicate of the DB to test and build a new report. Backing up the relevant DB, and then ...
1
vote
1answer
102 views

How to backup SQL Server database once evaluation period has expired

I'm using Microsoft SQL Server Management Studio from last one month that is evaluation period software. I'm not able to login in management studio. when I enter my user name and password it gives the ...
2
votes
1answer
46 views

SQL - Best way to limit access to small number of tables

I have a login I've created on SQL Server 2008, it's a SQL Server login not using AD. I want to give them access to every table in two databases except the tables that I store login information in for ...
1
vote
1answer
39 views

Select entries based on a combination of columns

I have a table with a definition like this: CREATE TABLE [dbo].[Contact] ( ClientNumber [numeric] (20, 0) NULL, ContactDate [Date] NULL, Name [text] NULL, AdditionalInformation [text] ...
1
vote
1answer
61 views

Foreign key not working

This is a very basic foreign Key issue, I presume. Unfortunately I am not a dba so it is a bit baffling to me. I have two tables, Report and Request. The Report table has a primary key of [RP_ID], ...
1
vote
3answers
39 views

Which one to consider for upgrade SQL Server 2008 vs SQL Server 2014 or Compatibility level 100 vs 110

I need to upgrade the SQL Server 2008 to SQL Server 2014 . SQL Server 2008 is currently running on compatibility level 100. I need to upgrade to SQL Server 2014 with compatibility level 100 this year ...
0
votes
1answer
23 views

drawback of including primary key creation along in the table creation script

Sample script: CREATE TABLE [dbo].[Countries]( [Id] [nvarchar](2) NOT NULL, [Name] [nvarchar](100) NULL CONSTRAINT [PK_dbo.Countries] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = ...
1
vote
1answer
26 views

Retire a SQL instance without impacting the primary server?

I have a SQL Server 2008 instance (TST01) that has some databases on it that are being migrated, still a few weeks of work to finish up, before the server is retired, this is a Virtual Server. There ...
0
votes
1answer
12 views

Unable to backup after recovery model change [duplicate]

Previously I had the recovery model as SIMPLE. I have altered it to FULL. While trying to perform BACKUP LOG, I am getting an error saying BACKUP LOG cannot be performed because there is no ...
0
votes
0answers
17 views

How to find difference in usage date based on results

I have a ticket details table that stores the information of transactions. Here is an example of the table data: Ticket_Number Detail_type_ID Description Date_Created TotalAmount Barcode ...
3
votes
1answer
64 views

VLDB - Create SQL DB Snapshot And Run Granular DBCC CHECKDB Commands

I have a 25TB db (SQL2008 Enterprise SP4) that appears to not have had CHECKDB run on it in production. No idea if it was run against a restored backup somewhere at sometime. Right now I don't have ...
1
vote
2answers
48 views

how do i create Periods and weeks (think business reports) using 2 date ranges

Basically Fromdate is every Sunday and ToDate is every saturday, i need to programatically create the PERIOD column on the fly through a stored procedure where period is the month and week is the week ...
0
votes
2answers
71 views

SUM() In SQL Server

Running SQL Server 2008 I can not wrap my mind around why these two queries, which are identical except for the first one has COALESCE() wrapped around the entire statement and the second one has ...
0
votes
0answers
56 views

Install SP4 on SQL Server 2008 SP3 - named clustered instance MQ and PQ in A/A configuration on two Nodes A and B

Current config - We have two named instances called MQ and PQ which are clustered in A/A configuration on two nodes A (for PQ) and B (for MQ). MQ and PQ instances/features on both nodes A and B are ...
3
votes
1answer
98 views

Optimizer gets the wrong number of estimated rows even with updated stats [closed]

I have a procedure running in SQL Server 2008 that contains a query similar to the one below; SELECT /* various columns from table 1 and table 2 */ FROM dbo.tbl_1 AS a INNER JOIN dbo.tbl_2 AS b ON ...
0
votes
0answers
32 views

What is the difference between Microsoft SQL Server 2008 R2 and MySql Server 5.6 for handling Select ISNULL(MIN(StartDate, '1/1/1900 10:00'))?

I would like to know the difference between Microsoft SQL Server 2008 R2 and MySql Server 5.6 for parsing the following SQL statements. Microsoft SQL Server 2008 R2 SELECT ...
1
vote
1answer
32 views

Back-end with encription and user-control for MS Access2003-VBA

My client has an Access 2003 "multi-user" (<6) "database" (<3k records) with "encryption" located in a LAN folder and an easy Form I polished with VBA(DAO library). Access 2003 encryption can be ...
0
votes
1answer
32 views

Determining CPU Usage of last week

We got a production issue last week (high CPU spike) on 25-Feb due to which server reboot was performed but ticket landed our DBA queue just today for analysis on CPU spike. Could you pls help me in ...
1
vote
1answer
54 views

Inserting rows into a truncated table will increase the size?

Today I came across this question. Everyone knows truncating table won't reduce the actual size of DB, in my scenario I have 5 tables on a DB which almost occupied 50 GB, so if I truncate all the ...
1
vote
1answer
60 views

Store values in select as a temp variable and reuse them

I am trying to clean up a query that is ugly but does the job. I am wondering if it is possible to create a temp variable inside of a SELECT statement. I have Googled and not found any help. Basically ...
-4
votes
1answer
26 views

Grant permission to user

Cannot execute as the database principal because the principal "ahsan" does not exist, this type of principal cannot be impersonated, or you do not have permission. Please tell me solution of ...
0
votes
0answers
20 views

Operator Disable enable in sql server via JOB when fail over occured

I want to disable and enable the the operator in sql server when fail over is occurred either manual or automatic. I have created below alert on both principal as well as mirrored server and in ...
2
votes
1answer
85 views

supplementary characters in FreeTDS

I have a C++ application that connects to SQL Server 2008 through FreeTDS unixODBC on an RHEL box. However, i am unable to insert supplementary characters to the database through FreeTDS unixODBC. ...
3
votes
1answer
75 views

Login issue in Logshipping

I have configured log shipping in my primary serverA and secondary serverB. Everything works fine until I bring the standby database online. Users are not able to login to the secondary serverB ...
1
vote
1answer
15 views

execute as login for nonexistent login successful

On Sharepoint database server, we found 18456 state 11: infrastructure error for account Domain\machineA$ every 10 minutes and nt authority\anonymous every hour. I checked syslogins but didn't find ...
0
votes
1answer
33 views

Maximum Server Memory adjust in blocks of 1024MB?

Our protocol is to set Maximum Server Memory at about 75% of RAM. For a 4GB RAM, sometimes it gets set at 3000MB and sometimes to 3072MB. There is a 2 or 3 percent difference in these values. Is ...
1
vote
1answer
98 views

Business Intelligence Development Studio installation for Visual studio 2010 problem

I want to install Business Intelligence Development Studio for doing report development in Visual Studio 2010, however in my installation process, I cannot find BIDS in the feature selection. What ...
0
votes
0answers
16 views

SQL Server users when restoring from older version to newer version WITH REPLACE

Let's say we have a SQL Server 2000 database with a user named user2000. We have a database called foo on SQL Server 2000, to which user2000 has been given access. We also have a SQL Server 2008 ...
0
votes
1answer
58 views

SQL Server Shrink

When running the Maintenance Plan Wizard to shrink a DB ... I am selecting all databases, however I have it set to shrink only when it grows beyond a specific size. If a database grows beyond a ...
3
votes
3answers
67 views

Assigning a domain user to run MSSQLSERVER service 2008R2

I have done this on a server (windows server 2008) before, but can not achieve the same thing on another virtual server I want a low level domain user to run the MSSQLSERVER service so that I can ...
1
vote
0answers
34 views

How can I make a database backup faster? [duplicate]

I recently attended an interview for my next job and was asked this: How can I speed up the backup of a database sized close to 1TB or 800 GB in SQL Server? My Answer: We can use Database ...
3
votes
3answers
147 views

How can I make a database backup go faster?

I recently attended an interview for my next job and was asked this: How can I speed up the backup of a database sized close to 1TB or 800 GB in SQL Server? My Answer: We can use Database ...
3
votes
1answer
70 views

CLR Procedure with XML parameter returns Data at the root level is invalid. Line 1, position 1

I have following CLR stored procedure, which is throwing error on this command xmlDoc.LoadXml(inputXml); code public static int spGetTaxOfficeXML(SqlXml _inputXml) { // this ...
0
votes
2answers
52 views

RIGHT JOIN did not work as expected

I have a question about joining two tables. Schema CREATE TABLE [dbo].[DCString] ( [ID] [bigint] IDENTITY(1,1) NOT NULL, [DCDistributionBoxID] [bigint] NOT NULL, [CurrentMPP] ...
2
votes
1answer
87 views

Filtered Index hint rejected by SQL Server

I have a filtered non-clustered index that SQL Server is not using. I'm pretty sure the optimizer is doing the right choice but I would like to force it to run with that index so I can compare the ...