How to find NT Service\MSSQLSERVER and NT Service\SQLSERVERAGENT accounts?

fonte:http://dinesql.blogspot.it/2016/10/how-to-find-nt-service-mssqlserver-and-sqlserveragent-accounts.html You have installed SQL Server and it is up and running without any issue. Later, you need to change some permission given to either SQL Server engine or agent. You look for accounts, searched in local users, searched in local groups but you cannot find them. Are you experiencing above issues? If yes, first understand the what are these
Read More »

SQL Server – Recuperare il Product Key da una installazione esistente

fonte: http://www.ryadel.com/sql-server-2008-2008-r2-e-2014-recuperare-il-product-key-da-una-installazione-esistente/ A volte può essere necessario recuperare il Product Key del proprio SQL Server da una installazione esistente: il caso più comune è quello di un Server di una certa età del quale si è perso ogni ricordo di configurazione e che si ha improvvisamente necessità di trasferire altrove, ma può anche capitare di smarrire semplicemente
Read More »

How to grant insert in a table that is in another database on SQL Server 2008 R2?

fonte: https://dba.stackexchange.com/questions/96629/how-to-grant-insert-in-a-table-that-is-in-another-database-on-sql-server-2008-r2 https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4c12914c-8364-48f4-ad35-db64fbeb0ff1/how-to-give-read-write-permissions-to-a-specific-table-in-a-database-of-sql-2008r2?forum=sqlgetstarted Use [DatabaseA] GO ALTER DATABASE [DatabaseA] SET DB_CHAINING ON GO Use [DatabaseB] GO ALTER DATABASE [DatabaseB] SET DB_CHAINING ON GO EXEC sp_grantdbaccess 'UserB'; GO GRANT SELECT, UPDATE on [DatabaseB].[dbo].[TableA] TO [UserB] GO

How to run 32-bit UDL file on a 64-bit Operating System

fonte: https://blogs.msdn.microsoft.com/chaitanya_medikonduri/2008/04/09/how-to-run-32-bit-udl-file-on-a-64-bit-operating-system/ We’ll need to  execute the command below from a command line or Start/Run :   C:\Windows\syswow64\rundll32.exe “C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll”,OpenDSLFile C:\test.udl   Check the paths of rundll32.exe and oledb32.dll while running this command!   Here you have your 32 bit OLE DB Providers.

Rimuove spazi in eccesso da stringa SQL

fonte: http://stackoverflow.com/questions/2455750/replace-duplicate-spaces-with-a-single-space-in-t-sql SELECT REPLACE(REPLACE(REPLACE('some string with many spaces' , ' ', ' ' + CHAR(7) + CHAR(7)), CHAR(7) + CHAR(7) + ' ', ''), ' ' + CHAR(7) + CHAR(7), ' ') AS NewStr --but it remove CHAR(7) + CHAR(7) from string How it works: Caution: Char/string used to replace spaces shouldn’t exist on begin or
Read More »

Esportazione dati da SQL a file posizione fissa

Fonte: http://gaurangpatel.net/exporting-data-from-sql-server-to-fixed-position-flat-file Exporting data from SQL Server to Fixed Position Flat file Just as usual, this post is kind of “Bi-product” of my attempt to create a demo for another post in which I need to use fixed position file. At first I tried to create a fixed position file using BCP. BCP has query out
Read More »

Using sp_change_users_login to fix SQL Server orphaned users http://www.codeproject.com/Articles/594134/How-to-Fix-Orphaned-SQL-Users    

How to Setup SQL Server 2008/2008R2 Maintenance Plan and Email Notifications

fonte: http://nideesh.wordpress.com/2012/10/24/how-to-setup-sql-server-20082008r2-maintenance-plan-and-email-notifications/ How to Setup SQL Server 2008/2008R2 Maintenance Plan and Email Notifications Most of the time we will have good installation and configuration for several systems but when we talk about maintenance and regular health check there should be a delay in talk and response. Database backup and maintenance should consider very important DBA should
Read More »