Solved

Using SQL-DMO to change login password and shrink database

Posted on 2002-07-03
3
283 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
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
OSQL to execute sql command 26 24
How to export SQL to firebase ? 7 67
TSQL convert date to string 4 34
SSMS Opening Mode 9 18
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…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
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…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

839 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