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


Post New Web Links

Decrypt the encrypted store procedure through the T-SQL programming in SQL Server 2005

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :Sql Server
 

HI ,

 

I have a encrypted store procedure in my production server .Right now I do not have the script now I want do some modification.

Please any one can help me to decrypt the store procedure it will be a great help for me.

 

For any suggestion thanks  in advance.


" Education is the beginning of transformation. Dedicate yourself to daily learning via Blogs/Forums/books and coaching "
Click here to read my blog



View Complete Post


More Related Resource Links

SQL Server 2005 store procedure performance issue

  

We are calling store procedure from vb.net client following are the observation.

1) sqlserver 2005  takes huge amount of time (more than 1 hour) to execute procedure. The procedure has select statement using join statement. (Generally this procedure executes and populate data in 5 seconds when it is called from .net client.)

2) If same procedure is executed from sql server management studio, procedure executes and populate data in 5 seconds (works as per expectation)

3) If we recompile procedure (i.e. open procedure in alter mode in management studio and click on execute button) ,  the procedure executes and populate data as per expectation.

4) This is intermittent issue on production machine. Most of the time procedure is executed and populate data as per expectation when called from vb.net client. But it does not give expected outout in some scenario. The frequency for occurring the issue is  once in 15 days and there is no pattern in which the issue is occurring.

 

Can any one help to resolve the issue.

 

Thanks in advance!!!

 

 

 


Store Null Data In image datatype in sql server 2005

  

hi

i wanted to store image in sqlserver database image field and i did. But now in some cases i want to store null value in that image field please let me know how to do this using file uploader.please give complete sample code.


regards


How can i decrypt an encrypted stored procedure?

  
hi there,i'm having a problem on how to decrypt an encrypted stored procedure on SQL Server 2008i've tried asking my workmates but they mentioned that they're forgotten the basic syntax to decryptmost of the query i can find are for sql server 2005.. are they usable to sql server 2008?i found this but it doesn't seem to helpCreate Procedure Decryptsp2K (@objName varchar(50)) AS -- INPUT: object name (stored procedure, view or trigger) DECLARE @a nvarchar(4000), @b nvarchar(4000), @c nvarchar(4000), @d nvarchar(4000), @i int, @t bigint --get encrypted data SET @a=(SELECT ctext FROM syscomments WHERE id = object_id(@objName)) SET @b='ALTER PROCEDURE '+ @objName +' WITH ENCRYPTION AS '+REPLICATE('-', 4000-62) EXECUTE (@b) --get encrypted bogus SP SET @c=(SELECT ctext FROM syscomments WHERE id = object_id(@objName)) SET @b='CREATE PROCEDURE '+ @objName +' WITH ENCRYPTION AS '+REPLICATE('-', 4000-62) --start counter SET @i=1 --fill temporary variable SET @d = replicate(N'A', (datalength(@a) / 2)) --loop WHILE @i<=datalength(@a)/2 BEGIN --xor original+bogus+bogus encrypted SET @d = stuff(@d, @i, 1, NCHAR(UNICODE(substring(@a, @i, 1)) ^ (UNICODE(substring(@b, @i, 1)) ^ UNICODE(substring(@c, @i, 1))))) SET @i=@i+1 END --drop original SP EXECUTE ('drop PROCEDURE '+ @objName) --remove encryption --try to p

in need of sql 2005 e-book on store procedure

  
i need e-book on sql 2005 express on STORE PROCEDURE TUTORIAL including how to use IF AND ELSE STATEMENT in SQL

SQL Server 2005 - Specifying Optional Parameter in Stored Procedure

  
I need to alter the following stored procedure so that the UserID is an optional parameter. I have, as yet, been unsuccessful. Basically, if the user doesn't supply a User ID, I want to return all of the users that match the other criteria.

This seems like it should be a simple thing.......

ALTER PROCEDURE [QMS].[GetQueries]

@CompanyID tinyint

,@DepartmentID tinyint

,@ApplicationID int

,@UserID AS



SELECT [QueryID]

,[UserID]

,[QueryName]

,[Comments]

,[CreateDate]

,[UpdateDate]

,[ExpirationDate]

,[LastAccessedDate]

FROM [ReportQueries]

WHERE

[UserID] = @UserID

how to create stored procedure in sql server 2005 and how to use that stored procedure in asp.net

  

Hi friends ,

       I am very newbie

I have created stored procedure and student database and also asp.net application for asp.net page

but it could not found stored procedure what is the mistake actually I don't no

Please help me



Warm Regards

Durga


CRUD Stored Procedure Code/Scripts Generator for SQL SERVER 2005

  

I need a simple anf functionally CRUD Stored Procedure Code/Scripts Generator.

Anyone have a solution?

Thanks in Advance.


How to Decrypt value in SQL Server 2005

  

Hi...i have read some related posts , but i almost know nothing about SQL so i can't understand what i have to do. 

I'm doing a very very important assignment (i graduate university with this one) and i need to find a password so i can log in a script (which is connecting to sql server)

In SQL server i can see all the usernames , but the passwords are encrypted. Could anyone of you decrypt one of them so i can log in? I repeat it's nothing illegal or dangerous, it's 100% for my assignment and i need to do it this week or ... i won't graduate.

The password is encrypted as 098F6BCD4621D373CADE4E832627B4F6 . Please help me...

 

Sorry for my poor english, i'm from Greece so it's not my first language... Thank you!


how to store query string in sql server 2005

  

Hi all,

 

how to store query string in sql server 20005 


SQL Server 2005 Grant User Permission to Create Stored Procedure and Grant Execute Access to another

  

I'm trying to determine the minimal amount of access I can give my developers to be able to run create stored procedure scripts with an inclusion of the grant execute to the application user group.

We have been developing some interesting work arounds, but I think there must be an easier way to grant the access.

Grant Create Stored Procedure to user1 on a specific database

Grant Permission to Grant Execute permission for Stored Procedures on a specific Database to user1 for any user.

 


Store Procedure conversion to sql server 2000

  

Hi all,

this my sp for sql server 2005. this query wont work on sql server 2000 because it doesnt support the XML

nw i want to convert this to sql server 2000 compatible

plz help me out guys....itz on deadline

my boss will kill me Cry

thanks in advance


set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO


ALTER procedure [dbo].[spIncometaxInformation]
--    @amount int,
    @fromdate datetime,
    @todate datetime,
    @Fromamount int,
    @ToAmount int,
    @Opertype char,
    @SROLogin varchar(max)


------------------------------------------------------------------------------
-- SP Name:= spIncometaxInformation
-- Created By:= Desai Madam
-- Modified By := Kiran Ghadge
-- Modifiaction Reason:= For calculating IT based on optios
------------------------------------------------------------------------------
AS
BEGIN

declare @SRO int

print @SROLogin

select @SRO= srocode
from sromaster
where ShortNameE=@SROLogin

print @SRO

SQL Server 2005 - How to Call One Store Proc from Other Store Proc ?

  

Hi ,

I have a Requirment, How can I called One Store Procedure from Other Store Procedure ?

After Calling to Other Store Proc, How can i Store that other Store Proc Result Sets in the Temp Table, So i can process in the Current Store Proc Result Sets ?

 

Thanks.


SQL Server 2005 Transactional Replication Fails to Publish Stored Procedure Containing an Index Crea

  

I've experienced a bizarre problem with a SQL Server 2005 Transactional Publication. The issue is this: If the publication contains an article that is a stored procedure that contains a create index statement, then there is an error thrown when attempting to replicate the schema of the stored procedure to a subscriber.

The behavior is very odd, because even if the create index statement is commented out, it still gives the exception, and it will only work if it is removed altogether.

Here is the exact error that's being returned:

Command attempted: GRANT EXECUTE ON [dbo].[usp_Test] TO [CompanyDatabase_access]

(Transaction sequence number: 0x00000170000008B9000500000000, Command ID: 5)

Error messages: Cannot find the object 'usp_Test', because it does not exist or you do not have permission. (Source: MSSQLServer, Error number: 15151) Get help: http://help/15151 Cannot find the object 'usp_Test', because it does not exist or you do not have permission. (Source: MSSQLServer, Error number: 15151) Get help: http://help/15151

The error is accurate, because when I check on the subscriber, the stored procedure wasn't created as expected... but that was the purpose of the publication...

Calling stored procedure from funciton in sql server 2005

  

Is there any way to call stored procedure from funciton in sql server 2005?

If it is possible, please give some examples.

Thanks.

 


RAHUL Dot Net Developer

The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a r

  

 

Hi every one,

 

I'm very new new at this.  I'm try to deploy a report model and got this message.  I have no idea what its going on about.

 

Can anyone help me?

 

Aku

 


------------------------------

System.Web.Services.Protocols.SoapException: The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled) ---> Microsoft.ReportingServices.Diagnostics.Utilities.RPCException: The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled) ---> System.Exception: The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled) ---> System.Exception: The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup ke

How use procedure combine tran in SQL server 2005

  

Hi , I have database :

create table Product
(
 IDproduct char(10) primary key not null,
 Nameproduct nvarchar(10) not null,
 Prices money not null,
 inventory int not null,
)
create table Employee
(
 IDemployee char(10) primary key not null,
 Nameemployee nvarchar(10) not null,
)
create table Customer
(
 IDcustomer char(10) primary key not 

How use procedure add in sql server 2005 ?

  

Hi . How use procedure add in sql server 2005 ?

create table Product
(
  IDproduct char(10) primary key not null,
  inventory int,
)
create table DetailBill
(
     IDproduct char(10) not null,
  foreign key(IDproduct) references Product(IDproduct)

  balance int,
)
create proc AdddetailBill (@idproduct char(10),@balance int)
as
  declare @number int
    set @number=(select inventory from product where idproduct=@idproduct)
    if @balance > @number
      begin
        print 'lack number of product'
        return 0
      end
    
    else
    begin
      update product
      set inventory=inventory - @balance
      where @idproduct=(select idproduct from product)
    
      insert detailbill(IDproduct,balance)values(@idproduct,@balance)
      print 'Add success'
      return 1
    end
Example :
In table Product :
ID product    Inventory
P001        15
P002        5

AdddetailBill  'P002',10,    => Print 'lack number of product''

AdddetailBill  'P002',2,      => Print  'Add success' 
=> Auto Update table product :
ID product    inventory
P001        15
P002    &n
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