decrypt sql server 2005 sp

  • Are you going to share the URL?

    Here is the $19.99 commercial version someone says it works. I have my own SP.

    http://www.imperia.com.br/index.aspx?GODirect=true&UserControl=%7e%2fModules%2fsqldecryptor.ascx&PanelType=2

    Jason
    http://dbace.us
    πŸ˜›

  • You can find an algorithm that works in the August 2007 issue of SQL Server Magazine. There's not a need to purchase anything (except maybe access to the SQLMag.com site).

    K. Brian Kelley
    @kbriankelley

  • I have to admit that I never understood why anyone would use the option to encrypt the procedure’s or view’s code. If you want to decrypt it, you can find scripts on the net that do it for you, so there is no benefit from encrypting it. On the other hand if you need to modify or debug an encrypted code, it just adds extra work for the DBA/Programmer, so my question is – why bother with this encryption?

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • ok, now i'm trying to do a proof of concept.

    i created this encrypted stored procedure:

    --for users who are too lazy to type "SELECT * FROM"

    CREATE procedure sp_show

    --USAGE: sp_show yourtablename

    @TblName varchar(128)

    --because this query is clearly so important it needs to be encrypted

    WITH ENCRYPTION

    As

    Begin

    exec('Select * from ' + @TblName)

    End

    I went to the Surface Area Configuration for SQL 2005 and made sure to enable the DAC

    I stopped and started the server, made sur ethe DAC checkbox was still enabled...i probably did not need to do that, but I did.

    Then, reading the script i downloaded from SQL Server Magazine that Brian Kelley suggested, I'm trying to connect via the DAC;

    i thought the syntax was as show here:

    but i can't connect.

    If i try to run the script, i get this error:

    Msg 208, Level 16, State 1, Line 105

    Invalid object name 'sys.sysobjvalues'.

    is that table in an Sp i don't have installed? i'm at SP2

    here's my @@version

    Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition with Advanced Services on Windows NT 5.1 (Build 2600: Service Pack 2)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Lowell (8/25/2009)


    Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition with Advanced Services on Windows NT 5.1 (Build 2600: Service Pack 2)

    That's because you're using SQL Server Express. You must enable trace flag 7806. Otherwise, DAC is not enabled on SQL Server Express.

    Trace Flags

    K. Brian Kelley
    @kbriankelley

  • hmmm sticll can't connect;

    am i typing ADMIN:SQLINSTANCE in SSMS, or maybe it's supposed to be someplace else?

    i ran this command:

    DBCC TRACEON (7806,-1)

    which should turn on DAC in SQL Express, just as you stated;

    tried the same connection as shown in my screenshot, and of course the password is correct.

    i still get this error:

    TITLE: Connect to Database Engine

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

    Cannot connect to ADMIN:D223\SQLEXPRESS.

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

    ADDITIONAL INFORMATION:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 43 - An error occurred while obtaining the dedicated administrator connection (DAC) port. Make sure that SQL Browser is running, or check the error log for the port number) (Microsoft SQL Server, Error: -1)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

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

    BUTTONS:

    OK

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

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • I'm assuming you checked to verify SQL Browser was running. If it is, check the error log to see what port it says it is starting DAC up on. Then check the OS using netstat -ano | findstr /i :*port* to see if something is listening. If so, match the PIDs up to make sure it's SQL Server. If all that holds true, try and make the connection via ADMIN:server,port.

    K. Brian Kelley
    @kbriankelley

  • Are you going to post URL? or Are you going to be the guy just take without give?

    Sqlfarms has nothing.

    Search Google with "DAC connection to decrypt SP" to get one.:cool:

    Jason
    http://dbace.us
    πŸ˜›

  • For those still asking, try the sqlfarms website. There is a script there to download. In order to download you must be a member of the site.

    SQLFarm Site

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Email me, I got one working for me. I can send to you or post here. It seems people advise not to post here for whatever reason. Since it can be found on the web, I don't see their point at all.:-D

    By the way, forget SQLExpres. DAC will not work for SQLExpress by design.

    jswong05@earthlink.net:hehe:

    Scientists have done the following significant research.

    They put five monkeys in a cage and allow them to reach a string of bananas. The monkey who reaches out to grab banana will trigger electrical shocks to the entire group of monkeys. Soon, all five monkeys are not touching the bananas no matter how delicious they look because they have learned the lessons.

    One day, the scientist replaces one of the monkeys with a new monkey A. This new monkey A is tempted to grab the bananas, but the other four monkeys know the electrical shock, they beat hell out of this new monkey A. Soon, the new monkey A learned not to touch the bananas at all.

    Then the scientist replaces another monkey with a new monkey B, as expected, the new monkey B is tempted to grab the bananas, it also got beat to hell by the four other monkeys, specially by monkey A. Monkey B soon learned not to touch bananas as well.

    One by one, the scientist replaces all original five monkeys. None of the monkeys are touching the bananas and none of them know why.

    The moral of the story - A new tradition is born.

    Jason
    http://dbace.us
    πŸ˜›

  • jswong05 (8/27/2009)


    By the way, forget SQLExpres. DAC will not work for SQLExpress by design.

    DAC does work with SQL Server Express. DAC is disabled by design. While DAC consumes a minimal amount of resources, it still consumes some. Since SQL Express is supposed to be as light as possible, DAC starts disabled to conserve those resources. If you need DAC, use the trace flag.

    K. Brian Kelley
    @kbriankelley

  • For those who talk the talk, my $9.99 contribution to fellow monkey, this is what I use. Works great.

    http://groups.google.com/group/microsoft.public.sqlserver.security/msg/ec89a9e4fe0477d2?pli=1

    Thanks for sharing.

    Jason
    http://dbace.us
    πŸ˜›

  • I don't see why people got SQLExpress free and struggle to get it do something. Developer version is only $50. If you want a free database, you should use freeware, not Microsoft product. Don't you think Microsoft gave you free SQLExpress for a reason, besides it is missing major features.:w00t:;-)

    You cann't be DBA for SQLExpress, kidding me. If you inherit a job from 5 monkies, you should ask all questions before you take that job.:-P:-D

    Jason
    http://dbace.us
    πŸ˜›

  • jswong05 (8/27/2009)


    I don't see why people got SQLExpress free and struggle to get it do something. Developer version is only $50. If you want a free database, you should use freeware, not Microsoft product. Don't you think Microsoft gave you free SQLExpress for a reason, besides it is missing major features.:w00t:;-)

    You cann't be DBA for SQLExpress, kidding me. If you inherit a job from 5 monkies, you should ask all questions before you take that job.:-P:-D

    1) Because SQL Server Express is more lightweight than Developer Edition.

    2) Because some products, like Outlook with the business extensions automatically instally SQL Server Express. This includes Visual Studio, though you can choose not to install it.

    3) Because there are products built on SQL Server Express and it's slightly different than a regular install of SQL Server, so knowing how to support it can be an asset.

    K. Brian Kelley
    @kbriankelley

  • 1) Because SQL Server Express is more lightweight than Developer Edition.

    2) Because some products, like Outlook with the business extensions automatically instally SQL Server Express. This includes Visual Studio, though you can choose not to install it.

    3) Because there are products built on SQL Server Express and it's slightly different than a regular install of SQL Server, so knowing how to support it can be an asset.

    Spend $49.95 to get a developer edition that is same as enterprise edition (if you don't have), you can be a real DBA, and paid like one.

    Jason
    http://dbace.us
    πŸ˜›

Viewing 15 posts - 16 through 30 (of 30 total)

You must be logged in to reply to this topic. Login to reply