Monday, April 9, 2007

Example of Sql Server 2005 Symmetric Encription Using DESX algorithm

Run Below Query in Your Sql Server 2005 Query Analyzer



USE master;



--CREATE SYMMETRIC KEY SecureSymmetricKey

--        WITH ALGORITHM = DESX

--        ENCRYPTION BY PASSWORD = N'StrongPassword';



--SELECT * FROM sys.symmetric_keys;



OPEN SYMMETRIC KEY SecureSymmetricKey

    DECRYPTION BY PASSWORD = N'StrongPassword';





-- declare and set varible @str to store plaintext

DECLARE  @str NVARCHAR(100)

SET @str = N'Hello World';



-- declare and set varible @encrypted_str to store

-- ciphertext

DECLARE @encrypted_str VARBINARY(MAX)

SET @encrypted_str =

          EncryptByKey(Key_GUID('SecureSymmetricKey'), @str);





-- display ciphertext

SELECT @encrypted_str AS CipherText;



-- declare and set varible @decrypted_str to store

-- decrypted ciphertext

DECLARE @decrypted_str VARBINARY(MAX)

SET @decrypted_str = DecryptByKey(@encrypted_str);



-- display decrypted text

SELECT CONVERT(NVARCHAR(100), @decrypted_str) AS PlainText;



-- close and drop the key

CLOSE SYMMETRIC KEY SecureSymmetricKey;

--DROP SYMMETRIC KEY SecureSymmetricKey;






Powered by ScribeFire.

Friday, April 6, 2007

How to Access Sql Server 2005 Remotely

If enabled, the default instance of the Microsoft SQL Server Database Engine

listens on TCP port 1433. Named instances of the SQL Server Database Engine and

SQL Server Mobile are configured for dynamic ports, which means they select an

available port when the SQL Server service is started. When connecting to a

named instance through a firewall, configure the Database Engine to listen on a

specific port, so that the appropriate port can be opened in the firewall.

To

assign a TCP/IP port number to the SQL Server Database Engine

  1. In SQL Server Configuration Manager, in the console pane, expand

    SQL Server 2005 Network Configuration, expand Protocols for

    , and then double-click TCP/IP.





  2. In the TCP/IP Properties dialog box, on the IP Addresses tab,

    several IP addresses appear, in the format IP1, IP2, up to

    IPAll. One of these are for the IP address of the loopback adapter,

    127.0.0.1. Additional IP addresses appear for each IP Address on the computer.

    Right-click each address, and then click Properties to identify the IP

    address that you wish to configure.





  3. If the TCP Dynamic Ports dialog box contains 0,

    indicating the Database Engine is listening on dynamic ports, delete the

    0.





  4. In the IPn Properties area box, in the TCP

    Port
    box, type the port number you wish this IP address to listen on, and

    then click OK.





  5. In the console pane, click SQL Server 2005

    Services
    .





  6. In the details pane, right-click SQL Server (

    name>) and then click restart, to stop and restart SQL

    Server.



After you have configured SQL Server to listen on a specific port

there are three ways to connect to a specific port with a client

application:



  • Run the SQL Server Browser service on the server to connect to the Database

    Engine instance by name.





  • Create an alias on the client, specifying the port number.





  • Program the client to connect using a custom connection string.



Powered by ScribeFire.

Monday, April 2, 2007

Webpages to compete for keyword "Shopping"

Symbol Definition
BLD Backlinks to the domain in Yahoo.
BLP Backlinks to the webpage in Yahoo.
PRD Pages Rank of domain.
PRP Pages Rank of webpage.
Count Keyword/Keyphrase occurrences on webpage.
Pages Pages indexed of domain in Yahoo.
Anchor All in Anchor Rank of domain in Google.
Title All in Title Rank of domain in Google.
Text All in Text Rank of domain in Google.
NA Result is not available
- Not Found
No. Address BLD BLP PRD PRP Count Pages Anchor Title Text
1 www.shopping.com 7860000 - 8 - 122 22300000 1 1 1
2 shopping.yahoo.com 7210000 - 8 - 188 161000000 2 2 3
3 www.bizrate.com 11000000 - 8 - 6 13400000 3 3 5
4 dmoz.org 7770000 31800 8 7 61 3160000 4 4 7
5 froogle.google.com 23400000 - 8 - 3 133000 5 99 9
6 shopping.msn.com 2990000 - 8 - 113 2890000 6 6 11
7 www.google.com 161000000 474 10 7 16 3090000 9 9 13
8 www.startribune.com 710000 44400 7 7 318 104000 10 10 15
9 dir.yahoo.com 42800000 1120 8 6 24 14700000 11 11 -
10 www.nwsource.com 1600000 252000 8 7 108 22700 12 12 16
11 www.qvc.com 91600 - 6 - 15 125000 13 - -
12 www.chicagotribune.com 1620000 20400 8 7 76 711000 14 13 18
13 www.chicagotribune.com 1620000 32300 8 6 76 711000 14 13 18
14 www.sacbee.com 553000 33800 7 7 66 209000 16 15 -
15 www.sacbee.com 553000 4620 7 7 66 209000 16 15 -
16 shopping.rediff.com 584000 - 6 - 2 40300 17 - -
17 www.shopping.indiatimes.com 3580 - 0 - 83 1620 18 - -
18 www.nwsource.com 1600000 235000 8 6 108 22700 12 12 16
19 www.pricegrabber.com 1980000 - 8 - 5 26200000 23 19 21
20 shopping.tbo.com 125000 - 6 - 43 15 20 17 -