Click here to Skip to main content
15,896,063 members
Home / Discussions / Database
   

Database

 
QuestionDetecting a broken connection in SQL-ADO Pin
Ben_Slater15-Apr-08 10:46
Ben_Slater15-Apr-08 10:46 
GeneralRe: Detecting a broken connection in SQL-ADO Pin
SimulationofSai16-Apr-08 1:29
SimulationofSai16-Apr-08 1:29 
QuestionRe: Detecting a broken connection in SQL-ADO Pin
Ben_Slater16-Apr-08 5:08
Ben_Slater16-Apr-08 5:08 
QuestionHow to access a table in sql2005 database from stored procedure in another database Pin
Shaimmaa15-Apr-08 8:31
Shaimmaa15-Apr-08 8:31 
GeneralRe: How to access a table in sql2005 database from stored procedure in another database Pin
Sankar Komma 15-Apr-08 10:12
Sankar Komma 15-Apr-08 10:12 
GeneralRe: How to access a table in sql2005 database from stored procedure in another database Pin
Mycroft Holmes15-Apr-08 22:26
professionalMycroft Holmes15-Apr-08 22:26 
Generaltransaction log in sql server 2000 Pin
sohne15-Apr-08 7:34
sohne15-Apr-08 7:34 
GeneralRe: transaction log in sql server 2000 Pin
Mark J. Miller15-Apr-08 12:02
Mark J. Miller15-Apr-08 12:02 
I'm assuming you aren't backing up your transaction log at all. If that is the case then change the recovery model of your database to Simple. Then detach your database, delete the transaction log file and re-attach your database. A new log file will be created for you.

To set your recovery model to simple use:

ALTER DATABASE [databasename] SET RECOVERY SIMPLE

Do NOT do this while users are logged in. Wait for a time when there is no activity on your database. If you don't have a maintenance window which allows you to do this you will need to truncate your log and then shrink it.

To shrink your transaction log file, first get the logical name of your transaction log by running sp_helpdb 'your database name'. There will be 2 resultsets, the second one will have a column "name", for the row that refers to your log file, that is the logical name.

Then you can run the following script:

<br />
BACKUP LOG [Database Name] WITH TRUNCATE_ONLY<br />
GO<br />
<br />
DBCC SHRINKFILE([LOGICAL FILE NAME], [SIZE]) <br />
GO<br />


where [size] is an integer value in megabytes.

Again, this is only if you are not using your transaction log. The commands will be different if you need to backup your log file. Refer to BOL.

Mark's blog: developMENTALmadness.blogspot.com

Funniest variable name:
lLongDong - spotted in legacy code, was used to determine how long a beep should be.
- Dave Bacher

GeneralRe: transaction log in sql server 2000 Pin
sohne15-Apr-08 12:29
sohne15-Apr-08 12:29 
GeneralRe: transaction log in sql server 2000 Pin
GuyThiebaut16-Apr-08 1:09
professionalGuyThiebaut16-Apr-08 1:09 
GeneralImporting Excell to SQL Pin
Daniel_Logan15-Apr-08 2:57
Daniel_Logan15-Apr-08 2:57 
GeneralRe: Importing Excell to SQL Pin
DerekFL15-Apr-08 4:44
DerekFL15-Apr-08 4:44 
GeneralRe: Importing Excell to SQL Pin
Daniel_Logan16-Apr-08 23:56
Daniel_Logan16-Apr-08 23:56 
Generalwhere case statement Pin
markymark8215-Apr-08 0:57
markymark8215-Apr-08 0:57 
GeneralRe: where case statement Pin
Ashfield15-Apr-08 1:22
Ashfield15-Apr-08 1:22 
GeneralRe: where case statement Pin
markymark8215-Apr-08 1:30
markymark8215-Apr-08 1:30 
GeneralRe: where case statement Pin
Ashfield15-Apr-08 1:33
Ashfield15-Apr-08 1:33 
GeneralOuter join in sql2000 Pin
ramyasangeet14-Apr-08 20:45
ramyasangeet14-Apr-08 20:45 
GeneralRe: Outer join in sql2000 Pin
SomeGuyThatIsMe15-Apr-08 3:01
SomeGuyThatIsMe15-Apr-08 3:01 
GeneralRe: Outer join in sql2000 Pin
Ashfield15-Apr-08 3:20
Ashfield15-Apr-08 3:20 
QuestionDatabase Connection Pin
savitri14-Apr-08 20:28
savitri14-Apr-08 20:28 
GeneralRe: Database Connection Pin
Adeel Chaudhry21-Apr-08 23:28
Adeel Chaudhry21-Apr-08 23:28 
GeneralDelete can be rolled back Pin
.NET- India 14-Apr-08 20:11
.NET- India 14-Apr-08 20:11 
GeneralRe: Delete can be rolled back Pin
Ashfield14-Apr-08 21:47
Ashfield14-Apr-08 21:47 
GeneralSQL Server Stored Procedure Encryption Pin
Syed Mujtaba Hassan14-Apr-08 18:58
Syed Mujtaba Hassan14-Apr-08 18:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.