If your Microsoft SQL database transaction log file is big in size and you want to truncate it then use the following methods :
Step 1:
Run This command in Query Window
backup log [DATABASE NAME] with truncate_only
(This will makes the oldest parts of the log file redundant, the size doesnt change at this point though)
Step 2:
dbcc shrinkfile([LOGICAL NAME OF LOG FILE IN DATABASE],X)
(X is the size in megabytes that you wish to shrink the size of the log file to)
EXAMPLE:
Assume you had a database called "xyz" .
You must have to know the exact location of your .MDF and .LDF files.
backup log XYZ with truncate_only
dbcc shrinkfile(XYZ_log,20)
This will create your .LDF file around 20MB.
I have check it and it works for me.
This blog is dedicated to all the scholar of web hosting. You will get all solution of your web hosting issue. If you have any query regarding web hosting then you can mail me whatishosting.com[at]gmail.com
Translate
Tuesday, July 20, 2010
Saturday, July 17, 2010
INDIAN RUPEE SYMBOL-UNLEASHED

The symbol for Indian Rupee is finalised.Many different countries has symbol for their currencies like US-'Dollar',France-'Euro',Japan-'yen' and many other.Indian government
The main aim for having symbol for Indian rupees was to give it an international recognisation to influence the economy of country at international level. Along with it the motto was also to differentiate the currency from RS which also used by the neighboring countries like Pakistan and Nepal.
Forward to all Indians
Wednesday, July 14, 2010
Sql Server 2005: Change schema for all tables
Sql Server 2005: Change schema for all tables
I recently needed to change the schema for all the tables in a Sql Server 2005 database.
Sql Server 2005 provides a T-SQl statement capable to change the schema for a given object called ALTER SCHEMA
You may use the following syntax to change the schema for all the tables in a database. Just change the "new_schema" string with the desired one:
exec sp_MSforeachtable "ALTER SCHEMA new_schema TRANSFER ? PRINT '? modified' "
Enjoy!
I recently needed to change the schema for all the tables in a Sql Server 2005 database.
Sql Server 2005 provides a T-SQl statement capable to change the schema for a given object called ALTER SCHEMA
You may use the following syntax to change the schema for all the tables in a database. Just change the "new_schema" string with the desired one:
exec sp_MSforeachtable "ALTER SCHEMA new_schema TRANSFER ? PRINT '? modified' "
Enjoy!
Sunday, July 11, 2010
Terminal server has exceeded maximum number of allowed connection – how to kill open sessions?
IF you are getting following error while trying to access remote your server:
Terminal server has exceeded maximum number of allowed connection.
Use following command:
mstsc /v:A.B.C.D /f -console
Where A.B.C.D is IP address of your server. I have checked it on 2003 and 2008, It Works perfectly.
Terminal server has exceeded maximum number of allowed connection.
Use following command:
mstsc /v:A.B.C.D /f -console
Where A.B.C.D is IP address of your server. I have checked it on 2003 and 2008, It Works perfectly.
Wednesday, July 7, 2010
Useful Plesk Commands
Plesk has various backend scripts to assist in correction any number of errors:
The most useful ones that we use here in Support are as follows:
Run Statistics Manually:
C:\Program Files\SWsoft\Plesk\admin\bin\statistics.exe
Re-build MailEnable according to Plesk DB:
mchk.exe --all --fix=all
Remove site from IIS:
websrvmng --remove-vhost --vhost-name=domainname.tld
Re-create Domain in IIS according to Plesk DB:
websrvmng --reconfigure-vhost --vhost-name=domainname.tld
or
websrvmng --reconfigure-all
Reset IUSR passwords (if particular site is prompting for password):
websrvmng --update-anon-password --domain-name=domainname.tld
Reset IUSR passwords For all accounts (if all sites are prompting for password)
websrvmng --update-anon-passwords-all
Fix webmail (404s)
"%plesk_bin%\defpackagemng.exe" --fix --type=webmail
For dnsmng related errors:
"%plesk_bin%\defpackagemng.exe" --fix --type=dnsserver
"%plesk_bin%\DNSMng.exe" update *
The most useful ones that we use here in Support are as follows:
Run Statistics Manually:
C:\Program Files\SWsoft\Plesk\admin\bin\statistics.exe
Re-build MailEnable according to Plesk DB:
mchk.exe --all --fix=all
Remove site from IIS:
websrvmng --remove-vhost --vhost-name=domainname.tld
Re-create Domain in IIS according to Plesk DB:
websrvmng --reconfigure-vhost --vhost-name=domainname.tld
or
websrvmng --reconfigure-all
Reset IUSR passwords (if particular site is prompting for password):
websrvmng --update-anon-password --domain-name=domainname.tld
Reset IUSR passwords For all accounts (if all sites are prompting for password)
websrvmng --update-anon-passwords-all
Fix webmail (404s)
"%plesk_bin%\defpackagemng.exe" --fix --type=webmail
For dnsmng related errors:
"%plesk_bin%\defpackagemng.exe" --fix --type=dnsserver
"%plesk_bin%\DNSMng.exe" update *
Subscribe to:
Posts (Atom)
About Me
- Himanshu
- Greetings Friend! I am Linux scholar, trying to learn as much I can and share it with you. I am in mid of my Professional Career. Doing Good. :)