Showing posts with label compare. Show all posts
Showing posts with label compare. Show all posts

Friday, March 23, 2012

Script to compare logins between 2 servers

Does anyone have the above in their code library? I need to compare logins between 2 servers in preparation to move a large number of DBs across.

Ideally, I am looking for duplicates.

In SQL Server 2000 you would query the syslogins table in the master database.

Code Snippet

USE master

GO

SELECT * FROM syslogins

In SQL Server 2005 you would use the new system information views. You can query the sys.syslogins view

Code Snippet

USE master

GO

SELECT * FROM sys.syslogins

Hope this helps get you on track. You can very easily write a comparison script and with a little work automate your findings.

NOTE: You can leave out the USE master - GO parts of the scripts for sql server 2005. the sys.syslogins view is available from all databases.

Script to compare logins between 2 servers

Does anyone have the above in their code library? I need to compare logins between 2 servers in preparation to move a large number of DBs across.

Ideally, I am looking for duplicates.

In SQL Server 2000 you would query the syslogins table in the master database.

Code Snippet

USE master

GO

SELECT * FROM syslogins

In SQL Server 2005 you would use the new system information views. You can query the sys.syslogins view

Code Snippet

USE master

GO

SELECT * FROM sys.syslogins

Hope this helps get you on track. You can very easily write a comparison script and with a little work automate your findings.

NOTE: You can leave out the USE master - GO parts of the scripts for sql server 2005. the sys.syslogins view is available from all databases.

Tuesday, March 20, 2012

Script out server properties and configurations

Does anyone know how to script out the properties and configuraiton settings
for a 2005 instance to compare with another instance? Thanks in advance if
you do...
Message posted via http://www.droptable.com
just run 'exec xp_msver' on the instance to get the basic settings.
-oj
"g8r via droptable.com" <u16034@.uwe> wrote in message
news:5dbf66b66bd7d@.uwe...
> Does anyone know how to script out the properties and configuraiton
> settings
> for a 2005 instance to compare with another instance? Thanks in advance if
> you do...
> --
> Message posted via http://www.droptable.com
|||You can execute sp_configure to list all the configuration
settings. Enable show advanced option first. You can find
examples how to do this in books online under sp_configure.
-Sue
On Fri, 24 Mar 2006 19:50:31 GMT, "g8r via droptable.com"
<u16034@.uwe> wrote:

>Does anyone know how to script out the properties and configuraiton settings
>for a 2005 instance to compare with another instance? Thanks in advance if
>you do...

Script out server properties and configurations

Does anyone know how to script out the properties and configuraiton settings
for a 2005 instance to compare with another instance? Thanks in advance if
you do...
--
Message posted via http://www.sqlmonster.comjust run 'exec xp_msver' on the instance to get the basic settings.
-oj
"g8r via SQLMonster.com" <u16034@.uwe> wrote in message
news:5dbf66b66bd7d@.uwe...
> Does anyone know how to script out the properties and configuraiton
> settings
> for a 2005 instance to compare with another instance? Thanks in advance if
> you do...
> --
> Message posted via http://www.sqlmonster.com|||You can execute sp_configure to list all the configuration
settings. Enable show advanced option first. You can find
examples how to do this in books online under sp_configure.
-Sue
On Fri, 24 Mar 2006 19:50:31 GMT, "g8r via SQLMonster.com"
<u16034@.uwe> wrote:
>Does anyone know how to script out the properties and configuraiton settings
>for a 2005 instance to compare with another instance? Thanks in advance if
>you do...

Script out server properties and configurations

Does anyone know how to script out the properties and configuraiton settings
for a 2005 instance to compare with another instance? Thanks in advance if
you do...
Message posted via http://www.droptable.comjust run 'exec xp_msver' on the instance to get the basic settings.
-oj
"g8r via droptable.com" <u16034@.uwe> wrote in message
news:5dbf66b66bd7d@.uwe...
> Does anyone know how to script out the properties and configuraiton
> settings
> for a 2005 instance to compare with another instance? Thanks in advance if
> you do...
> --
> Message posted via http://www.droptable.com|||You can execute sp_configure to list all the configuration
settings. Enable show advanced option first. You can find
examples how to do this in books online under sp_configure.
-Sue
On Fri, 24 Mar 2006 19:50:31 GMT, "g8r via droptable.com"
<u16034@.uwe> wrote:

>Does anyone know how to script out the properties and configuraiton setting
s
>for a 2005 instance to compare with another instance? Thanks in advance if
>you do...

Friday, March 9, 2012

script for comparing tables

Hi,

Can I have a script to compare the two tables. Such that I can identify the missing rows of Table A in Table B, in the absece of any know key.

Quote:

Originally Posted by ckmoied

Hi,

Can I have a script to compare the two tables. Such that I can identify the missing rows of Table A in Table B, in the absece of any know key.


If you did it by hand, how would you determine if a row of Table B does or does not exist in Table A?