Solved

Using SQL-DMO to change login password and shrink database

Posted on 2002-07-03
3
274 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
3 Comments
 
LVL 6

Accepted Solution

by:
curtis591 earned 100 total points
Comment Utility
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
Comment Utility
I am looking for some sample code to use with DMO but thanks anyway
0
 

Expert Comment

by:CleanupPing
Comment Utility
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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Powershell SMO script not working. 18 97
Help with SQL Query 23 39
Distinct values from two tables 14 16
Azure SQL DB? 3 11
Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now