I'm looking at changing our Auditing process for our SQL Server 2005 databases and I came across Change Data Capture in SQL Server 2008.
This looks like a good idea, and I'm tempted to try it, but before I do has anyone used it in a commercial environment and what are your thoughts?
I noticed when I was reading about CDC in the MS hel...
If you have for example > 5 left joins in a query is that a code smell that there is ...
something wrong with your design?
you're doing too much in one query?
you're database is too normalized?
...
Hi!
I have created a linkedserver as ravikiran-vm which is the virtual machine in my desktop.
Now I have a database called kiran which contains an employ table.
To retrieve employ data, I do the following:
select * from ravikiran-vm.kiran.employ
but it shows the error "Incorrect syntax near '-'."
Can anyone help me, please?
Thanks...
I've recently enabled CLR on my 64 bit SQL Server 2005 machine for usage of about 3 procs. When I run the following query to gather some info on memory usage...
select single_pages_kb+ multi_pages_kb + virtual_memory_committed_kb as TotalMemoryUsage, virtual_memory_reserved_kb
from sys.dm_os_memory_clerks
where type = 'MEMORYCLERK_...
Hi,
With sql Server 2005.
I have declared a trigger that get fired "AFTER INSERT, UPDATE" , in this trigger I'm using a WHILE and a CURSOR to loop on the INSERTED table's rows.
When I find a row that does not sotisfy a specific condition:
I want the trigger to rise an error and do not insert any of the rows that fired the trigger (not e...
Anyone know a simple query to grab a list of all stored procedures in a SQL 2005 database ordered by createdate?
...
I'm trying to learn SSAS on my own and am having troubles understanding a problem with my cube. I have a database project where I want to do reporting on a single table. I know this a bit unusual, but its a relatively simple model and data has already been normalized into that one table. It has two columns that serve as dimensions- ti...
I have a primary key that I don't want to auto increment (for various reasons) and so I'm looking for a way to simply increment that field when I INSERT. By simply, I mean without stored procedures and without triggers, so just a series of SQL commands (preferably one command).
Here is what I have tried thus far:
BEGIN TRAN
INSERT INT...
We've run across a slightly odd situation. Basically there are two tables in one of our databases that are fed tons and tons of logging info we don't need or care about. Partially because of this we're running out of disk space.
I'm trying to clean out the tables, but it's taking forever (there are still 57,000,000+ records after lett...
I have a SQL 2005 Reporting Services report that has several report parameters. One of them is called IsActive and is of type Boolean. The parameter is hidden and set to allow null values. For its default values settings, I have it set to null. In my application that has the reportviewer control, I have logic that decided whether or ...
I use database scripts where I check for the existence of a Stored Procedure then drop it then create it.
Which of the following would be more efficient for checking and dropping SPs
Option 1
IF EXISTS(SELECT * FROM sys.objects WHERE OBJECT_ID = OBJECT_ID(N'[dbo].[myStoredProc]',N'P'))
DROP PROCEDURE dbo.myStoredProc;
Option 2
IF ...
Hi
there is project already devoloped using unmanaged code.
now in a small module to use SQLSMO in C++ i hav used managed code.Now the problem is how to integrate manged code with unmaged code...
can any body help me in this regard with small exampe...
if u do this u help me a lot
Thanks in advance....
...
Hi
Since SQLSMO is available in .net 2.0 that how i can use it in VS2003 which compiled using .net 1.1.
What can i do to this.
Is it is possible use of SQLSMO in VS2003?????
Plz clarify my doubt????
Thanks in advance...
...
Is Managed code is the only way to use sqlsmo.
Can ay body help me
...
As this article's figure 4 says, SQL Server 2005 + can return you a list of missing indexes. It stores 2 important info about missing indexes:
[EqualityUsage],[InequalityUsage]
If I have a missing index where:
[EqualityUsage]='col1',[InequalityUsage]='col2'
Should I create an index with Indexed Key Columns:
'col1,col2'
or
'col2,co...
Hello,
We have set up a logshipping scenairo on 2 Sql Server 2005 machines. The secondary database is in STANDBY mode.
We want to use this secondary server for reporting purposes, as the report viewers will query this STANDBY database according to their given execute rights. So we need multiple users on this secondary server, having dif...
I have a column in SQL Server 2005 that stores a simple chunk of XML. At a later point processing is performed and I need to merge some processing info into the XML.
While I can do this at an intermediate point I would much prefer to keep this method centraliazed within the stored procedure that is responsible for updating other fields...
I'm looking for a way to properly comment my stored procedure code so that I can extract the information into useful documentation ala something like XDOC (or C# equivalent). Something that's preferably lightweight would be ideal.
...
I want to export some SQL Server 2005 data to CSV format (comma-separated with quotes). I can think of a lot of complicated ways to do it, but I want to do it the right way. I've looked at bcp, but I can't figure out how to put the quotes around the fields (except concatenating them to the field values, which is ugly). I guess I could do...
Why do Scalar-valued functions seem to cause queries to run cumulatively slower the more times in succession that they are used?
I have this table that was built with data purchased from a 3rd party.
I've trimmed out some stuff to make this post shorter... but just so you get the idea of how things are setup.
CREATE TABLE [dbo].[GIS_L...