<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intrebari generale</title><link>http://sqlserver.ro/forums/16/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: Get HDD Serial Number</title><link>http://sqlserver.ro/forums/thread/7134.aspx</link><pubDate>Fri, 08 May 2009 12:51:32 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:7134</guid><dc:creator>B_gd_n[ ]Sahlean</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/7134.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=7134</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://sqlserver.ro/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;buciutacalin:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;In final am reusit astfel:

-am creat un fisier .exe care returneaza codul serial al calculatorului
-am copiat fisierul .exe pe Server in C:\
-prin SQL apelez acest fisier cu:

-----------
declare @tblsn table(snlines varchar(200))
insert into @tblsn 
	exec master..xp_cmdshell 'C:\slcod.exe' 
select * from @tblsn
-----------

Atentie, trebuie sa fie activ xp_cmdshell (eventual se poate configura pe enabled pana cand se executa interogarea iar apoi se pune pe disable folosind sp_configure)&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br&gt;xp_cmdshell este ... 'periculoasă'.&lt;br&gt;Încearcă să apelezi la o soluţie care să excludă xp_cmdshell.</description></item><item><title>Re: Get HDD Serial Number</title><link>http://sqlserver.ro/forums/thread/7131.aspx</link><pubDate>Fri, 08 May 2009 12:25:02 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:7131</guid><dc:creator>MrSmersh</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/7131.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=7131</wfw:commentRss><description>Out of the box, un stored procedure CLR ar merge sa faca asta?</description></item><item><title>Re: Get HDD Serial Number</title><link>http://sqlserver.ro/forums/thread/7109.aspx</link><pubDate>Thu, 07 May 2009 08:09:42 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:7109</guid><dc:creator>buciutacalin</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/7109.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=7109</wfw:commentRss><description>In final am reusit astfel:&lt;br /&gt;&lt;br /&gt;-am creat un fisier .exe care returneaza codul serial al calculatorului&lt;br /&gt;-am copiat fisierul .exe pe Server in C:\&lt;br /&gt;-prin SQL apelez acest fisier cu:&lt;br /&gt;&lt;br /&gt;-----------&lt;br /&gt;declare @tblsn table(snlines varchar(200))&lt;br /&gt;insert into @tblsn &lt;br /&gt;	exec master..xp_cmdshell 'C:\slcod.exe' &lt;br /&gt;select * from @tblsn&lt;br /&gt;-----------&lt;br /&gt;&lt;br /&gt;Atentie, trebuie sa fie activ xp_cmdshell (eventual se poate configura pe enabled pana cand se executa interogarea iar apoi se pune pe disable folosind sp_configure)&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Get HDD Serial Number</title><link>http://sqlserver.ro/forums/thread/7024.aspx</link><pubDate>Fri, 03 Apr 2009 16:10:55 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:7024</guid><dc:creator>crestinul</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/7024.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=7024</wfw:commentRss><description>Pentru astatrebuie sa-ti scrii o functie in dot net folosind name space System.Management.&lt;br /&gt;Aceasta functia iti va intoarce stringul care e serialul ,obtinut in urma interogarii wmi.&lt;br /&gt;Vezi pe msdn cum se face deploy la un assemby dot net pe sql server.&lt;br /&gt;Pentru asta trebuie sa scrii cod dot net insa</description></item><item><title>Re: Get HDD Serial Number</title><link>http://sqlserver.ro/forums/thread/7018.aspx</link><pubDate>Fri, 03 Apr 2009 06:25:55 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:7018</guid><dc:creator>buciutacalin</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/7018.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=7018</wfw:commentRss><description>Mersi de sugestie dar nu prea stiu cum as putea sa fac asta in SQL Server.&lt;br /&gt;Am reusit sa gasesc Serial nr. a HDD-ului computerului local folosind WMI cu Visual Fox Pro.&lt;br /&gt;As dori sa gasesc Serial nr. a HDD-ului server-ului, pe care e instalat SQL-ul.</description></item><item><title>Re: Get HDD Serial Number</title><link>http://sqlserver.ro/forums/thread/6992.aspx</link><pubDate>Mon, 30 Mar 2009 14:33:54 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6992</guid><dc:creator>crestinul</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6992.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6992</wfw:commentRss><description>sau iti faci o procedura clr care foloseste wmi pt aflarea serialului ...</description></item><item><title>Re: Get HDD Serial Number</title><link>http://sqlserver.ro/forums/thread/6972.aspx</link><pubDate>Sat, 28 Mar 2009 11:05:33 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6972</guid><dc:creator>buciutacalin</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6972.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6972</wfw:commentRss><description>Mersi mult, cred ca asa voi face.&lt;br /&gt;Credeam ar fi posibil direct din SQL Server, ar fi fost mult mai simplu si as fi scapat de instalarea suplimentara a unor fisiere/programe la client.</description></item><item><title>Re: Get HDD Serial Number</title><link>http://sqlserver.ro/forums/thread/6971.aspx</link><pubDate>Sat, 28 Mar 2009 10:32:33 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6971</guid><dc:creator>ignatandrei</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6971.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6971</wfw:commentRss><description>ca un work around: fa un command line cu C#, in care intorci serial number ( ca aici, jos de tot http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_21346708.html ) si il apelezi fie cu&amp;nbsp; xp_cmdshell &lt;br&gt;</description></item><item><title>Get HDD Serial Number</title><link>http://sqlserver.ro/forums/thread/6970.aspx</link><pubDate>Sat, 28 Mar 2009 10:08:56 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:6970</guid><dc:creator>buciutacalin</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/6970.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=16&amp;PostID=6970</wfw:commentRss><description>Salut, cum pot afla seria unica a HDD-ului pe care este instalat SQL Server folosind SQL Server 2005 Express.&lt;br /&gt;&lt;br /&gt;Mentionez ca doresc sa aflu Serial Number NU Volume Serial Number.&lt;br /&gt;Pentru Volume Serial Number am reusit folosind urmatoarul cod:&lt;br /&gt;&lt;br /&gt;---------&lt;br /&gt;declare @tbl table(dir_lines varchar(200))&lt;br /&gt;declare @Cmd varchar(2000)&lt;br /&gt;&lt;br /&gt;set @cmd = 'dir "' + (select name from sys.dm_os_loaded_modules where description like 'SQL Server%' and name like '%sqlservr.exe') + '"'&lt;br /&gt;&lt;br /&gt;insert into @tbl&lt;br /&gt;exec xp_cmdshell @cmd&lt;br /&gt;&lt;br /&gt;select * from @tbl where dir_lines like '%volume%serial%'&lt;br /&gt;----------&lt;br /&gt;&lt;br /&gt;Multumesc anticipat!</description></item></channel></rss>