How many concurrent connections do the express editions allow?
My front end uses standard ADO.Net code where I open the connection to the server, get my data, and then close the connection. Am I right in saying that as soon as the connection is closed, it then allows this connection to be opened by another user?
...
I'm setting up multiple SQL instances on an active/active cluster, and on our existing SQL Cluster, the cluster name is SQLCLUSTER, but we access the instances as SQLCLUSTERINST1\Instance1, SQLCLUSTERINST2\Instance2, etc. Since each instance has its own IP and network name anyway, can I install SQL as the "Default" instance on each netwo...
My company recently opened an office in Singapore. I work on the web application we use internally to manage the company, using a SQL Server 2005 back-end. Because of slow access over the net from Singapore, we're shipping them a server that will host a local copy of the web app and database and we want to keep their local version of t...
I have a table that has 4 sets of 25 columns in a BIT concept. Actually field is smallint but it is either 0 or 1 in it's data.
Here is my code that is an attempt to get the total for the first group of 25 cols.
Declare @rows int
, @ID uniqueidentifier
, @LocTotal bigint
select @rows = ( select count(*) from #t1 )
while @rows > 0
...
If there's one thing that I hate about SQL Server, it's the horribly unhelpful error messages. My favorite is "Incorrect syntax near..." because it provides almost no hint as to what's wrong.
Are there any tools to get a better idea of what's wrong with the statement? Or does anybody have any other helpful hints for figuring these kin...
Exact duplicate:
Advantages of MS SQL Server 2008 over MS SQL Server 2005?
i am a sql developer and i use sql 2005. i want to now to pass to 2008 but i am a little affraid. can anyone gives me some advices about this. should i still continue using sql 2005 or is better pass all my projects to 2008 due to better performace?
...
In SQLServer 2005, is it possible to schedule an SSIS package to run something other than the AQL Agent Service Account?
I've got an SSIS package that makes a connection to a db and runs a stored procedure. My criteria is that I will not specify user names/passwords in a package or package configuration, so I want to use integrated au...
I was running a trace on a Sql Server 2005 using the profiler and need to find out what is causing the reported errors.
I used the "blank" template, and selected all columns of the following events:
Exception
Exchange Spill Event
Execution Warnings
Hash Warnings
Missing Column Statistics
Missing Join Predicate
I noticed a number of ...
How would you store a time or time range in SQL?
It won't be a datetime because it will just be let's say 4:30PM (not, January 3rd, 4:30pm).
Those would be weekly, or daily meetings.
The type of queries that I need are of course be for display, but also later will include complex queries such as avoiding conflicts in schedule.
I'd rather...
I have an Orders table (simplified)
OrderId,
SalesPersonId,
SaleAmount,
CurrencyId,
...
I am attempting to create a report on this table, I'm hoping for something like:
SalesPersonId TotalCAD TotalUSD
1 12,345.00 6,789.00
2 7,890.00 1,234.00
I'd prefer not to do a self join (perhaps I'm optimiz...
I have a number of indexes on some tables, they are all similar and I want to know if the Clustered Index is on the correct column. Here are the stats from the two most active indexes:
Nonclustered
I3_Identity (bigint)
rows: 193,781
pages: 3821
MB: 29.85
user seeks: 463,355
user_scans: 784
user_lookups: 0
updates: 256,516
Clustered Pr...
Here's the situation I'm in. I have a table containing peoples' information. Some of them are imported from another system while some are imported manually. What I would like to do is pull everyone in, but if there is a record entered manually and a record that was imported, I want to select only the imported one (since it is likely m...
How can you insert the date in the filename (a dynamic filename) used in a T-SQL backup script? Using SQL Enterprise Manager to create and schedule a backup job, I'd like to edit the T-SQL created to change the filename of the backed up database to be dbname_date.bak (i.e. northwind_5-1-2009.bak). The next time the backup runs, it will...
I'm trying to figure out decimal data type of a column in the SQL server. I need to be able to store values like 15.5, 26.9, 24.7, 9.8, etc
I assigned decimal(18, 0) to the column data type but this not allowing me to store these values. What is the right way to do this?
Thank you
...
We're having a problem with a merge replication. Our publisher runs SQL Server 2008, while our two subscribers run 2005. Our publisher is trying to send an ALTER TABLE Foo SET (LOCK_ESCALATION) command out to our subscribers. I think I remember reading that this command is new in SQL Server 2008, and if so, it makes sense that the com...
I have a very typical linq-to-entities data binding in WinForms:
myGrid.DataSource = myEntities.entity
When it reaches that line of code it simply hangs. Similar assignment a different entity work fine elsewhere in the code. The database contains no more than 50 lines of data in all entities (it's a new project) so it's not waiting on...
I want to get the top #nr_of_rows - (int)(#nr_of_rows / 10 - 1) of a table. So like if you have 63 rows, it would return 3 rows, 90 rows would return 10, 85 would return 5, etc.. Of course this can be done in two queries, just wondering if it can be done in one query.
If you guys know of a straight sql query, it would be great but ideal...
I am trying to update a column in my table which was last inserted. I tried creating this stored procedure:
CREATE PROCEDURE [dbo].[msp_AssociateEvent]
(
@EventId int
)
AS
UPDATE tblFoodMenus set
EventID = @EventId
Where FoodMenuID = IDENT_CURRENT(tblFoodMenus)
but it gives me this error: Invalid column name tblFoodMenus.
Am ...
Is there a way to implement a CHECK constraint that checks a value against another value in a different column in the same table? Specifically, I want to ensure that a "checkout" date value to be inserted is greater than the "checkin" date value in the table before inserting the row.
I may be missing some details, so please let me know ...
I'm trying to work out a pretty complex query in SQL Server 2008. I'd like some input from SQL experts here.
Imagine I had a Payments table with these fields:
PaymentID int,
CustomerID int,
PaymentDate datetime,
Amount decimal
So essentially, it is a table of payments made by a customer on specific dates. An important thing to n...