ProgrammingMSAccess.com

Learn about Developers Group
Join Developers Group
Order SPAM Blocker
Free Stuff
Guest Book
.NET Resources
SQL Server Resources
Favorites
Technical Support
Books & DVDs by Webmaster
Articles, tutorials, & more
FAQs
Product Reviews
Samples
Prior Newsletters
Contact Us
Home
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A Transact-sql script FOR sql server 2005 creates a certificate, uses the certificate as the basis for a new login, displays information about the login, and finally drops both the certificate and the login.

 

USE name_of_your_database

CREATE CERTIFICATE spDemo
WITH SUBJECT = 'CAB INC',
ENCRYPTION_PASSWORD = 'r1d2o3b4s5o6n7',
EXPIRY_DATE = '10/31/2006';

CREATE LOGIN Rick FROM CERTIFICATE spDemo

EXEC sp_helplogins 'Rick'

DROP CERTIFICATE spDemo

DROP LOGIN Rick

 

Want to understand  SQL Server so that you can program it to do more tasks like this?  Get Programming Microsoft SQL Server 2000 with Microsoft Visual Basic .NET by Rick Dobson from Microsoft Press.  Learn more about the book by clicking here.

Copyright 2004 CAB, Inc. All rights reserved. Republication or redistribution of CAB, Inc. content, including by framing or similar means, is expressly prohibited without the prior written consent of CAB, Inc. CAB, Inc. shall not be liable for any errors in the content, or for any actions taken in reliance thereon.