?
Solved

Using SQL-DMO to change login password and shrink database

Posted on 2002-07-03
3
Medium Priority
?
286 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 300 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

762 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