怎样取得某个数据库中所有的存储过程的名称?该怎么解决

怎样取得某个数据库中所有的存储过程的名称?
我想把SQL上的一个数据库中所有存储过程的名称导到一个文本文件中,这样该怎么做呢?

------解决方案--------------------
USE 数据库名
Select name From sysobjects Where xtype= 'P '
------解决方案--------------------
bcp "select * from sysobjects where xtype= 'p ' " queryout A.txt -c -Sservername -Usa -Ppassword
------解决方案--------------------
exec master..xp_cmdshell 'bcp "select name from dbname.dbo.sysobjects where xtype= ' 'p ' " queryout c:\a.txt -c -q -t, -S服务器名 -Usa -P密码 '
------解决方案--------------------
--更正
exec master..xp_cmdshell 'bcp "select name from 数据库名.dbo.sysobjects where xtype= ' 'p ' ' " queryout c:\a.txt -c -q -t, -S服务器名 -Usa -P密码 '

------解决方案--------------------
EXEC master..xp_cmdshell 'bcp "Select name From sysobjects Where xtype= 'P ' " queryout "e:\TX1.txt " -c -q -S "服务器 " -U "用户名 " -P "密码 " '
------解决方案--------------------
EXEC master..xp_cmdshell 'bcp "Select name From sysobjects Where xtype= ' 'P ' ' " queryout e:\TX1.txt -c -q -S服务器 -U用户名 -P密码 '