Solved

Using SQL-DMO to change login password and shrink database

Posted on 2002-07-03
3
284 Views
Last Modified: 2010-05-18
I am moving an app from Access to MSDE and have created a utility to backup and restore sql database using DM0 in VB6. I would also like to include functionality to change the login password and to shrink the database. Can anyone provide some code for these functions? Thanks.
0
Comment
Question by:quicdoc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Accepted Solution

by:
curtis591 earned 100 total points
ID: 7127061
I got these examples from the BOL.

This example changes the password for the login Victoria to ok.

EXEC sp_password NULL, 'ok', 'Victoria'

This example decreases the size of the files in the UserDB user database to allow 10 percent free space in the files of UserDB.

DBCC SHRINKDATABASE (UserDB, 10)

0
 

Author Comment

by:quicdoc
ID: 7127269
I am looking for some sample code to use with DMO but thanks anyway
0
 

Expert Comment

by:CleanupPing
ID: 9280203
quicdoc:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question