adding new column to the table that is already replicated
i have a script that is going to add new column in a table that has millions of rows.if not exists (select * from syscolumns where id=object_id('progressnote') and name='dModifiedDate') alter table...
View Articlecummulative updates
Hi,what is cummulative updates, how often we will get, how to apply them?
View ArticleDB slow even after adding lot of RAM
I have a database with about 300 GIg of data and approx 45 users the ram size is 68Gig for sql,in a first week of increasing ram there was a significant difference in improvement but in this second...
View ArticleService pack
Hi,What is service pack. Difference between patch and service pack? And also what is hot fix?
View ArticleDMV statement and how to react upon the information
I am not sure how to use this information pulled through the query below SELECT * FROM sys.dm_os_wait_stats ORDER BY wait_time_ms DESC GOk
View ArticleSend email in a tabular format using SQL Server database mail conditionally...
Hi Experts.. Requirement: --If the following query resulted greater than zero rows, send email in a tabular format using SQL Server database mail --if is is equal to zero ,don't send the mail. can...
View ArticleHow do you deploy stored procedures when using TFS with Server Management...
I created a server scripts project and added all my thousands of SPs to it. Now, I'm trying to document the deployment process from the project to the database, but I can't find any documentation on...
View ArticleHow to get date only ?
Hi All,How to get date only without time ? Here is my queryselect p.company,p.ponum as orderNum, p.orderdate,v.name as supplier,p.shipcountry as country, Pr.Duedate as DeliveryDate, p.fob as...
View ArticleSSMS - Re-open queries after a reboot?
Hi,Is there a setting somewhere in SSMS (Sql 2012) that will reopen queries after a reboot? I know that I can browse to the temp folder and open them myself, however it would be good to know if SSMS...
View Articlesql server connection
how to connect sql server and wheter sql is inbuilt with vs 2012 or we have to install separatly..... !!
View Articlehelp with simple CASe statement
I have a simple case statement I am looking for a little assistance with if possible?I need to make the WHERE clause of my statement dynamic in so much as, dependant upon the value of a column, another...
View ArticleHow do I save a “Count” SQL(server management studio 2008R2) query?
How do I save a “Count” SQL query?First “Count” query; SELECT PrimaryKey, HostName, Operation, COUNT(*)as'Updated' FROM [Testdb].[dbo].[Audit] where Operationlike'u' GROUPBY PrimaryKey, HOSTNAME,...
View ArticleWhy Unique Index cannot be Created on a View which contains Union All operator
Hello all,I would like to know why we cannot create unique (clustered/non clustered )index on view which uses Union All operator in its definition.Thanks & RegardsSamba
View Articleerror on views containing union
Here is my script:select * from view_tablea where patient_id is not nullunion allselect * from view_tableb where patient_id is not nullview_tablea and view_tableb have the same data items.I have this...
View ArticleDeleted table in SQL Mgmt Studio, Trying to create a new table with same...
Deleted table in SQL Mgmt Studio, SQL 2008Trying to create a new table with same name in the Mgmt studiowhen I click save and give it the name, i get error: Table already existsbut the table does not...
View ArticleHow to enable logging and alerts related to deadlock
Hi,I am looking for a T- SQL script for enabling logging and alerts related to deadlock .And after running the script do we have to restart the SQL servers?
View ArticleInstance or database
I need advise for following situation: i have my intranet consisting of a module for customers, which is accessed by all divisions of my company. now a new module named finance management is to be...
View Articleselecting recent two set of log entries from a table with time
Hi Experts,We had a application that enters logs into database approximately for every half an hour.Lets say if the apllication started at 1:01 and ended its at job 1:05, the next run of application...
View ArticleRegarding SQL2008R2 memory usage
we use SQL2008R2 and set max memory usage of SQL2008 to 4GB (Total 8GB).After running FIM server, memory usage of SQL2008 reached 4GB.And I heard from Third vendor that it is recommeded to restart OS...
View Article