How can we help you today? How can we help you today?
mikea
But it looks like you already generate the code. I used what you generated (The sp_grantlogin), then wrote a script that filled in the user name, then it seemed to work for SQL 2000. [image] / comments
But it looks like you already generate the code. I used what you generated (The sp_grantlogin), then wrote a script that filled in the user name, then it seemed to work for SQL 2000.
0 votes
Brian, Currently, no, it will not script the addlogin. Brian Donahue wrote: Hi Mike, Yes, SQL Compare wants to compare users but it can't add a user to a database unless the login exists first; that's why it scripts an addlogin. / comments
Brian, Currently, no, it will not script the addlogin. Brian Donahue wrote: Hi Mike, Yes, SQL Compare wants to compare users but it can't add a user to a database unless the login exists first; th...
0 votes
I have two servers. Production and development. I restored a DB from Production to development. So, all the users in the database are there, but, the security Logins are not, so I wanted to create a script to create all the security logins on the development server. To accomplish this, I performed a compare between the two databases, it listed several changes because of replication and users. I unchecked everything, and selected a few users. Then I clicked "Syncronize" then I selected Make Local like production, then I clicked next, then looked at the script and is was basically blank. here it is: /* Script created by SQL Compare from Red Gate Software Ltd at 11/21/2005 11:32:59 AM Run this script on (local).SALES to make it the same as PRODSERVER.SALES Please back up your database before running this script */ SET NUMERIC_ROUNDABORT OFF GO SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON GO IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors GO CREATE TABLE #tmpErrors (Error int) GO SET XACT_ABORT ON GO SET TRANSACTION ISOLATION LEVEL SERIALIZABLE GO BEGIN TRANSACTION GO IF EXISTS (SELECT * FROM #tmpErrors) ROLLBACK TRANSACTION GO @TRANCOUNT>0 BEGIN PRINT 'The database updated succeeded' COMMIT TRANSACTION END ELSE PRINT 'The database update failed' GO DROP TABLE #tmpErrors GO / comments
I have two servers. Production and development. I restored a DB from Production to development. So, all the users in the database are there, but, the security Logins are not, so I wanted to crea...
0 votes
I guess it senses that the "login" is not there, but it wont script it because the database "user" is there. The Login's can be found from Enterprise Manager, then Security, then Logins. I checked my version and I am also running (3.2.1.14). / comments
I guess it senses that the "login" is not there, but it wont script it because the database "user" is there. The Login's can be found from Enterprise Manager, then Security, then Logins. I checked ...
0 votes