I have it enabled in Visual Studio 2008, but I'd really like to enable this feature in SQL Server Management Studio 2005 Express. Does anyone know if its possible? Maybe in a later version?
EDIT: Sorry, I meant specifically in the text/query editor.
I have it enabled in Visual Studio 2008, but I'd really like to enable this feature in SQL Server Management Studio 2005 Express. Does anyone know if its possible? Maybe in a later version?
I'm using the MERGE statement to upsert rows in an sql server 2008 database. However, my sproc is a single-row operation, whereas in fact I'd prefer to batch these. Is this even possible and, if so, how do I do it?
I want to use infinite WHILE loop in SQL Server 2005 and use BREAK keyword to exit from it on certain condition.
while true does not work, so I have to use while 1=1.
Is there a better way to organize infinite loop ?
I know that I can use goto, but while 1=1 begin .. end looks better structurally.
I'd like to modify the appearance of the query window in SQL Server Management Studio based on which database I'm currently connected to. For example, using a yellow background for production databases. Is there a way to do this?
Store a byte[] stored in a SQL XML parameter to a varbinary(MAX) field in SQL Server 2005. Can it be done ?
Here's my stored procedure:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[AddPerson]
@Data AS XML
AS
INSERT INTO Persons (name,image_binary)
SELECT
rowWals.value('./@Name', 'varchar(64)') AS [Name],
rowWals.value('./@ImageBinary', 'varbinary(MAX)') AS [ImageBinary]
FROM
@Data.nodes ('/Data/Names') as b(rowVals)
SELECT SCOPE_IDENTITY() AS Id
In my schema Name is of type String and ImageBinary is o type byte[].
So I installed a trial of SQL Server 2008 enterprise edition while waiting for MSDN licenses to come through - I now want to uninstall the trial and replace it with a developer edition installation.
However, I'd like to first know how long I have left on the trial. Is there a way to do this programmatically with SQL? I looked at create_date in sys.databases, but these give dates that are in 2003 (which is, I guess, when master and model were originally created).
How is it possible to know how much of the "DB quota" imposed by SQL Server express edition (4GB in old versions, 10GB in 2008R2) is in use?
Let's say I have a DB that is using 1GB, I want to know "9GB of free space".
Is it there a T-SQL command for this?
I am getting a whole number for the duration of product. For example : 62, 103, 184, 4543. I want to convert it in time format. Let say , in case of 62, it would format like '00:01:02'. I am looking for a function which can resolve my problem. Is there any function in SQL Server which convert a number into time format?
I'm trying to determine what instances of sql server/sql express I have installed (either manually or programmatically) but all of the examples are telling me to run a SQL query to determine this which assumes I'm already connected to a particular instance.
How to find the worst performing queries in MS SQL Server 2008?
I found the following example but it does not seem to work:
SELECT TOP 5 obj.name, max_logical_reads, max_elapsed_time
FROM sys.dm_exec_query_stats a
CROSS APPLY sys.dm_exec_sql_text(sql_handle) hnd
INNER JOIN sys.sysobjects obj on hnd.objectid = obj.id
ORDER BY max_logical_reads DESC
Taken from:
http://www.sqlservercurry.com/2010/03/top-5-costly-stored-procedures-in-sql.html
SELECT name FROM sys.databases -- this can list all database name in the server
user database
SELECT * FROM INFORMATION_SCHEMA.TABLES
-- these two line can list the table for one particular database
But how can I output the results like below?
Database Table
--------- -------------
db1 t1
db1 t2
db2 t1
... ...
I'm trying to do some cryptography for SQL Server 2000, and I know that only SQL 2005+ comes with built-in functionality for doing this natively.
Do you know any open source implementation that I can use for free of RSA-2048 cryptography?
Hi ,
I need to add default value column in SqlServer Compact....i am new to this SQL server compact so Plz anyone tell me the Solution of this....
Thanks In Advance
Is there anyway to do this in SQL Server 2005?
declare @tv_tablelist table (recnum int identity(1,1) primary key, newvar varchar(500))
declare @mysql nvarchar(4000)
set @mysql = 'insert into @tv_tablelist(newvar) values (''test test test'')'
Exec sp_executesql @mysql,
N'@tv_tablelist table (recnum int identity(1,1) primary key, newvar varchar(500)) OUTPUT',
@tv_tablelist OUTPUT
select * from @tv_tablelist
I have a product table where the description column is fulltext indexed.
The problem is, users frequently search a single word, which happens to be in the noiseXXX.txt files.
We'd like to keep the noise word functionality enabled, but is there anyway to turn it off just for this one column?
I think you can do this in 2008 with the SET STOPLIST=OFF, but I can't seem to find similar functionality in SQL Server 2005.
In SQL Server, how can I insert data into a table that has just one column which is of identity type?
Such as insert into the following table t.
How can I write the insert statement?
CREATE TABLE t
(
id INT IDENTITY(1, 1) PRIMARY KEY
)
Great thanks.
What are the benefits of storing XML in SQL Server over storing JSON in a varchar field?
Any tutorial available for how to use the XML data type effectively?
Do I need to provide the dtd / xml schema somehow? I've heard it is optional, right?
Thank you.
Obviously changing schema, adding / removing published articles etc expires the snapshot, but is there anything else that would cause the publication to expire?
We're seeing a snapshot expiring without any changes to schema or data on the server.
If a snapshot is older than the subscription expiration, would that cause it to be expired?
Hi,
i am updating some set of records in that table , after that i need to make this table read only.
So How to make a table Read Only in SQL Server?
Regards,
Jeyavel N
How can I copy a table from an SQL Server CE 3.5 database to another (also CE database) in Visual Studio 2008, using the design tools?
Note: When right clicking on a table there is a "copy" command, but I couldn't find any "paste" command so far...
When a client connects to a server using TCP, a new socket is created for the TCP stream. Does the connection remain on the same port the connection was made or does it get changed to some other port?