.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

exec sp_reset_connection

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :ASP.Net
 

hi,

i am started sql server profiler, but every 2 or 3 second "exec sp_reset_connection" stored procedure is executing.

so i cannot see my trace of query.

how can i stop tihs.




View Complete Post


More Related Resource Links

exec sql and transact

  
Hello guys. i've a problem, in a stored procedure i have a sql (SELECT * FROM TABLA -is only an example, actually, my sql statment is more complex) if i execute the sql statment the time for delay results is 6 seconds. but if i execute the stored procecure (EXEC spexample that has the same statmen) the results is in 2 minutes. is very slowly exec te store procedure, but the statmen is fast. excuse me for my english!!!

Using EXEC with a table variable?

  
I want to pass the results of a stored proc into a table variable in SQL SEVER 2000. Something like this declare @a table ( employeeid int )   exec @a=dbo.MetricsProcessor_GetTopEmployees @parameter1, @parameter2   ---------------------------------------------------------------------------------------------------------------------------------- I tried insert @a execute dbo.MetricsProcessor_GetTopEmployees @parameter1, @parameter2    but got this error: Msg 197, Level 15, State 1, Line 6 EXECUTE cannot be used as a source when inserting into a table variable.   How can i do this.   Thanks.

How to pass the file path in EXEC of Stored Proc for getting IIS Logfile data

  
Hello,                  I need to get IIS Logfile data from Stored Proc. How to do this. I am using Bulk Insert Method in my stored Proc When I execute the stored proc I am getting an error that  Incorrect syntax near 'C:\WINDOWS\system32\Logfiles\W3SVC1\ex100802.log'.     Below is the code.                 Create  PROCEDURE  spWebLog @path varchar(300) AS begin exec('BULK INSERT Weblog from''' + @path + ''')  end go Declare   @SQL Varchar(100 ) Set    @SQL= 'C:\WINDOWS\system32\Logfiles\W3SVC1\ex100802.log' exec   spWebLog @SQL    

Backup tools fro granular restore - Symantec BAckup Exec Problem

  
Dear all, we are facing a problem here. Our sys admin set up everything to run the farm backups. He is using Symanteck Backup Exec 2010. In that farm we have 3 web applications which represents 3 content databases on a separate SQL back-end machine. When the backup is done, the report tells the backup succeed. It happens that when we try to recover from the backups, we can recover from an item level from 2 of those web applications, but not from 1. It created the whole site backup, but we cannot dig in to recover an item or a subsite. Did anyone had this problem before? (I gave farm admin levels to the account used by Backup Exec to double check the rights. That user could log on to the site and indeed he could go to all subsites and all item levels. So it is not access I believe). Any other expiriences with this tool? What about other tools? We are having a demo of AvePoint soon. Does anyone worked with that before? Thanks in advance for any help. Regards, GoncaloGonçalo

I have dual core machine i have hosted wcf service . At a time how many requests my server will exec

  
I have dual core machine i have hosted wcf service . At a time how many requests my server will execute how to find that count.

EXEC 17P_Comose will give incorrect syntax error. Because of numeric name

  
I am working with a sql server database with about 50 stored procedures. The database and stored procedureswere not created by me. The stored procedures all begin with a number in their name. Example: 17P_Comsetter The problem I am having is that if I try and execute the stored procedure at the command line in Query Analyzer,the query analyzer appears not to like that the stored procedure begins with a number. For example: If I try an run the stored procedure as follows: EXEC 17P_Comsetter Then I get the following error message:Msg 102, ..... Incorrect Syntax near '17' If I rename the stored procedure so that it does not begin with a number, then I do not get the error. The problemis that the company I am working at has a policy in place that stored procs must begin with a number.I am using SQL server 2005. Does anyone know why I am getting this error message?

How to check if ADO recordset object populated by SQL Exec task

  

Hey all,

 

Is there a function I can use in the precedence constraint editor to check if a Exec SQL task populated an ADO recordset object?

 

Basically I have a select a,b,c from metadata_table where key = param and enabled = 1 and the output gets saved as an recordset object

I want the constraint to check that the object was populated before continuing and error out if not (the package should never execute with 0 rows being returned)

i've tried using 

!isnull(User::ListOfFiles) and Len(User::ListOfFiles)>0 but both return true even when 0 rows are returned

I'd rather not add a @@rowcount output parameter to the Exec SQL task

Does the object have any methods I can use in the expression bit of the constraint editor that'll check if it has any rows? Or are there any Count-like functions that'll work on it? I'm not much of a .net coder so can't think of anything else

 

edit: nvm I just realised I need to use a script task to set the error message anyway so I can load the object there and do a Rows.Count


(INSERT EXEC statement cannot be nested.) and (Cannot use the ROLLBACK statement within an INSERT-EX

  

hi all
i have a very important issue,

read this scenario please

i have three Stored Procedures Sp1,Sp2 and Sp3 .

the first one (Sp1) will execute the second one (Sp2) and save returned data into @tempTB1 and the Second one will execute the third one (Sp3) and save data into @tempTB2.

if I execute the Sp2 it will works and it will returned me all my data from the Sp3 ,but the problem is in the Sp1, when i execute it it will display this Error:

INSERT EXEC statement cannot be nested


I tried to change the place of execute Sp2 and it display me another error:

Cannot use the ROLLBACK statement within an INSERT-EXEC statement.



How to exec Code behind function in javascript

  

I had a custom confirm box Using Jquery....In that It crates two buttons Yes and No.

I need to execute my code in Yes click.....how?????


Backup Exec 2010 -MOSS 07 GRT Restore troubles

  
I was just curious if anyone else had trouble restoring documents from Backup Exec 2010 SP1 ?  I'm at a client and whenever they try to restore a document library to their portal, only the folder is restored and none of the contents. Re-directed restores to file shares work fine.  Symantec support says to upgrade to R2 to fix it, but that this is not a 'known issue'.  Funny, because they didn't troubleshoot long and had a quick fix ready to manually re-link the document to the site!!  Seems a little shady. I'm just wondering if this client has a unique issue or if anyone else out there has experienced this problem as well?  I'd like to warn our other clients with the MOSS 2007/ BUE 2010 combo if this is common. 

exec sqlcmd and bat files in a single bat fiel . How can I do it?

  

Hi all

I cannot seem to work out how to put it together I get all sorts of errors

 I would like to create a single bat file that execute 3 bat files and runs 10 sql scripts.

Any examples? help thanks a lot


Thanks for your help

INSERT INTO table From EXEC -

  
Hello,

How can I insert values from a query directly to a table in my database?
the query gets values from a linked server and i want to directly insert the results in my local database. This is how i thought would be done:

CREATE PROCEDURE dbo.SP_INSERTfromEXEC
AS
BEGIN
    INSERT INTO dbo.mytable
    EXEC dbo.QuerytoLinkedServer
END

When i execute dboSP_INSERTfromEXEC procedure, then i get this error:
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "blahblah" was unable to begin a distributed transaction.

Now, when I execute dbo.QuerytoLinkedServer procedure, i do get the values, there is no error. It just doesn't want to insert it I suppose.

Any help would be greatly appreciated!

EXEC(NULL) - Differing Behavior in SQL 2000 and SQL 2008

  

I'm working on converting a datbase currently in SQL 2000 over to SQL 2008 and found this peculiarity:

DECLARE @sql varchar(1)
SET @sql = NULL

EXEC(@sql)
SELECT @@ROWCOUNT

On my SQL 2000 machine that code returns 0, but on my test box running SQL 2008 it returns 1 no matter the compatibility level of the database (80 or 100).  Is there a global setting / flag that might affect this behavior?  Or is it just a design difference in the two engines?

I haven't turned up anything when searching elsewhere, hoping someone can shed some light.


Report Builder button missing - exec rep defs ticked & rep build ticked

  
I can see report builder in IE (I am report admin), but my users are not able to, despite having ticked 'report builder' against their name in folder security.

They have
Browser, Report Builder

Why can't they see it?


"Site Settings - Security - Config sys wide role defs - sys user " has "execute report defs" ticked.


Anyone, hmm?


EXEC(NULL) - Differing Behavior in SQL 2000 and SQL 2008

  

I'm working on converting a datbase currently in SQL 2000 over to SQL 2008 and found this peculiarity:

DECLARE @sql varchar(1)
SET @sql = NULL

EXEC(@sql)
SELECT @@ROWCOUNT

On my SQL 2000 machine that code returns 0, but on my test box running SQL 2008 it returns 1 no matter the compatibility level of the database (80 or 100).  Is there a global setting / flag that might affect this behavior?  Or is it just a design difference in the two engines?

I haven't turned up anything when searching elsewhere, hoping someone can shed some light.


SQL 2005 cache Exec sp_OAMethod???

  

Hello,

I don´t know if it is possible to prevent SQL server 2005 from writing a query or a command to the cache!

I´m writing a procedure witch witch will get the unpaid invoices and send them by SMS to the customers mobile.

while writing the procedure SQL buffers the URL witch I´m sending to the webbservice that means that I´m geting every time the same result from the sebbservice if the URL is not changing.

Is there any ideas how to go arround the problem I´m wring the procedure in a production envirement?

Exec

 

sp_OAMethod @Object, 'open', NU

Looping through a table to run the exec command

  

Hi,

I'm a novice in writing SQL-code. Last time I did it was about 10 years ago, but now I've run into a situation where I need to get a quick refresh. What I basically want to do is an automated export from each table that contains data in each database to CSV-files, except the system databases, and store it in a directory structure.

We have started version handling some of the data in our databases, and to make it easier for the developers to know which data is versioned we've decided to setup a database with only that data, and then export it after every change to files.

 

So far, this is what I have:

select 'exec master..xp_cmdshell'
    + ' '''
    + 'bcp'
    + ' ' + TABLE_CATALOG + '.' + TABLE_SCHEMA + '.' + TABLE_NAME
    + ' out'
    + ' c:\Temp\'
    + TABLE_CATALOG + '.' + TABLE_SCHEMA + '.' + TABLE_NAME + '.csv'
    + ' -c -t; -T -S' + @@servername
    + ''''
from INFORMATION_SCHEMA.TABLES
where TABLE_TYPE = 'BASE TABLE'

 

This gives me a list of exec-commands for each table in a database. What I need to add, that I don't kno

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend