We are rolling out our first .net 4.0 entity framework application and are having an issue with security.
We have it working on our alpha site inside our development environment with the following setup:
SQL2005
IIS6
.NET 4.0
asp.net mvc 2
Entity Framework
NTLM
But when we moved it to our production environment for beta testing we ...
Hi All I am Writing a Batch Script Which has to read a set of SQL Files which exists in a Folder then Execute Them Using SQLCMD utiliy.
When I am Trying to execute it does not create any output file. I am not sure where I am wrong and I am not sure how to debug the script. Can someone help me out with script?
@echo off
FOR %F IN (C:\S...
I have the SP I call the following example ways (the call is not from SQL rather it is from a .net program)
or
-- run with a few grantees
exec someproc 99999, '<grantees><grantee id="99"/><grantee id="100"/><grantee id="101"/></grantees>'
-- takes about 1 sec with > 59s on xml decomp
or perhaps
-- run with lots of gra...
I have a table follow:
ID first end
a 1 3
b 3 8
c 8 10
I want to select follow:
ID first end
a-c 1 10
But i can't do it. Please! help me. Thanks!
...
Hi,
I'm debugging a strange behavior which seems to be related to ARITHABORT. How can I retrieve the current value of ARITHABORT for the active connection?
cheers,
Achim
...
I am doing some analysis on a Cisco ICM database looking specifically at transferred calls.
Basically there is an ICRCallKey field which is a unique number generated at a peripheral gateway for each line logged in the table. I can tell when a call is transferred by looking at the ICRCallKeyParent and ICRCallKeyChild fields and seeing if...
Consider the fowling structure:
CREATE TABLE [tblEntityLogs]
(
[EntityLogId] [int] IDENTITY(1,1) NOT NULL,
[EntityCountCurrent] [float] NOT NULL,
...
)
When executing the query underneath I get an empty row returned...
DECLARE @N FLOAT
SET @N = 666
SELECT ISNULL(tblEntityLogs.EntityCountCurrent, @N) AS EntityCountCurrent...
I have a very strange and complicated situation. I have data being erased from one of my SQL Server tables, and I am not sure by what application. I would like to be able to track this.
As I am sure you are wondering how I could find myself in this situation, here is some background. We have 2 servers, Web and Database running IIS6 and...
Hi.
how can i Cast uniqueidentifier to binary in Sql?
Thanks.
...
I have a table set up like this
Project Category Date Hours
Proj1 test 8/2/2010 2
Proj1 test 8/3/2010 8
Proj1 test 8/4/2010 4
Proj1 test 8/5/2010 3
Proj1 test 8/6/2010 5
I want to develop a query where you can input a saturday(Week Ending) date and get a result lik...
SQL Server 2005 SP3 on Windows Server 2008 R2.
I ran a server side trace, and use DTA (database engine tuning advisor)
On one table DTA is suggesting me to create a nonclustered index with clustering key. I mean per DTA I need to create a composite non clustred index with explicit clustred index key as part of non clustered index.
I t...
Is it possible to pass a Dictionary<String, String> (or something similar; like a key/value pair) as an argument to a stored procedure on an MS SQL 2005 server?
I'm looking for a practical example.
Update
This question lead me to ask this one.
...
How would you construct and pass XML as an argument to a stored procedure on an MS SQL 2005 server? And how would you INSERT the XML into a table?
The data is in the form of key/value pairs:
[
0: [key, value],
1: [key, value],
2: [key, value]
]
...
When I compare the sysmergesubscriptions table there are 5 entries, 1 for the publisher and 4 for the subscribers. I then look in the MSmerge_identity_range table and only see 2 records for each table that has managged identity ranges and the subid is the publishers is from sysmergesubscriptions. Shouldn't there be 1 record for each tab...
Hi,
I've read a lot about defining custom error messages in SQL Server (I'm using 2005) - use sp_addmessage, pick a number over 50,000, etc.
But how can I query to see the custom messages that have already been defined for a database?
TIA!
...
If I put my MS SQL Log file on another drive and the drive crashes.
What happens to my MS SQL Database, will it create a new log file or how do I correct it?
...
I have a table which have an integer coloumn. Let table name is Table1 and ColName is Col1.
I want to add number 15 to every value in col1. what will be the sql query for this.
...
I have a database with a rather large number of tables, about 3500, and an application that needs to access a table list.
On a particular server this takes over 2.5 min to return.
EXEC sp_tables @table_type="'TABLE'"
I know there are faster ways to do that but sadly I'm not in a position to modify the application and need to find a...
I have two databases, A, and B. On database A, I have a table X, with 10 columns in it. On database B, I have a table Y, with 7 columns in it. 4 of the columns from these tables match, and whenever one table updates one or more of these columns, I need the other table to update these columns. How can I do this? Replication wouldn't ...
I can easily get a random record with this:
SELECT * FROM MyTable ORDER BY NewId()
I can easily get a record with "today's date" with this:
SELECT * FROM MyTable WHERE MyDate = "2010-24-08" -- db doesn't store times
But how would I combind the two?
Get 1 random record... anything with today's date.
If none are found...