RS First Dynamics NAV Blog


...from NAV 3.60 to NAV 2013
Archivio Posts
Anno 2015

Anno 2014

Anno 2013

Anno 2012

Anno 2011

Anno 2010

Anno 2009

Anno 2008

Anno 2007

SQL Server arrotondare a 2 decimali

SQL Server Arrotondare a 2 decimali ROUND --> ROUND(prezzo, 2)    oppure --> FLOOR(prezzo * 100) / 100 CASTCAST riposta in formato decimal --> CAST ([Campo VAlore] AS Decimal(9,2))  
Leggi tutto il post...
Categoria: Sql Server ALL
martedì, 30 mar 2010 Ore. 14.20

Operatore BETWEEN per confronto date

Supponiamo di voler cercare tutte le date del mese di Febbraio 2003 per la tabella T_PROVA, il risultato atteso è di 28 righe. Per sviluppare la query è consigliato l'operatore BETWEEN: ES:Use PubsGo--Impostazione del formato di input atteso da SQL Server: italianoSET DATEFORMAT dmy      SELECT * FROM T_PROVA WHERE DATA BETWEEN '01/02/2003' AND '01/03/2003'SELECT @@ROWCOUNTGo --Impostazione del formato di input: us_englishSET DATEFORMAT mdy      
Leggi tutto il post...
Categoria: Sql Server ALL
martedì, 30 mar 2010 Ore. 12.11

SQL Datafile Shrinking e Truncate Log

Shrinking & Truncate Log Example: SHRINKFILE DATAFILEDBCC SHRINKFILE(db_name_dat,1)DBCC SHRINKFILE(db_name_log,1) TRUNCATE LOG Backup log db_name with TRUNCATE_ONLY 
Leggi tutto il post...
Categoria: Sql Server ALL
venerdì, 26 mar 2010 Ore. 13.54

Writing an automation for Dynamics NAV C#

Original link http://techblog.byllemos.com/2008/10/writing-an-automation-for-navision-in-c/   REGISTER You can not registrate the automation directly through VS2008. Here you have to use regasm and gacutil. Regasm is a part of your framework, where as gacutil is a part of Microsoft SDK.   UNREGISTER Ex. on a dos script for registring the automation: set regasm=%windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exeset gacutil=C:\program files\Microsoft SDKs\Windows\v6.0a\bin\g 
Leggi tutto il post...
Categoria: Dynamics NAV ALL
giovedì, 25 mar 2010 Ore. 16.26

Disable Parameter Sniffing in SQL

Disable Parameter Sniffing in SQL, disable "cursor preparation"   Actually you can already disable the cursor preparation in NAV by adding a value to the "diagnostics" in "$ndo$dbproperty": update [dbo].[$ndo$dbproperty] set [diagnostics] = [diagnostics] + 1048576 ..requires NAV 5.0 SP1 Update 1 or higher. 
Leggi tutto il post...
Categoria: Sql Server ALL
mercoledì, 24 mar 2010 Ore. 15.13

Restore database da network backup (restore from disk)

COMANDO     dopo lunghi test e link visitati ecco il comando funzionante riassemblato; Paremetri: backup name, Logical Name, File Name RESTORE DATABASE "DBNAME"    FROM DISK= N'\\192.168.0.1\Backup\sql\Backupdb.bak'    WITH FILE= 1,    MOVE N'DB_Data' TO N'H:\DB_Data.mdf',    MOVE N'DB_1_Data' TO N'H:\DB_data_1.ndf',    MOVE N'DB_Log' TO N'H:\DB_Log.ldf',    & 
Leggi tutto il post...
Categoria: Sql Server ALL
mercoledì, 24 mar 2010 Ore. 11.27

Verificare versione Navision installata

Tabella dbproperty contieni informazioni sulla versione installata.   la tabella è la dbproperty e il campo databaseversionno. .Per la SP1 va valorizzato a 40 .Per la SP3 va valorizzato a 60    
Leggi tutto il post...
Categoria: Dynamics NAV ALL
mercoledì, 24 mar 2010 Ore. 11.18

Ricostruzione Indici SQL Server

Ricostruzione indici SQL Server Durante gli inserimenti e le modifiche in una tabella è possibile che gli indici vengano a deframmentarsi, facendo scadere le performance del database. E' necessario quindi, periodicamente, riorganizzare gli indici. Ci sono diversi modi per farlo, ad esempio è possibile ricrearlo completamente, oppure sfruttare il comando DBCC DBREINDEX che prende come parametro il nome di una tabella e ricrea automaticamente tutti gli indici a questa associati. Lo script che s 
Leggi tutto il post...
Categoria: Sql Server ALL
venerdì, 12 mar 2010 Ore. 15.40

SQL SERVER – FIX : Error 15023:

SQL SERVER – FIX : Error 15023: User already exists in current database. Error 15023: User already exists in current database. 1) This is the best Solution.First of all run following T-SQL Query in Query Analyzer. This will return all the existing users in database in result pan.USE YourDBGOEXEC sp_change_users_login 'Report'GORun following T-SQL Query in Query Analyzer to associate login with the username. ‘Auto_Fix’ attribute will create the user in SQL Server instance if it does  
Leggi tutto il post...
Categoria: Sql Server ALL
venerdì, 05 mar 2010 Ore. 18.06

Installazione Componente .NET (C#) per NAV

Installazione Componente .NET (C#) per NAV Registrazione di un pacchetto Assembly e mappatura su componente automation per utilizzo da NAV Registrazione deve essere fatta con REGASM(non con regsvr32.exe che serve solo per .OCX) COMANDI CMD per registrazione: set regasm=%windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exeset gacutil=C:\program files\Microsoft SDKs\Windows\v6.0a\bin\gacutil.exe %regasm% "C:\TEMP\DLL\MailAutomation.dll" /tlb:myAutomation.tlb   Registrazione component 
Leggi tutto il post...
Categoria: Dynamics NAV ALL
venerdì, 05 mar 2010 Ore. 11.16
Statistiche
  • Views Home Page: 450.919
  • Views Posts: 863.238
  • Views Gallerie: 0
  • n° Posts: 343
  • n° Commenti: 0
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003