Monthly Archives: April 2018

Cursor to Take All SQL User DBs Off-Line

CREATE PROCEDURE SP_TakeOfflineAllDatabase AS BEGIN DECLARE @db sysname, @q varchar(max); DECLARE cur_db CURSOR FOR SELECT name FROM sys.databases WHERE owner_sid <> 0x01; OPEN cur_db; WHILE 1=1 BEGIN FETCH NEXT FROM cur_db INTO @db; IF @@FETCH_STATUS <> 0 BREAK; SET @q … Continue reading

Posted in Uncategorized | Leave a comment

How to use the Bulk Copy Process (BCP) to export Microsoft Dynamics GP data from one database and import data into a new database

In order to downgrade SQL for a move of GP data files to an unsupported version you must perform this task to rebuild the GP database in an earlier version. Vince    

Posted in Uncategorized | Leave a comment