🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #1812

Re: [REQ] per esperti sql e VB6

#1812
From: Francesco Quaratino
Date: Mon, 26 Jan 2004 10:27
86 lines
3397 bytes
E se non vuoi che il DB registri le transazioni nel file di Log, puoi
impostare a Simple il Recovery Model del database. In questo modo Sql Server
provveder� a eliminare le transazioni dal Transaction Log a transazione
ultimata, questo per� pregiudica le funzionalit� di recupero del database
attraverso il file di log.

"aspidetr" <aspidetr@aspidetr.com> ha scritto nel messaggio
news:yPtCb.186507$e6.6974255@twister2.libero.it...
>
> "only-offroad" <staff@only-offroad.com> ha scritto nel messaggio
> news:q_Fub.42490$9_.1669744@news1.tin.it...
> > -- Fante -- wrote:
> > > Ciao,
> > >     a quanto pare � una domanda difficile la mia perch� finora nessuno
> mi ha
> > > dato la "dritta" giusta:
> > >
> > > Quanto cancello un record da un database sql le sue dimensioni invece
di
> > > diminuire aumentano di poco (qualche kb) per� sono gi� a 150 MB com'�
> > > possibile?
> > > Esiste per caso una funzione del tipo Compatta db?
> > >
> > > Grazie Ricky
> > >
> >
> > Aumenta perch� un DB Relazionale tipo SQL Server ha un file di log, in
> > cui vengono registrate tutte le operazioni eseguite nel DB per un
> > eventuale ripristino.
> >
> > Esiste l'operazione di shrink del DB gestita dalla funzione:
> > object.Shrink( NewSize , Truncate )
> > Leggi sui Books Online di SQL Server tutte le spiegazioni.
> >
> > ciao, Max
> >
> >
>
>
> Function CompactAndRepairDatabase(DatabasePath As String, _
>
> Optional Password As String, _
>
> Optional TempFile As String = "c:\temp.mdb")
>
> If DBEngine.Version < "3.6" Then DBEngine.RepairDatabase DatabasePath
>
> 'if no temp file specified, use "c:\temp.mdb"
>
> If TempFile = "" Then TempFile = "c:\temp.mdb"
>
>
> 'delete temp file if it exists
>
> If Dir(TempFile) <> "" Then Kill TempFile
>
>
> 'format password in form of ";pwd=PASSWORD" if password exists
>
> If Password <> "" Then Password = ";pwd=" & Password
>
>
> 'compact db: a new db will be created
>
> DBEngine.CompactDatabase DatabasePath, TempFile, , , Password
>
>
> 'kill first db
>
> Kill DatabasePath
>
>
> 'move compacted db to original db's path
>
> FileCopy TempFile, DatabasePath
>
>
> 'delete temp file
>
> Kill TempFile
>
> End Function
>
>
>
>
Technical Details
Message-ID: <xY5Rb.278771$vO5.11372089@twister1.libero.it>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail
References: <bpf92r$fn$1@lacerta.tiscalinet.it> <q_Fub.42490$9_.1669744@news1.tin.it> <yPtCb.186507$e6.6974255@twister2.libero.it>

Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII
X-Google-Thread: f94ee,7ea3210c056692eb
X-Google-Attributes: gidf94ee,public
X-Google-ArrivalTime: 2004-01-26 02:27:42 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail
From: "Francesco Quaratino" <fquara@libero.it>
Newsgroups: free.it.visual-basic
References: <bpf92r$fn$1@lacerta.tiscalinet.it> <q_Fub.42490$9_.1669744@news1.tin.it> <yPtCb.186507$e6.6974255@twister2.libero.it>
Subject: Re: [REQ] per esperti sql e VB6
Lines: 88
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <xY5Rb.278771$vO5.11372089@twister1.libero.it>
Date: Mon, 26 Jan 2004 10:27:41 GMT
NNTP-Posting-Host: 151.38.7.202
X-Complaints-To: abuse@net24.it
X-Trace: twister1.libero.it 1075112861 151.38.7.202 (Mon, 26 Jan 2004 11:27:41 MET)
NNTP-Posting-Date: Mon, 26 Jan 2004 11:27:41 MET
Organization: [Infostrada]