Microsoft's SQL Server is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. It originated from the Sybase SQL Server codebase, which is why both products use the extension of SQL called Transact-SQL (T-SQL).
2
votes
3answers
134 views
Does SQL Server CASE statement evaluate all conditions or exit on first TRUE condition?
Does the SQL Server CASE statement evaluate all the WHEN conditions or does it exit once it finds a WHEN that evaluates to true? If it does go thru the entire set of conditions does that mean that the ...
0
votes
1answer
78 views
Error installing SQL Server 2008 - all componets installed successfully except database engine
Below is the error I copied, please someone help me, I have tried at least 10 times in the last 3 days. It is SQL Server 2008 R2 and I wanted to install it on Windows 7.
Microsoft SQL Server 2008 ...
0
votes
1answer
64 views
Efficient way to fetch records since a given criteria
I'm trying to implement a logic where the user can say give me n records since a given id#. E.g.
SELECT TOP (100) col1, col2, ... colN
FROM Table1
WHERE ID > @id
ORDER BY ID
Performance is the ...
8
votes
2answers
172 views
What throughput should I expect with MPIO?
Dell PowerEdge 2950 with two 1 Gbps NIC's going to two 1 Gbps ports on a switch which then goes to a NetApp with four 1 Gbps NIC's that present as one virtual interface. 24 drives, 7200k SATA, NetApp ...
1
vote
1answer
50 views
SQL Server 2008r2 Enterprise evaluation expired - Options?
I have a client that has a recently expired SQL Server 2008r2 Enterprise Evaluation edition. I've been tasked to get it licensed and running SQL Server 2008 r2 Standard. How can I achieve this?
0
votes
0answers
20 views
Aggregate query on multiple values of same field [migrated]
I am using sql server 2012, I have a table of credit card transactions as follows:
CardScheme RespCode
=========================
Visa Declined
MasterCard Approved
MasterCard Approved
...
6
votes
2answers
72 views
Turning OFF CHECK_POLICY by default
We moved from SQL Server 2000 to SQL Server 2005. The client software, which I can not change, creates a user without option
CHECK_POLICY = OFF;
After creating a user, I have to run the command
...
0
votes
1answer
38 views
Oracle database link via ODBC to SQL Server does not recover automatically
I have a test environment with an Oracle 10XE database which is linked to an SQL-Server 2005 via an ODBC data source. For reference here I named the connection MSSQL_LINK. The production environment ...
0
votes
1answer
31 views
The UPDATE permission was denied on the object
I'm connecting to a remove Microsoft server running MsSQL via PHP. The code looks something like:
$con = mssql_connect('0.0.0.0:123', 'user', 'pass')
or die(log_mssql_error(__FILE__, __LINE__, ...
0
votes
0answers
41 views
What's the best database for analysis/research applications, i.e. involving complex queries but few transactions? [closed]
I'd like to start a discussion on what people think what the best database environment (MySQL, MS SQL, PostgreSQL, ...) is for data analysis and research applications like encountered in empirical ...
5
votes
1answer
104 views
Failed copy job deletes all users
Since the progression of this was apparently somewhat difficult to follow the first time around:
I attempted a completely boring, been-done-a-thousand-times-before copy of a database using the copy ...
0
votes
2answers
38 views
Is there any way to connect to one server and utilize a linked server using Windows authentication and NTLM?
I currently have SQL Server 2005 (Server A) that has a SSAS 2005 linked server (Server B). The powers that be do not want to enable Kerberos authentication, so I'm stuck with NTLM.
The problem is ...
0
votes
2answers
31 views
Addtional configuration when deploying Data Tier Applications?
I'm starting a few new database projects and I'm attempting to create them at Data Tier Applications. There are two items I'm not able to find documentation for. I would like to set the db owner to SA ...
3
votes
2answers
70 views
sp_executesql adds statements to executed dynamic script?
The Question:
As far as I can tell, sp_executesql adds statements to the beginning of submitted dynamic SQL script. But, a SQL Profiler trace does not capture the extra statements, and neither does ...
6
votes
1answer
76 views
Strange behaviour DBCC Shrinkfile
I am attempting to run a dbcc shrinkfile in chunks of 1GB against a database where 95% of the data has been archived and deleted. I'm leaft with a 235GB file where 9GB is data/indexes. I want to ...
7
votes
2answers
527 views
Is it a bad practice to always create a transaction?
Is it a bad practice to always create a transaction?
For example, it is a good practice to create a transaction for nothing but one simple SELECT?
What is the cost of creating a transaction when it ...
0
votes
1answer
41 views
Restoring database backup file gives access error
I am running SQL server 2008 and trying to restore from a backup file.
Note: the backup file and folder and read/write access to "everyone". Running the command as "master"
Running
RESTORE ...
1
vote
0answers
56 views
SQL Server 2008 sp_send_dbmail [duplicate]
I'm using SQL Server's
sp_send_dbmail
to distribute mail. Everything is working fine; BUT I tried to test a bad email address and it always reports success; and nothing is in the failed sent items ...
0
votes
1answer
44 views
SQL Server: subscriber as publisher and hierarchical replication
In Oracle Streams one way replication from one DB to another is a basic block for many replication topologies (N-way, hierarchical, combined and so on), and changes could be captured and applied for ...
1
vote
3answers
43 views
Copy database to local from server [duplicate]
As I show , I have server database version-10.50.1600 and local database version-10.0.1600 .
How can I copy database (with all tables and data(s)) from server to local which has different version ? ...
4
votes
3answers
56 views
Check server activity with code
I would like to see the activity on of the SQL server. So I can run a query when the server load is low. I know there is an activity monitor in SQL server but my company doesn't want me to give the ...
2
votes
2answers
120 views
Can I open a SQL Server 2008 R2 database in SQL Server 2008 R2 Express?
This question has probably been asked a dozen times but I couldn't find them here or at SO.
Can I attach/restore a SQL Server 2008 R2 database to my local SQL 2008 R2 Express instance?
-1
votes
1answer
64 views
validate where each parent intermediary is also a parent to itself [duplicate]
I want to validate where each parent intermediary is also a parent to itself. So this query should return invalid parents in SELECT If table has any.
I need to do is first of all get all parents ...
1
vote
3answers
63 views
Table clean up taking too long
I am selecting around 10 million rows which are invalid from table grid into ##grid_temp and deleting their related info from grid_info table. I am running this in a python script. It is taking more ...
0
votes
1answer
37 views
Statistical Analysis of Data that has to be done in an order?
Bear with me - that is the first time try that in SQL Server, normally I have been doing that on the front end ;)
I a implementing some analysis on time coded data series. This is not super ...
0
votes
2answers
29 views
Cannot see Green Button with white arrow in object explorer; DTC config problems?
I have SQL Servers across locations setup for replication. One of the SQL Server instances that I installed, running locally I can see the green button with the white arrow in the object explorer when ...
1
vote
1answer
87 views
SQL Server Memory for Backup Buffer
In SQL Server 2012 memory for backup buffer comes from buffer pool or non buffer pool (VAS)? Is this behavior changed between SQL server 2008 R2 and SQL 2012?
EDIT: Does MAX Server Memory ...
4
votes
1answer
134 views
Optimum configuration for 4 SSD drives
I would like to move a SQL Server database from a shared configuration with the web-server to it's own dedicated box. My current budget will allow me to put 4 disks together in an array with a single ...
2
votes
0answers
73 views
Why does GO affect my SELECT? [closed]
I am experiencing a very weird behaviour from the Management Studio GO.
I am following the full-Text Search tutorial and I run the following query over adventure works
SELECT ...
1
vote
2answers
75 views
How to restore SQL Server database with mirroring
I have SQL Server with mirroring.
I am trying to restore the database using the command:
USE [master]
ALTER DATABASE [CentralStorage] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATABASE ...
1
vote
1answer
32 views
Is there any way to Restore a Database from newer version to an Older Version of SQL Server? [duplicate]
I am having a database backup file from SQL SERVER 2012 and i wanted to restore it on SQL SERVER 2008R2 .
If we can’t restore a SQL Server 2012 database to earlier version what is the next best ...
0
votes
0answers
34 views
Data deleted from replicated table
I have two servers (one publisher and other is subscriber). The replication is succesfully running for a long time. I am using transactional replication with updateable subscription.
Couple of days ...
1
vote
1answer
78 views
Database hangs randomly
My database works fine but suddenly it stops responding to queries and I get only timeout errors on my website then after about 10-30 minutues it starts responding again on it's own but queries take ...
3
votes
1answer
50 views
Stopping SQL Server Agent: Effect on runnings jobs
On a server with MS SQL Server 2008 installed, we use the SQL Server Agent to schedule a large amount of SSIS-packages, all with unique schedules throughout the day.
Now and then, the server needs to ...
-2
votes
0answers
72 views
Stored procedure in SQL Server [closed]
I have 3 drop-down list. The 3 drop-down lists maping some values. I have create a new option in the 3 drop-down lists.
I will click new option and displayed text box and enter the value to store it ...
1
vote
0answers
32 views
Should xp_logevent and RAISERROR … WITH LOG work on LocalDB?
I need to run a script to configure a LocalDB (v11.0.3000) instance and database (from a .NET 4.5 program) and I want to record results at various stages. Someone suggested xp_logevent but it doesn't ...
1
vote
1answer
37 views
How to repair Microsoft.SqlServer.Types assembly
When I run a checkdb('mydb') this is the only error message printed.
Msg 8992, Level 16, State 1, Line 1
Check Catalog Msg 3857, State 1: The attribute (clr_name=NULL) is required but is missing for ...
0
votes
2answers
59 views
Linked Servers pointing to same server (localhost) causing “Transaction context in use by another session” error
We are using SQL Server 2008. Normally our app that is using different databases distributed over the network and some of the stored procedures we call therefore make use of linked servers.
Now I ...
0
votes
4answers
70 views
How do I deal with FK constraints when importing data using DTS Import/Export Wizard?
I am trying to use the SQL Server Import and Export Wizard to copy data from my production db to my dev db but when I do it fails with the error "The INSERT statment conflicted with the FOREIGN KEY ...
8
votes
2answers
272 views
More CPU cores vs faster disks
I'm part of a small company so as usual covering a number of different roles. The latest of which is procuring a dedicated SQL Server box for our .NET web app. We've been quoted on a dual Xeon E5-2620 ...
4
votes
2answers
97 views
When should tables NOT be compressed
We have two servers. One we just compressed, but I took over this little project and this guy says some tables are not good candidates. As with many others, performance is -critical-.
Is it accurate ...
2
votes
2answers
75 views
Combining data from two databases with same structure into one database
I have five SQL Server databases with the same schema in five different geographical locations. These locations send periodic backups to the central server which I restore in the five respective ...
0
votes
2answers
51 views
Migrating a database from SQL Server 2012 to the cloud
I have a sample SQL Server database which is running on my computer. I have a cloud database account on AWS (free account). I want to migrate the database, with all tables, to the cloud.
How can I do ...
-1
votes
0answers
108 views
All users missing after a detach/reattach [closed]
After detaching and reattaching a database to do a copy operation, all of the user objects are now missing from the database (I should add that the copy failed; according to the logs, there was an ...
2
votes
1answer
69 views
Can you grant an Active Directory Group rights on a linked server?
I am trying to grant rights to an Active Directory Group on a Linked Server. I am unable to do it; it only allows me to grant rights to individual active directory users. Does anyone know how to ...
2
votes
1answer
63 views
Backup on an empty SSAS database hangs
I created an SSIS package to iterate through all databases on an SSAS instance. It grabs the DatabaseId using AMO in a vbscript, then generates the XMLA to backup each database.
Most databases ...
2
votes
1answer
22 views
Debugging SSAS Timeouts
I have a drill-through problem apparently related to security. Users in one role are seeing timeout failures when trying to invoke a drill-through action. They have permission on the action through ...
0
votes
1answer
64 views
Remove specific duplicates (all but latest)
When removing duplicate rows, using the below query from this tutorial, how would I go about forcing which of the found duplicates to remove?
DELETE FROM dbo.ATTENDANCE
WHERE AUTOID NOT IN ...
9
votes
3answers
877 views
Updating a table with millions of records, its been 4 days
I am currently updating a table with millions of records, its been 4 days and query is still executing.
I checked the activity monitor its shows that query is running.
In event log there is no ...
1
vote
0answers
82 views
Troubleshooting a SQL Server instance that won't start
I've had a problem with one instance of SQL Server 2008 (the free version) not starting automatically. I always have to right click on the icon in the task bar and start it manually. It is set to ...





