Issue
I have problem in size of database because the free space of the database is less than specific percentage of total space.
Cause
Users used to update in the database and that lead to increase used space of this database
Solution
I) Increase size of database by creating new data file and log file
ü First we need to know the sequence of the exiting data and log files of this database to specify the name new files
isql -U -P // used to access sql
1> sp_helpdb DBname
2> go
ü second we need to create the defined data file
1> disk init name =”name of new data file” , physname =”destination path/name of data file” ,size=” desired space M”
2> go
ü Third we need to create the defined log file
1> disk init name =”name of new log file” , physname =”destination path/name of data file” ,size=” desired space M”
2> go
II) Assign the created files to the database
ü First we will assign the data file
1> alter database DBname on datafile name = size (with override if data and log on the same device)
2> go
ü second we will assign the log file
1> alter database DBname log on datafile name = size (with override if data and log on the same device)
2> go
N.B words in the red color means that you have to enter instead of them your preferred value
Leave a Reply