<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/">
  <title>blog.cyberman.it</title>
  <link rel="alternate" href="http://blognew.aruba.it/blog.cyberman.it/" />
  <subtitle>blog.cyberman.it</subtitle>
  <dc:creator>blog.cyberman.it</dc:creator>
  <entry>
    <title>Send Fax from ASP.NET</title>
    <link rel="alternate" href="http://blognew.aruba.it/blog.cyberman.it/Send_Fax_from_ASP_NET_34103.shtml" />
    <category term="" />
    <category term="fax," />
    <category term="faxcomm," />
    <category term="asp" />
    <category term="net," />
    <category term="faxcomlib" />
    <author>
      <name>blog.cyberman.it</name>
    </author>
    <updated>2010-07-19T07:38:10Z</updated>
    <published>2010-07-19T07:38:10Z</published>
    <content>&lt;p&gt;&lt;font size="4"&gt;I use this code snippet to send a fax via ASP.NET page:&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; color: blue"&gt;private&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; SendFax(&lt;span style="color: blue"&gt;string&lt;/span&gt; faxNumber, &lt;span style="color: blue"&gt;string&lt;/span&gt; fileName)&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue"&gt;try&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;FAXCOMLib.&lt;span style="color: #2b91af"&gt;FaxServer&lt;/span&gt; faxServer = &lt;span style="color: blue"&gt;new&lt;/span&gt; FAXCOMLib.&lt;span style="color: #2b91af"&gt;FaxServerClass&lt;/span&gt;();&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;faxServer.Connect(&lt;span style="color: #2b91af"&gt;Environment&lt;/span&gt;.MachineName);&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue"&gt;var&lt;/span&gt; faxDoc = (FAXCOMLib.&lt;span style="color: #2b91af"&gt;FaxDoc&lt;/span&gt;)faxServer.CreateDocument(fileName);&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;faxDoc.FaxNumber = &lt;span style="color: #a31515"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; + faxNumber;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;faxDoc.RecipientName = &lt;span style="color: #a31515"&gt;&amp;quot;Dest &amp;quot;&lt;/span&gt; + faxDoc.FaxNumber;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;faxDoc.DisplayName = faxDoc.RecipientName;&lt;/span&gt;&lt;/p&gt;    &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;faxDoc.Send();&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0cm 0cm 0.0001pt 70.8pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;faxServer.Disconnect();&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin: 0cm 0cm 0.0001pt 70.8pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; color: green"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color: #a31515"&gt;&amp;quot;OK&amp;quot;&lt;/span&gt;);&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: blue"&gt;catch&lt;/span&gt; (&lt;span style="color: #2b91af"&gt;Exception&lt;/span&gt; exception)&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MessageBox&lt;/span&gt;.Show(exception.Message);&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0.0001pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'"&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: 'Courier New'"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;font size="4"&gt;But i get this error:&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="4" color="#FF0000"&gt;The data is invalid Exception from HRESULT: x8007000D&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;font size="4"&gt;The problem is that there is no file association (for the &amp;quot;print&amp;quot; command) on the server for the extension of the file that I need to FAX out.&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="4"&gt;Try create Shell association for &amp;quot;print&amp;quot; command or reinstall the viewer (ex. Acrobat Reader).&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="4"&gt;To verifythat the extension has the corret&amp;quot;print&amp;quot; command right-click on a file with this extension and verify that is present a menu item &amp;quot;Print&amp;quot;. &lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="4"&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;</content>
    <summary>I use this code snippet to send a fax via ASP.NET page:&amp;nbsp;  private void SendFax(string faxNumber, string fileName)  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try  &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...</summary>
    <dc:creator>blog.cyberman.it</dc:creator>
    <dc:date>2010-07-19T07:38:10Z</dc:date>
  </entry>
  <entry>
    <title>Manipolazione nomi file tramite T-SQL in SQL Server</title>
    <link rel="alternate" href="http://blognew.aruba.it/blog.cyberman.it/Manipolazione_nomi_file_tramite_T_SQL_in_SQL_Server_6040.shtml" />
    <category term="" />
    <category term="sql" />
    <category term="server," />
    <category term="filemane," />
    <category term="path," />
    <category term="extension" />
    <author>
      <name>blog.cyberman.it</name>
    </author>
    <updated>2009-01-15T11:28:24Z</updated>
    <published>2009-01-15T11:28:00Z</published>
    <content>&lt;p&gt;Credo che a qualcuno possano essere utili queste funzioni T-SQL per SQL Server che permettono di suddividere le varie porzioni che compongono una Path.&lt;/p&gt;&lt;p&gt;CREATE FUNCTION DBO.spString_LastIndexOf(@inputstring VARCHAR(8000), @searchString CHAR)&lt;br /&gt;RETURNS INT&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp; DECLARE @myindex int,&lt;br /&gt;&amp;nbsp;@index int&lt;br /&gt;&amp;nbsp; SELECT @inputstring = RTRIM(LTRIM(@inputstring))&lt;br /&gt;&amp;nbsp; SELECT @index = 0&lt;br /&gt;&amp;nbsp; SELECT @myindex = CHARINDEX(@searchString, @inputstring, @index)&lt;br /&gt;&amp;nbsp; WHILE&amp;nbsp; @myindex &amp;lt;&amp;gt; 0&lt;br /&gt;&amp;nbsp; BEGIN&lt;br /&gt;SELECT @index = @myindex&lt;br /&gt;SELECT @myindex = CHARINDEX(@searchString, @inputstring, @index+1)&lt;br /&gt;&amp;nbsp; END&lt;br /&gt;&amp;nbsp; RETURN (@index)&lt;br /&gt;END&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE FUNCTION dbo.spPath_GetFilePath(@inputstring VARCHAR(8000))&lt;br /&gt;RETURNS VARCHAR(8000)&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp; DECLARE @index int&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; SET @index = dbo.spString_LastIndexOf(@inputstring, '\');&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; return SUBSTRING(@inputstring, 1, @index)&amp;nbsp; &lt;br /&gt;END&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE FUNCTION dbo.spPath_GetFileName(@inputstring VARCHAR(8000))&lt;br /&gt;RETURNS VARCHAR(8000)&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp; DECLARE @index int&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; SET @index = dbo.spString_LastIndexOf(@inputstring, '\');&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; return SUBSTRING(@inputstring, @index + 1, 8000)&lt;br /&gt;END&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;CREATE FUNCTION dbo.spPath_GetFileNameWithoutExtension(@inputstring VARCHAR(8000))&lt;br /&gt;RETURNS VARCHAR(8000)&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp; DECLARE @index int&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; SET @inputstring = dbo.spPath_GetFileName(@inputstring);&amp;nbsp; &lt;br /&gt;&amp;nbsp; SET @index = dbo.spString_LastIndexOf(@inputstring, '.');&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; return SUBSTRING(@inputstring, 1, @index -1)&lt;br /&gt;END&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;ALTER FUNCTION dbo.spPath_GetFileExtension(@inputstring VARCHAR(8000))&lt;br /&gt;RETURNS VARCHAR(8000)&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp; DECLARE @index int&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; SET @inputstring = dbo.spPath_GetFileName(@inputstring);&amp;nbsp; &lt;br /&gt;&amp;nbsp; SET @index = dbo.spString_LastIndexOf(@inputstring, '.');&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; return SUBSTRING(@inputstring, @index, 8000)&lt;br /&gt;END&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;SELECT dbo.spPath_GetFilePath('C:\prova\filename.txt')&lt;br /&gt;SELECT dbo.spPath_GetFileName('C:\prova\filename.txt')&lt;br /&gt;SELECT dbo.spPath_GetFileNameWithoutExtension('C:\prova\filename.txt')&lt;br /&gt;SELECT dbo.spPath_GetFileExtension('C:\prova\filename.txt')&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;BR /&gt;</content>
    <summary>Credo che a qualcuno possano essere utili queste funzioni T-SQL per SQL Server che permettono di suddividere le varie porzioni che compongono una Path.CREATE FUNCTION DBO.spString_LastIndexOf(@inputstring VARCHAR(8000), @searchString CHAR)RETURNS INTASBEGIN&amp;nbsp; ...</summary>
    <dc:creator>blog.cyberman.it</dc:creator>
    <dc:date>2009-01-15T11:28:00Z</dc:date>
  </entry>
  <entry>
    <title>Transfer SMO e SQL Server 2008</title>
    <link rel="alternate" href="http://blognew.aruba.it/blog.cyberman.it/Transfer_SMO_e_SQL_Server_2008_4073.shtml" />
    <category term="" />
    <category term="transfer," />
    <category term="smo," />
    <category term="sql" />
    <category term="server" />
    <category term="2008" />
    <author>
      <name>blog.cyberman.it</name>
    </author>
    <updated>2008-11-19T22:19:51Z</updated>
    <published>2008-11-19T08:18:38Z</published>
    <content>&lt;p&gt;Ho avuto la necessit&amp;agrave; di trasferire un DB da un server ad un altro.&lt;/p&gt;&lt;p&gt;Il Target server aveva per&amp;ograve; una collation differente dal server sorgente.&lt;/p&gt;&lt;p&gt;Le stored procedure che usano tabelle temporanee appoggiano i dati nel database TempDB e quindi avvengono dei conflitti nel confronto delle stringhe di un DB con i dati nelle tabelle temporanee di TempDB.&lt;/p&gt;&lt;p&gt;Per questo motivo una copia del DB da Detach e Attach o da Backup e Restore NON era utilizzabile.&lt;/p&gt;&lt;p&gt;L'idea iniziale era quella di creare un programma che esportasse script di creazione di tutti gli oggetti e i dati del DB sorgente epoi li rieseguisse sul DB destinazione.&lt;/p&gt;&lt;p&gt;Alla fine ho scoperto la Tecnologia SMO che espone il DB come modello di classi .NET.&lt;/p&gt;&lt;p&gt;Tra queste classi ce ne sono alcune che servono proprio al trasferimento di Database, Oggetti e Dati. &lt;/p&gt;&lt;p&gt;Ho avuto un p&amp;ograve; di difficolt&amp;agrave; perch&amp;egrave; SQL Server 2008, lato CLIENT, necessita di librerie SMO differenti rispetto a quelle per SQL Server 2005.&lt;/p&gt;&lt;p&gt;Nel Mio Project ho referenziato tutti gli assembly in questa cartella:&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff"&gt;&lt;span class="NoojeeClickInstalled"&gt;C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies&lt;/span&gt;&lt;/font&gt; &lt;/p&gt;&lt;p&gt;Qualora si stesse compilando per x86 su una macchina x64 allora occorre prendere gli assembly da:&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff"&gt;C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies&lt;/font&gt;&lt;/p&gt;&lt;p&gt;Se NON avete questa cartella dovete installareil &lt;span&gt;&lt;strong&gt;Microsoft SQL Server 2008 Management Objects &lt;/strong&gt;che trovate a questo indirizzo:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=228de03f-3b5a-428a-923f-58a033d316e1&amp;amp;displaylang=en" target="_blank"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=228de03f-3b5a-428a-923f-58a033d316e1&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Alla fine il codice necessario &amp;egrave; veramente molto breve:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;HTML clipboardHTML clipboard&lt;font size="2" color="#2b91af"&gt; &lt;/font&gt;&lt;p&gt;&lt;font size="2" color="#2b91af"&gt;Server&lt;/font&gt;&lt;font size="2"&gt; svr = &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2" color="#2b91af"&gt;Server&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font size="2" color="#a31515"&gt;@&amp;quot;SERVER_SORGENTE&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt; &lt;font size="2" color="#2b91af"&gt; &lt;/font&gt;&lt;p&gt;&lt;font size="2" color="#2b91af"&gt;Database&lt;/font&gt;&lt;font size="2"&gt; db = svr.Databases[&lt;/font&gt;&lt;font size="2" color="#a31515"&gt;&amp;quot;DB_SORGENTE&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;];&lt;/font&gt;&lt;/p&gt; &lt;font size="2" color="#2b91af"&gt; &lt;/font&gt;&lt;p&gt;&lt;font size="2" color="#2b91af"&gt;Transfer&lt;/font&gt;&lt;font size="2"&gt; t = &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font size="2" color="#2b91af"&gt;Transfer&lt;/font&gt;&lt;font size="2"&gt;(db);&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;t.CopyAllObjects = &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;true&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;t.DropDestinationObjectsFirst = &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;true&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;t.CopySchema = &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;true&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;t.CopyData = &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;true&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;t.DestinationServer = &lt;/font&gt;&lt;font size="2" color="#a31515"&gt;&amp;quot;SERVER_DESTINAZIONE&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;t.DestinationDatabase = &lt;/font&gt;&lt;font size="2" color="#a31515"&gt;&amp;quot;DB_DESTINAZIONE&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;t.Options.NoCollation = &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;true&lt;/font&gt;&lt;font size="2"&gt;; &lt;/font&gt;&lt;font size="2" color="#008000"&gt;// Non si porta dietro le informazioni per  la Collation&lt;/font&gt;&lt;/p&gt; &lt;font size="2"&gt; &lt;/font&gt;&lt;p&gt;&lt;font size="2"&gt;t.Options.IncludeIfNotExists = &lt;/font&gt;&lt;font size="2" color="#0000ff"&gt;true&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;t.TransferData();&lt;/font&gt;&lt;/p&gt;&lt;p&gt; &lt;br /&gt;Ho realizzato una piccola applicazione che rende le cose un p&amp;ograve; pi&amp;ugrave; semplici.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src="http://blognew.aruba.it/blog.cyberman.it/resized//gallery//uid_11db6d35244.580.0.jpg" alt="" /&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Questa applicazione &amp;egrave; disponibile per il Donwload a &lt;a href="http://www.cyberman.it/blog/software/cySQLDBTransfer.zip" target="_blank"&gt;questo indirizzo&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;BR /&gt;</content>
    <summary>Ho avuto la necessit&amp;agrave; di trasferire un DB da un server ad un altro.Il Target server aveva per&amp;ograve; una collation differente dal server sorgente.Le stored procedure che usano tabelle temporanee appoggiano i dati nel database TempDB e quindi avvengono ...</summary>
    <dc:creator>blog.cyberman.it</dc:creator>
    <dc:date>2008-11-19T08:18:38Z</dc:date>
  </entry>
  <entry>
    <title>Configurazione asterisk per EUTELIA</title>
    <link rel="alternate" href="http://blognew.aruba.it/blog.cyberman.it/Configurazione_asterisk_per_EUTELIA_3825.shtml" />
    <category term="" />
    <category term="asterisk," />
    <category term="grandstream," />
    <category term="click" />
    <category term="and" />
    <category term="call," />
    <category term="eutelia" />
    <author>
      <name>blog.cyberman.it</name>
    </author>
    <updated>2008-11-17T10:30:40Z</updated>
    <published>2008-11-16T15:52:57Z</published>
    <content>&lt;p&gt;In questi giorni mi sono cimentato nell'installazione di un centralino Asterisk.&lt;/p&gt;&lt;p&gt;L'operazione &amp;egrave; stata pi&amp;ugrave; difficile di quanto pensassi ma alla fine ci sono riuscito.&lt;/p&gt;&lt;p&gt;I problemi maggiori li ho trovati con l'integrazione con il provider SIP Eutelia.&lt;/p&gt;&lt;p&gt;Ho deciso di installare AsteriskNOW che si proponegi&amp;agrave; integrato con FreePBX che gestiscela configurazione di asterisk via WEB.&lt;/p&gt;&lt;p&gt;&lt;span class="gensmall"&gt;Per quanto riguarda l'installazione di asterisk pi&amp;ugrave; o meno trovate in rete tutta la procedura.&lt;br /&gt;&lt;br /&gt;Asterisk NOW tiene i files di configurazione separati in pi&amp;ugrave; filettini che vengono modificati meglio dall'interfaccia web.&lt;br /&gt;In realt&amp;agrave; tutto st&amp;agrave; poi nel /etc/asterisk/sip.conf con degli include ai files esterni.&lt;br /&gt;&lt;br /&gt;Una considerazione va fatta sull'audio dei vari codec standard E' Pessimo!!!&lt;br /&gt;Se avete piccole realt&amp;agrave; vi consiglio di acquistare la licenza del G729 che costa 10 dollari a linea o di provare il G729 open (io non ho avuto tempo).&lt;br /&gt;&lt;br /&gt;Vi posto la configurazione tutta insieme come se fosse il sip.conf di asterisk normale.&lt;br /&gt;Potete spezzettarla ho lasciato i nomi dei files da cui ho prelevato i vari pezzetti.&lt;br /&gt;&lt;br /&gt;Alla mia configurazione mancano le rotte di outbound e di inbound che sono banali.&lt;br /&gt;&lt;br /&gt;Se vi serve sono anche riuscito a gestire la rubrica di asterisk via web e a fare un script php che espone in xml la rubrica di asterisk per telefoni GRANDSTREAM che quindi autoaggiornano il loro phonebook.&lt;br /&gt;&lt;br /&gt;Questa rubrica l'ho usata anche per far apparire i nomi associati ai caller ID in caso di ricezione della telefonata.&lt;br /&gt;&lt;br /&gt;Diverso materiale l'ho trovato qui: &lt;a href="http://www.voip-info.org/wiki-Asterisk" target="_blank"&gt;http://www.voip-info.org/wiki-Asterisk&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;La configurazione qui sotto ha 1 trunk con eutelia e 2 interni.&lt;br /&gt;&lt;br /&gt;Speriamo vi sia utile...&lt;br /&gt;&lt;br /&gt;Ciao.&lt;br /&gt;Riccardo.&lt;br /&gt;&lt;br /&gt;Ecco la configurazione:&lt;br /&gt;;sip.conf&lt;br /&gt;[general]&lt;br /&gt;&lt;br /&gt;;sip_general_additional.conf&lt;br /&gt;vmexten=*97&lt;br /&gt;disallow=all&lt;br /&gt;allow=ulaw&lt;br /&gt;allow=alaw&lt;br /&gt;context=from-sip-external&lt;br /&gt;callerid=Unknown&lt;br /&gt;notifyringing=yes&lt;br /&gt;notifyhold=yes&lt;br /&gt;limitonpeers=yes&lt;br /&gt;tos_sip=cs3&lt;br /&gt;tos_audio=ef&lt;br /&gt;tos_video=af41&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;sip_nat.con&lt;br /&gt;nat=yes&lt;br /&gt;externip=***IP_PUBBLICO****&lt;br /&gt;localnet=****IP_PRIVATO****/255.255.255.0&lt;br /&gt;&lt;br /&gt;;sip_registrations.conf&lt;br /&gt;register=NUMERO_TELEFONO_EUTELIA:PASSWORD_EUTELIA@voip.eutelia.it:5060/NUMERO_TELEFONO_EUTELIA&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;sip_additional.conf&lt;br /&gt;[NUMERO_TELEFONO_EUTELIA_in]&lt;br /&gt;disallow=all&lt;br /&gt;context=from-trunk&lt;br /&gt;nat=yes&lt;br /&gt;fromdomain=voip.eutelia.it&lt;br /&gt;fromuser=NUMERO_TELEFONO_EUTELIA&lt;br /&gt;host=voip.eutelia.it&lt;br /&gt;insecure=invite,port&lt;br /&gt;realm=voip.eutelia.it&lt;br /&gt;secret=PASSWORD_EUTELIA&lt;br /&gt;srvlookup=yes&lt;br /&gt;type=user&lt;br /&gt;username=NUMERO_TELEFONO_EUTELIA&lt;br /&gt;allow=g729 ; Licenza correttamente acquistata e registrata&lt;br /&gt;&lt;br /&gt;[NUMERO_TELEFONO_EUTELIA_out]&lt;br /&gt;username=NUMERO_TELEFONO_EUTELIA&lt;br /&gt;type=peer&lt;br /&gt;secret=PASSWORD_EUTELIA&lt;br /&gt;qualify=yes&lt;br /&gt;port=5060&lt;br /&gt;nat=yes&lt;br /&gt;insecure=invite,port&lt;br /&gt;host=voip.eutelia.it&lt;br /&gt;fromuser=NUMERO_TELEFONO_EUTELIA&lt;br /&gt;fromdomain=voip.eutelia.it&lt;br /&gt;&lt;br /&gt;; Se non si ha una licenza G729 eliminare le due righe sotto&lt;br /&gt;disallow=all&lt;br /&gt;allow=g729 ; Licenza correttamente acquistata e registrata&lt;br /&gt;&lt;br /&gt;[1]&lt;br /&gt;type=friend&lt;br /&gt;secret=PASSWORD_TELEFONO_VOIP&lt;br /&gt;qualify=yes&lt;br /&gt;port=5062&lt;br /&gt;pickupgroup=&lt;br /&gt;nat=yes&lt;br /&gt;mailbox=1@device&lt;br /&gt;host=dynamic&lt;br /&gt;dtmfmode=rfc2833&lt;br /&gt;dial=SIP/1&lt;br /&gt;context=from-internal&lt;br /&gt;canreinvite=no&lt;br /&gt;callgroup=&lt;br /&gt;callerid=device &amp;lt;1&amp;gt;&lt;br /&gt;accountcode=&lt;br /&gt;call-limit=50&lt;br /&gt;&lt;br /&gt;[2]&lt;br /&gt;type=friend&lt;br /&gt;secret=PASSWORD_TELEFONO_VOIP&lt;br /&gt;qualify=yes&lt;br /&gt;port=5064&lt;br /&gt;pickupgroup=&lt;br /&gt;nat=yes&lt;br /&gt;mailbox=2@device&lt;br /&gt;host=dynamic&lt;br /&gt;dtmfmode=rfc2833&lt;br /&gt;dial=SIP/2&lt;br /&gt;context=from-internal&lt;br /&gt;canreinvite=no&lt;br /&gt;callgroup=&lt;br /&gt;callerid=device &amp;lt;2&amp;gt;&lt;br /&gt;accountcode=&lt;br /&gt;call-limit=50&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;BR /&gt;</content>
    <summary>In questi giorni mi sono cimentato nell'installazione di un centralino Asterisk.L'operazione &amp;egrave; stata pi&amp;ugrave; difficile di quanto pensassi ma alla fine ci sono riuscito.I problemi maggiori li ho trovati con l'integrazione con il provider SIP ...</summary>
    <dc:creator>blog.cyberman.it</dc:creator>
    <dc:date>2008-11-16T15:52:57Z</dc:date>
  </entry>
</feed>


