Quantcast
Channel: Forum SQL Server Database Engine
Browsing all 15889 articles
Browse latest View live

Powershell invoke-sqlcmd calls stored procedure second time after Query...

We have a very strange issue. We have noticed that a single stored procedure is executed twice when is called by Powershell invoke-sqlcmd command.When we trace it we can see the procedure starts...

View Article


Data Type for a REPLACE statement

Hi,May I know what is the data type of this query after REPLACE is applied? Date or string? declare @date as datetime2(0) set @date = '2013-10-13 23:54:02.32365' print replace(convert(date, @date,...

View Article


Convert a datetime to YYYYMMDD

Hi,Is there a way to convert a date (e.g. 2013-10-13) to int ( 20131013) without converting the date to varchar first and then to int?cherriesh

View Article

SPpolicy_purge_history Jobs in progress for more than 9 hours. How to kill...

Dear All,I open the Job history and found that sppolicy_purge_history job was in progress for more than 9 hours and still its in progress. I stop the job but it still in progress.The step 3 is not able...

View Article

SQL Srever multiple instance on same server

Hi Everyone, To  maintan multiple version of sql server I have intalled sql server 2005/2008 R2 and sql server 2012 on same developement server. When I am opening any of the SSMS (2005/2008 r2/2012)...

View Article


2012 sql cluster / maintenance job - update statis is slow

2012 sql cluster when using maintenance plan for update stats, it takes about 10 minutes. When using script from the plan, it takes a second. No error. Any checking that we should do? Thanks,

View Article

sql server performance report

Hi Everyone,I got a SQL Server 2k5 instance. Now I want to get some performance report including the average memory usage, average CPU usage, active connections on a weekly basis. Is it possible to...

View Article

sp_send_dbmail problem

I am trying to send an email with the results in the body of the message.  Below is the code and below that is the error. DECLARE @mailprofile VARCHAR(200) declare @query nvarchar(max)  SET @query =...

View Article


truncate transaction log

Hi,1. I want to move T-logfile from one drive say S: to drive R:,2. I want to truncate the transaction log file, please let me know how to do it?Regards

View Article


SnapManager for SQL Backups

Hi Folks:Is any one configured SnapManager for SQL Server backups in virtual enviornments.If yes: Please let us know the Advantages and Dis-advantages of this.Thanks for your help...!Satish...

View Article

SQL Server management studio is not showing the entire data

Hi Team,There is varchar(max) column in a table when i do select on that column in management studio it is not showing entire data it is only showing 4000 characters. How to enable to show the entire...

View Article

Cursor in userdefined function

Hi All,Please help me this is a urgent requestI have a oracle function that has been created now i wanted that to be created in sqlserver. Can u pelase suggest me any link or script where i can use the...

View Article

SQLSERVER Function with cursor

Hi All,Am basically from oracle, i have a function with cursor here i have created in oracle. May you please help me in modifying this into sqlserver. FUNCTION fun_din (id IN NUMBER, dim IN VARCHAR2...

View Article


Msg 6522, Level 16, State 1, Procedure sp_printstatement, Line 0

Hello. we got a problem after patching our Windows server 2008R2 on which SQL 2012 cluster is built. when we run sp_browsereplcmds it gives following message. when SQL server on unpatched node, there...

View Article

Performance issues with change tracking

HI ,We ahve change tracking enabled on one of our server an year back (SQL Server 2008 + SP1), we are seeing the "'sys.syscommittab'" is 50 GB in size and anything running on that instance is very slow...

View Article


Regarding the Batch file running the stored proc to backup the Databases

Hello,I have a SQL Server 2008 R2 Express edition.I created a batch file at c:\SQLServer\Backups . This Batch file contains the Stored procedure which takes the Backup of all the Databases and places...

View Article

Start with Connect by prior

Hi All,Can anyone please help me in making this oracle sequel statement into Sql Server. select name  from (select id, info_id        from wp_tasks        start with id = task_id        connect by...

View Article


Multiple Partition on one Filegroup in SQL Server 2008

Hi Experts,My business requires to create the filegroup year base and partition on quarter base which resides in that year base filegroup.Ex: 2010 (FG) --> Q1,Q2,Q3,Q4 (Partitions).I google it but...

View Article

DB Server Freezing!!

Dear Gurus, I am not even able to log in to the SQL Server machine!! Any ideas why that happens? Any way to find out more details when the machine lets me back in? Do you think it is the machine or the...

View Article

PowerShell script to delete BAKs from mulitple child folders on a UNC share

Afternoon,I have been trying to roll my own ps script to accomplish a cleanup task but I am rather new to ps and am not getting the results I am needing.Here are the criteria I am shooting for:1....

View Article
Browsing all 15889 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>