If you have lots of functions or procedure and you forgot the name, you can use the following query to find by name
SELECT DISTINCT o.name ,o.xtype FROM syscomments c INNER JOIN sysobjects o ON c.id=o.id WHERE c.TEXT LIKE '%SOME_TEXT%' GO
Thanks
If you have lots of functions or procedure and you forgot the name, you can use the following query to find by name
SELECT DISTINCT o.name ,o.xtype FROM syscomments c INNER JOIN sysobjects o ON c.id=o.id WHERE c.TEXT LIKE '%SOME_TEXT%' GO
Thanks
Sql Server administrators often need to backup databases and preferably automated. following script will create backups of all databases other than specified, Script will create separate directory of backups, currently this script runs daily and creates daily directory. to create physical directory using Sql we need to enable a stored procedure “xp_cmdshell” and that can only be enabled when […]
some times you have to run a large SQL script in SQL server and “Sql Server Management Studio” dies when you load the large file. To import / run the large script you need to use SQL Server command line tool sqlcmd there are many parameters for this command line toll use this for full list […]
Normally when a database in Microsoft Sql Server 2008 is created the recovery model is full and that causes huge disk space usage and with usage of database the log file increases in size. Some times you may need to clean the log file, so here you go. USE [DATABASE_NAME]; GO — Truncate the log […]
No Comments Yet