Hi
In my system I do a centralized calculation on an aggregate with a lot of collections. I need ALL of the collections to be loaded before the calculation, and therefore I use a multicriteria that joins the collections on the root.
The criteria i listed here below. It takes approx 500ms to run on my local setup, and that is a lot of ...
I making stress test on my database which is hosted on sqlserver 2008 64bit running on 64bit machine 10 GB of RAM.
I have 400 threads each thread query the database for every second but the query time does not take time as the sql profiler says that, but after 18 hours sql takes 7.2 GB RAM and 7.2 on virtual memroy.
Does is this normal ...
This question might make one smile, really, HDD space is as cheap as dirt today. But nevertheless, with extremely slow internet connections (which is still the case in the major part of the world) transferring backups from different branches might be real pain in the back.
So, do you have any ideas on how to decrease database file size ...
How do i write INSERT statement if i get the values of colA from TableX, colB from TableY and colC from TableZ?
eg: INSERT INTO TableA (colA, colB, colC) VALUES (?,?,?)
Any ideas if it is possible?
...
I have upgraded a SQL Server Express 2005 instance to Standard using the best practices described in other posts. I have restarted the SQL Server but is still appears as Express in Management Studio and when executing select @@version
...
My code generates some dataset per 10 minutes-log or per 30 minutes-log, but the DateTime Format is '1900-01-01 14:20:00'. I need '2009-05-13 14:20:00', so I want to change it.
See Table1 and Table2 below.
declare @date1 nvarchar(100) , @date2 nvarchar(100) , @countgap int,@count int
set @date1='2009-05-12'
set @date2 = '2009-05-13'
...
How can I run the Bulk Copy Program (BCP) utility of SQL Server through .Net code?
...
Possible Duplicate:
Using MSSQL backend for Subversioning Repositories
can we use sqlserver as backend in subversion(instaed of fsfs)?
...
I have an SQL Server 2000 db, and I would like to retrieve summary information for all the numerical fields contained in the user tables of the database.
I can retrieve the names, datatypes and sizes with the following query:
SELECT t.name AS [TABLE Name],
c.name AS [COLUMN Name],
p.name AS [DATA Type],
p.length AS [SIZE]
FROM dbo.sys...
Can I connect to SQL Server 2008 using PDO and integrated security using the mssql driver? Currently doing something like this to connect normally:
$db = new PDO("mssql:host=host;dbname=db", "user", "pass");
This works fine using SQL Server authentication, but it is a pain having to create SQL server logins for loads of databases, so ...
I have been wondering about temp tables in sp's and how all that can effect concurrency.
SP made on a MSSQL 08 server.
If I have a SP where I create a temp table and drop it again like this:
BEGIN
CREATE TABLE #MyTempTable
(
someField int,
someFieldMore nvarchar(50)
)
... Use of temp table here
... And then..
DROP TABLE #MyTem...
I need a status column that will have about a dozen possible values.
Is there any reason why I should choose int (StatusID) over char(4) (StatusCode)?
Since sql server doesn't support named constants, char is far more descriptive than int when used in stored procedure and views as constants.
To clarify, I would still use a lookup table e...
I recently installed SQL2008 and am having trouble logging in from another application. I have set the security to shared authentication and have specified a password for the SA login. I am able to log in using SA and password from the management studio and also from command prompt using the osql command, but when trying to log in from...
I have a LINQ to SQL query:
from at in Context.Transaction
select new {
at.Amount,
at.PostingDate,
Details =
from tb in at.TransactionDetail
select new {
Amount = tb.Amount,
Description = tb.Desc
}
}
This results in one SQL statement being executed. All is good.
However, if I attempt to ret...
Besides readability is there any significant benifit to using a CASE WHEN statement vs ISNULL/NULLIF when guarding against a divide by 0 error in SQL?
CASE WHEN (BeginningQuantity + BAdjustedQuantity)=0 THEN 0
ELSE EndingQuantity/(BeginningQuantity + BAdjustedQuantity) END
vs
ISNULL((EndingQuantity)/NULLIF(BeginningQuantity + BAdjus...
Hi,
I am developing an application that is hosted on a SQL Server 2005 failover cluster. The application (developed using C#, .Net 2.0) makes use of a number of the clustered resources (printers, file shares, etc). I would like to set up a testing environment that replicates the cluster. However, the current test environment has only...
Title says it all really. What software is available for enabling Source Control in SQL Server 2005 and above. What are the downsides of doing Source Control in SQL Server if any?
...
I'm trying to move a database from a hosted server to my own SQLExpress instance. I used the Database Publishing Wizard to create the script... but the diagrams were not transferred.
Then, I found and followed the advice of another answer on this site that had me import/export the data to the sysdiagrams table.
When I do that, I see...
In a part of my data warehousing stored procedures, i have a procedure that compares old project data to new project data (old data is in a table, new in temp table) and updates the old data.
The weird part is that if the old data is null, then the update statement doesn't work. If i add a is null statement the update works fine. My q...
We're setting up K2 and it requires that several databases be snapshoted before being backed up so that they are at the exact same point in time. Can I do this and how? There are a total of 14 databases that need backed up.
...