littlemoon Posted September 13, 2012 Author Report Posted September 13, 2012 [quote name='ChampakDas' timestamp='1347569632' post='1302472070'] 15gb aa kada..why do you want to shrink the db? [/quote] 15gb log file.. 150GB data file...
littlemoon Posted September 13, 2012 Author Report Posted September 13, 2012 [quote name='Vaampire' timestamp='1347569563' post='1302472061'] USE XYZ GO exec sp_helpfile go BACKUP LOG XYZ WITH TRUNCATE_ONLY GO DBCC SHRINKFILE ('XYZ_log', 1) GO DBCC SHRINKFILE ('XYZ', 1) GO exec sp_helpfile go xyz is name of database [/quote] [color=#282828][font=helvetica, arial, sans-serif]truncate only ante does it delete even log file kada??[/font][/color]
Vaampire Posted September 13, 2012 Report Posted September 13, 2012 [quote name='littlemoon' timestamp='1347569824' post='1302472098'] [color=#282828][font=helvetica, arial, sans-serif]truncate only ante does it delete even log file kada??[/font][/color] [/quote] [color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)]DBCC SHRINKFILE ('XYZ_log', 1)[/background][/size][/font][/color] [color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)]the above statement will shrink the log file to 1kb.[/background][/size][/font][/color] [color=#282828][font=helvetica, arial, sans-serif][size=3][background=rgb(247, 247, 247)]naaku intha varakey telusu. not working in sql.[/background][/size][/font][/color]
chelsea Posted September 13, 2012 Report Posted September 13, 2012 Right click on database - task -- shrink -- Files --Filetype --Log ----- Click on OK using ssmo
charygaru Posted September 13, 2012 Report Posted September 13, 2012 [quote name='chelsea' timestamp='1347570300' post='1302472165'] Right click on database - task -- shrink -- Files --Filetype --Log ----- Click on OK using ssmo [/quote] recovery model "full" undemo check chesi "simple" ki pettukovaalemo lekapothe shrink kaadu anukunta gurthosthaledu
Vaampire Posted September 13, 2012 Report Posted September 13, 2012 [quote name='chelsea' timestamp='1347570300' post='1302472165'] Right click on database - task -- shrink -- Files --Filetype --Log ----- Click on OK using ssmo [/quote] nenu first alagey try chesa bhayya. kaledhu. wizzard kantey query better ani ekkado sadiva
gundugadu Posted September 13, 2012 Report Posted September 13, 2012 [quote name='charygaru' timestamp='1347570488' post='1302472191'] recovery model "full" undemo check chesi "simple" ki pettukovaalemo lekapothe shrink kaadu anukunta gurthosthaledu [/quote] thats correct recovery simple ki change chesthe you can save lots of space recent ga nenu edi chesa naaaa dev server lo space ayipoyi anni jobs fail ayyay. so recovery change chesanu full mode to simple and shrink chesanu, so it worked.
charygaru Posted September 13, 2012 Report Posted September 13, 2012 [quote name='gundugadu' timestamp='1347570683' post='1302472219'] thats correct recovery simple ki change chesthe you can save lots of space recent ga nenu edi chesa naaaa dev server lo space ayipoyi anni jobs fail ayyay. so recovery change chesanu full mode to simple. [/quote] migata times lo naaku telvadu kaani shrink chesetappudu matram simple chesukokapothe shrink avvadu anukunta. PS:-- naaku peddaga query vaade alavatu ledu raadu kuda
ravi87 Posted September 13, 2012 Report Posted September 13, 2012 1.take log backup thaggakapothe.. 2. Rebuild the log file.. -- its offline method ( DB offline ante ..malli permission adigi kottu ee command ) -- dbcc rebuild log command use chyeai 3. DB recovery model change cheyai.. if its full.... put in simple .... --- DB mari thopu database kakapothe.. final stage lo .. worest case lo .. this is not recommend but testing server ye kada.. serivces restart cheyai.. .. bongguladi.. log file size podipotadi.. but. permission thesuko mama. direct services restart cheyaku.. job 10 D***potadi....
Gachibowli_Diwakar Posted September 13, 2012 Report Posted September 13, 2012 data delete chesthe .. db size em decrease avvadhu .. unless DBA resizes data-files .. sometimes .. eventhough u did so much of clean-up . due to fragmentation, all the free-space cannot be reclaimed by resizing the data-files .. the objects inside the tablespace needs to be rebuilt .. to get over with fragmentation problem all I'm referring to Oracle .. migatha vati gurinchi no idea
littlemoon Posted September 14, 2012 Author Report Posted September 14, 2012 [quote name='charygaru' timestamp='1347570488' post='1302472191'] recovery model "full" undemo check chesi "simple" ki pettukovaalemo lekapothe shrink kaadu anukunta gurthosthaledu [/quote] [quote name='gundugadu' timestamp='1347570683' post='1302472219'] thats correct recovery simple ki change chesthe you can save lots of space recent ga nenu edi chesa naaaa dev server lo space ayipoyi anni jobs fail ayyay. so recovery change chesanu full mode to simple and shrink chesanu, so it worked. [/quote] recovery epudu first backup tiskune apuda?? shrink lo option emi ledhu ala recovery full or simple ani...
littlemoon Posted September 14, 2012 Author Report Posted September 14, 2012 [quote name='ravi87' timestamp='1347571300' post='1302472270'] 1.take log backup thaggakapothe.. 2. Rebuild the log file.. -- its offline method ( DB offline ante ..malli permission adigi kottu ee command ) -- dbcc rebuild log command use chyeai 3. DB recovery model change cheyai.. if its full.... put in simple .... --- DB mari thopu database kakapothe.. final stage lo .. worest case lo .. this is not recommend but testing server ye kada.. serivces restart cheyai.. .. bongguladi.. log file size podipotadi.. but. permission thesuko mama. direct services restart cheyaku.. job 10 D***potadi.... [/quote] ikada permission emi ledhu.. nene admin ni.. anyways thanks
littlemoon Posted September 14, 2012 Author Report Posted September 14, 2012 [quote name='Silence..Please' timestamp='1347572505' post='1302472377'] data delete chesthe .. db size em decrease avvadhu .. unless DBA resizes data-files .. sometimes .. eventhough u did so much of clean-up . due to fragmentation, all the free-space cannot be reclaimed by resizing the data-files .. the objects inside the tablespace needs to be rebuilt .. to get over with fragmentation problem all I'm referring to Oracle .. migatha vati gurinchi no idea [/quote] idhi sql server lo..
Gachibowli_Diwakar Posted September 14, 2012 Report Posted September 14, 2012 [quote name='littlemoon' timestamp='1347632031' post='1302475412'] idhi sql server lo.. [/quote] SQL Server lo kuda data-files(these are at physical level ) and Tablespaces untaay [color=#1E3D63][font=Verdana, sans-serif][size=1][background=rgb(243, 243, 243)] [/background][/size][/font][/color][img]http://lh6.ggpht.com/-xZXyeYxtAK8/UAHWoQ1fhgI/AAAAAAAAHGE/msEPCOlLfvE/s150/MS.gif[/img][color=#1E3D63][font=Verdana, sans-serif][size=1][background=rgb(243, 243, 243)] [/background][/size][/font][/color]
Recommended Posts