Showing posts with label sync. Show all posts
Showing posts with label sync. Show all posts

Wednesday, March 7, 2012

Keeping Domain & SQL Access In Sync

Does anyone know of a sample script I could get access to that would
automatically compare disabled/deleted domain accounts to the SQL Security
Logins and keep them "in sync" without any interaction from the SQL
administrator? We're wanting to eliminate the need of sending manual
notifications to the SQL administrator of terminated employees and running
the sp_denylogin. Instead, we want to just create a script that would go ou
t
to all of our SQL servers and automatically remove accounts no longer active
in the domain itself. Does Active Directory provide any tools to do this?
Any help would be greatly appreciated.
Thanks.
ColetteHi
Why don't you rather use Domain Groups?
Give a domain group the correct access, and add the user to the group. A
user can be in multiple groups and when the NT accounts gets added or
removed, there is no maintenance from the DBA side.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Colette" wrote:

> Does anyone know of a sample script I could get access to that would
> automatically compare disabled/deleted domain accounts to the SQL Security
> Logins and keep them "in sync" without any interaction from the SQL
> administrator? We're wanting to eliminate the need of sending manual
> notifications to the SQL administrator of terminated employees and running
> the sp_denylogin. Instead, we want to just create a script that would go
out
> to all of our SQL servers and automatically remove accounts no longer acti
ve
> in the domain itself. Does Active Directory provide any tools to do this?
> Any help would be greatly appreciated.
> Thanks.
> Colette|||That's what I've suggested but they do not want to add additional groups to
Active Directory. Strange...but true. I have instructed them we need to g
o
this route or they need to manually notify the SQL Admins based off the
"security form" of a termination involving SQL access.
P.S. The servers were already set up this way prior to my hire. I'm trying
to fix it. Just wanted to throw that out there...
Thanks again.
Colette
"Mike Epprecht (SQL MVP)" wrote:
[vbcol=seagreen]
> Hi
> Why don't you rather use Domain Groups?
> Give a domain group the correct access, and add the user to the group. A
> user can be in multiple groups and when the NT accounts gets added or
> removed, there is no maintenance from the DBA side.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
>
> "Colette" wrote:
>|||Hi
Then you will need to write some code for this.
Call sp_validatelogins, this will give you a list of all NT Logins that are
no longer valid.
Then based on that result, call sp_revokelogin to remove the user from the
server.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Colette" <Colette@.discussions.microsoft.com> wrote in message
news:4AE2F5A1-DA00-4591-BC54-76DEC19D08CA@.microsoft.com...[vbcol=seagreen]
> That's what I've suggested but they do not want to add additional groups
> to
> Active Directory. Strange...but true. I have instructed them we need to
> go
> this route or they need to manually notify the SQL Admins based off the
> "security form" of a termination involving SQL access.
> P.S. The servers were already set up this way prior to my hire. I'm
> trying
> to fix it. Just wanted to throw that out there...
> Thanks again.
> Colette
> "Mike Epprecht (SQL MVP)" wrote:
>

Keeping disconnected servers in sync

Hello all.
Because I work at home quite often, I keep updated copies of the databases I
normally work on in the office on my servers at home. This is accomplished
by backing up databases to DAT and restoring when I get home.
These databases have gotten quite large, as databases are wont to do and
while I can still get them on a tape, the backup and restore time is too
much to live with.
Does anyone know of a method to keep these two disconnected servers and/or
databases in sync without a lengthy backup and restore?
Thanks.
David
--
ROT13 my email address to reply directly: qnircra@.gpd.argDavid
Perhaps you want to compress your backup with WINZIP or WINRAR.
"David Pendleton" <qnircra@.gpd.arg> wrote in message
news:#G4Cb6TjDHA.1696@.TK2MSFTNGP12.phx.gbl...
> Hello all.
> Because I work at home quite often, I keep updated copies of the databases
I
> normally work on in the office on my servers at home. This is accomplished
> by backing up databases to DAT and restoring when I get home.
> These databases have gotten quite large, as databases are wont to do and
> while I can still get them on a tape, the backup and restore time is too
> much to live with.
> Does anyone know of a method to keep these two disconnected servers and/or
> databases in sync without a lengthy backup and restore?
> Thanks.
> David
> --
> ROT13 my email address to reply directly: qnircra@.gpd.arg
>|||I'm using SQL Backup, so compression is not an option. Backing up 18GB to a
disk device, compressing, and backing up to tape takes longer still.
Thanks anyway.
--
ROT13 my email address to reply: qnircra@.gpd.arg
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:#iAGMSWjDHA.2500@.TK2MSFTNGP10.phx.gbl...
> David
> Perhaps you want to compress your backup with WINZIP or WINRAR.
>
>
> "David Pendleton" <qnircra@.gpd.arg> wrote in message
> news:#G4Cb6TjDHA.1696@.TK2MSFTNGP12.phx.gbl...
> > Hello all.
> >
> > Because I work at home quite often, I keep updated copies of the
databases
> I
> > normally work on in the office on my servers at home. This is
accomplished
> > by backing up databases to DAT and restoring when I get home.
> >
> > These databases have gotten quite large, as databases are wont to do and
> > while I can still get them on a tape, the backup and restore time is too
> > much to live with.
> >
> > Does anyone know of a method to keep these two disconnected servers
and/or
> > databases in sync without a lengthy backup and restore?
> >
> > Thanks.
> >
> > David
> > --
> > ROT13 my email address to reply directly: qnircra@.gpd.arg
> >
> >
>|||David
I don't agree.
> I'm using SQL Backup, so compression is not an option.
What did you mean?
I backup my 15 GB database with compression. You need to write batch file
and place it in system directory.
If you want I can show the example,let me know.
> Backing up 18GB to a
> disk device, compressing, and backing up to tape takes longer still.
After compression I delete .bak file ,so I keep on a device .RAR file of 2
MB.
Regarding to the time belive me it is almost the same.
"David Pendleton" <qnircra@.gpd.arg> wrote in message
news:e9DLmJhjDHA.688@.TK2MSFTNGP10.phx.gbl...
> I'm using SQL Backup, so compression is not an option. Backing up 18GB to
a
> disk device, compressing, and backing up to tape takes longer still.
> Thanks anyway.
> --
> ROT13 my email address to reply: qnircra@.gpd.arg
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:#iAGMSWjDHA.2500@.TK2MSFTNGP10.phx.gbl...
> > David
> > Perhaps you want to compress your backup with WINZIP or WINRAR.
> >
> >
> >
> >
> > "David Pendleton" <qnircra@.gpd.arg> wrote in message
> > news:#G4Cb6TjDHA.1696@.TK2MSFTNGP12.phx.gbl...
> > > Hello all.
> > >
> > > Because I work at home quite often, I keep updated copies of the
> databases
> > I
> > > normally work on in the office on my servers at home. This is
> accomplished
> > > by backing up databases to DAT and restoring when I get home.
> > >
> > > These databases have gotten quite large, as databases are wont to do
and
> > > while I can still get them on a tape, the backup and restore time is
too
> > > much to live with.
> > >
> > > Does anyone know of a method to keep these two disconnected servers
> and/or
> > > databases in sync without a lengthy backup and restore?
> > >
> > > Thanks.
> > >
> > > David
> > > --
> > > ROT13 my email address to reply directly: qnircra@.gpd.arg
> > >
> > >
> >
> >
>

Monday, February 20, 2012

keep db's in sync

I have sql 2000 and sql 2005 on one test server while we test our apps
against SQL 2005. Is it possible to keep both version of the databases in
sync?
Since I can have more then one application hitting one database I want to
keep the databases having the same structure, data, etc on both the 2000
version and the 2005 server so if someone makes a table change on the 2000
database, I want that change to happen on the SQL 2005 server database as
well and without the developer going in and making the change and the same
with the data, if new data is entered in the 2000 db I want that data to be
inserted into the 2005 database.
How can I accomplish something like this?
On Jun 7, 10:10 pm, "Mike" <M...@.community.nospam> wrote:
> I have sql 2000 and sql 2005 on one test server while we test our apps
> against SQL 2005. Is it possible to keep both version of the databases in
> sync?
> Since I can have more then one application hitting one database I want to
> keep the databases having the same structure, data, etc on both the 2000
> version and the 2005 server so if someone makes a table change on the 2000
> database, I want that change to happen on the SQL 2005 server database as
> well and without the developer going in and making the change and the same
> with the data, if new data is entered in the 2000 db I want that data to be
> inserted into the 2005 database.
> How can I accomplish something like this?
Check Transactional Replication
|||ok, what is it?
I'm no DBA, I actually got this project thrown on my lap. I do .NET
development and never did anything with SQL Server such as this. This is all
greek to me
"M A Srinivas" <masri999@.gmail.com> wrote in message
news:1181281869.391901.72760@.g37g2000prf.googlegro ups.com...
> On Jun 7, 10:10 pm, "Mike" <M...@.community.nospam> wrote:
> Check Transactional Replication
>
|||Did you search for "Transactional Replication" in Books Online? There are good information there.
Basically, you have a publisher (source database) and a subscriber. A low reader process regenerates
the modifications performed in the source database by reading the transaction log and store them in
a distribution database. Then a distributor process reads the distribution database and based on
that applies those modifications on the subscriber database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Mike" <Mike@.community.nospam> wrote in message news:OwxQi3cqHHA.484@.TK2MSFTNGP06.phx.gbl...
> ok, what is it?
> I'm no DBA, I actually got this project thrown on my lap. I do .NET development and never did
> anything with SQL Server such as this. This is all greek to me
> "M A Srinivas" <masri999@.gmail.com> wrote in message
> news:1181281869.391901.72760@.g37g2000prf.googlegro ups.com...
>
|||On Jun 8, 9:06 am, "Mike" <M...@.community.nospam> wrote:
> ok, what is it?
> I'm no DBA, I actually got this project thrown on my lap. I do .NET
> development and never did anything with SQL Server such as this. This is all
> greek to me
> "M A Srinivas" <masri...@.gmail.com> wrote in messagenews:1181281869.391901.72760@.g37g2000prf.go oglegroups.com...
>
>
>
> - Show quoted text -
Hi Mike,
the transactional replication that Srinivas suggested will help you
keep the data in sync but not the schema - that is if you change a
table, a view, a stored procedure etc. the transactional replication
won't help.
You can check out our tools xSQL Object for comparing and
synchronizing the database schemas and xSQL Data Compare for comparing
and synchronizing the data. We give away a fully functional lite
edition - you can get it from http://www.xsqlsoftware.com
Those tools will allow you to do periodic comparison and
synchronizations to keep the two databases in sync - you can actually
use the command line utilities included to schedule those operations
to run at certain times.
Hope this helps
JC
http://www.xsqlsoftware.com
|||You might want to try AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
- you can easily compare data and/or structures of tables, procedures,
functions, views, triggers and relationships.
Comparison "sessions" can be saved and re-played later without the
need of re-entering the parameters.
Command line parameter can be used to fully automate comparisons.
SCT works with SQL Server 2005, 2000 and 7.0 and between these
versions.
Dariusz Dziewialtowski.

keep db's in sync

I have sql 2000 and sql 2005 on one test server while we test our apps
against SQL 2005. Is it possible to keep both version of the databases in
sync?
Since I can have more then one application hitting one database I want to
keep the databases having the same structure, data, etc on both the 2000
version and the 2005 server so if someone makes a table change on the 2000
database, I want that change to happen on the SQL 2005 server database as
well and without the developer going in and making the change and the same
with the data, if new data is entered in the 2000 db I want that data to be
inserted into the 2005 database.
How can I accomplish something like this?On Jun 7, 10:10 pm, "Mike" <M...@.community.nospam> wrote:
> I have sql 2000 and sql 2005 on one test server while we test our apps
> against SQL 2005. Is it possible to keep both version of the databases in
> sync?
> Since I can have more then one application hitting one database I want to
> keep the databases having the same structure, data, etc on both the 2000
> version and the 2005 server so if someone makes a table change on the 2000
> database, I want that change to happen on the SQL 2005 server database as
> well and without the developer going in and making the change and the sam
e
> with the data, if new data is entered in the 2000 db I want that data to b
e
> inserted into the 2005 database.
> How can I accomplish something like this?
Check Transactional Replication|||ok, what is it?
I'm no DBA, I actually got this project thrown on my lap. I do .NET
development and never did anything with SQL Server such as this. This is all
greek to me
"M A Srinivas" <masri999@.gmail.com> wrote in message
news:1181281869.391901.72760@.g37g2000prf.googlegroups.com...
> On Jun 7, 10:10 pm, "Mike" <M...@.community.nospam> wrote:
> Check Transactional Replication
>|||Did you search for "Transactional Replication" in Books Online? There are go
od information there.
Basically, you have a publisher (source database) and a subscriber. A low re
ader process regenerates
the modifications performed in the source database by reading the transactio
n log and store them in
a distribution database. Then a distributor process reads the distribution d
atabase and based on
that applies those modifications on the subscriber database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Mike" <Mike@.community.nospam> wrote in message news:OwxQi3cqHHA.484@.TK2MSFTNGP06.phx.gbl...

> ok, what is it?
> I'm no DBA, I actually got this project thrown on my lap. I do .NET develo
pment and never did
> anything with SQL Server such as this. This is all greek to me
> "M A Srinivas" <masri999@.gmail.com> wrote in message
> news:1181281869.391901.72760@.g37g2000prf.googlegroups.com...
>|||On Jun 8, 9:06 am, "Mike" <M...@.community.nospam> wrote:
> ok, what is it?
> I'm no DBA, I actually got this project thrown on my lap. I do .NET
> development and never did anything with SQL Server such as this. This is a
ll
> greek to me
> "M A Srinivas" <masri...@.gmail.com> wrote in messagenews:1181281869.391901
.72760@.g37g2000prf.googlegroups.com...
>
>
>
>
>
> - Show quoted text -
Hi Mike,
the transactional replication that Srinivas suggested will help you
keep the data in sync but not the schema - that is if you change a
table, a view, a stored procedure etc. the transactional replication
won't help.
You can check out our tools xSQL Object for comparing and
synchronizing the database schemas and xSQL Data Compare for comparing
and synchronizing the data. We give away a fully functional lite
edition - you can get it from http://www.xsqlsoftware.com
Those tools will allow you to do periodic comparison and
synchronizations to keep the two databases in sync - you can actually
use the command line utilities included to schedule those operations
to run at certain times.
Hope this helps
JC
http://www.xsqlsoftware.com|||You might want to try AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
- you can easily compare data and/or structures of tables, procedures,
functions, views, triggers and relationships.
Comparison "sessions" can be saved and re-played later without the
need of re-entering the parameters.
Command line parameter can be used to fully automate comparisons.
SCT works with SQL Server 2005, 2000 and 7.0 and between these
versions.
Dariusz Dziewialtowski.

keep db's in sync

I have sql 2000 and sql 2005 on one test server while we test our apps
against SQL 2005. Is it possible to keep both version of the databases in
sync?
Since I can have more then one application hitting one database I want to
keep the databases having the same structure, data, etc on both the 2000
version and the 2005 server so if someone makes a table change on the 2000
database, I want that change to happen on the SQL 2005 server database as
well and without the developer going in and making the change and the same
with the data, if new data is entered in the 2000 db I want that data to be
inserted into the 2005 database.
How can I accomplish something like this?On Jun 7, 10:10 pm, "Mike" <M...@.community.nospam> wrote:
> I have sql 2000 and sql 2005 on one test server while we test our apps
> against SQL 2005. Is it possible to keep both version of the databases in
> sync?
> Since I can have more then one application hitting one database I want to
> keep the databases having the same structure, data, etc on both the 2000
> version and the 2005 server so if someone makes a table change on the 2000
> database, I want that change to happen on the SQL 2005 server database as
> well and without the developer going in and making the change and the same
> with the data, if new data is entered in the 2000 db I want that data to be
> inserted into the 2005 database.
> How can I accomplish something like this?
Check Transactional Replication|||ok, what is it?
I'm no DBA, I actually got this project thrown on my lap. I do .NET
development and never did anything with SQL Server such as this. This is all
greek to me
"M A Srinivas" <masri999@.gmail.com> wrote in message
news:1181281869.391901.72760@.g37g2000prf.googlegroups.com...
> On Jun 7, 10:10 pm, "Mike" <M...@.community.nospam> wrote:
>> I have sql 2000 and sql 2005 on one test server while we test our apps
>> against SQL 2005. Is it possible to keep both version of the databases in
>> sync?
>> Since I can have more then one application hitting one database I want to
>> keep the databases having the same structure, data, etc on both the 2000
>> version and the 2005 server so if someone makes a table change on the
>> 2000
>> database, I want that change to happen on the SQL 2005 server database as
>> well and without the developer going in and making the change and the
>> same
>> with the data, if new data is entered in the 2000 db I want that data to
>> be
>> inserted into the 2005 database.
>> How can I accomplish something like this?
> Check Transactional Replication
>|||Did you search for "Transactional Replication" in Books Online? There are good information there.
Basically, you have a publisher (source database) and a subscriber. A low reader process regenerates
the modifications performed in the source database by reading the transaction log and store them in
a distribution database. Then a distributor process reads the distribution database and based on
that applies those modifications on the subscriber database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Mike" <Mike@.community.nospam> wrote in message news:OwxQi3cqHHA.484@.TK2MSFTNGP06.phx.gbl...
> ok, what is it?
> I'm no DBA, I actually got this project thrown on my lap. I do .NET development and never did
> anything with SQL Server such as this. This is all greek to me
> "M A Srinivas" <masri999@.gmail.com> wrote in message
> news:1181281869.391901.72760@.g37g2000prf.googlegroups.com...
>> On Jun 7, 10:10 pm, "Mike" <M...@.community.nospam> wrote:
>> I have sql 2000 and sql 2005 on one test server while we test our apps
>> against SQL 2005. Is it possible to keep both version of the databases in
>> sync?
>> Since I can have more then one application hitting one database I want to
>> keep the databases having the same structure, data, etc on both the 2000
>> version and the 2005 server so if someone makes a table change on the 2000
>> database, I want that change to happen on the SQL 2005 server database as
>> well and without the developer going in and making the change and the same
>> with the data, if new data is entered in the 2000 db I want that data to be
>> inserted into the 2005 database.
>> How can I accomplish something like this?
>> Check Transactional Replication
>|||On Jun 8, 9:06 am, "Mike" <M...@.community.nospam> wrote:
> ok, what is it?
> I'm no DBA, I actually got this project thrown on my lap. I do .NET
> development and never did anything with SQL Server such as this. This is all
> greek to me
> "M A Srinivas" <masri...@.gmail.com> wrote in messagenews:1181281869.391901.72760@.g37g2000prf.googlegroups.com...
>
> > On Jun 7, 10:10 pm, "Mike" <M...@.community.nospam> wrote:
> >> I have sql 2000 and sql 2005 on one test server while we test our apps
> >> against SQL 2005. Is it possible to keep both version of the databases in
> >> sync?
> >> Since I can have more then one application hitting one database I want to
> >> keep the databases having the same structure, data, etc on both the 2000
> >> version and the 2005 server so if someone makes a table change on the
> >> 2000
> >> database, I want that change to happen on the SQL 2005 server database as
> >> well and without the developer going in and making the change and the
> >> same
> >> with the data, if new data is entered in the 2000 db I want that data to
> >> be
> >> inserted into the 2005 database.
> >> How can I accomplish something like this?
> > Check Transactional Replication- Hide quoted text -
> - Show quoted text -
Hi Mike,
the transactional replication that Srinivas suggested will help you
keep the data in sync but not the schema - that is if you change a
table, a view, a stored procedure etc. the transactional replication
won't help.
You can check out our tools xSQL Object for comparing and
synchronizing the database schemas and xSQL Data Compare for comparing
and synchronizing the data. We give away a fully functional lite
edition - you can get it from http://www.xsqlsoftware.com
Those tools will allow you to do periodic comparison and
synchronizations to keep the two databases in sync - you can actually
use the command line utilities included to schedule those operations
to run at certain times.
Hope this helps
JC
http://www.xsqlsoftware.com|||You might want to try AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
- you can easily compare data and/or structures of tables, procedures,
functions, views, triggers and relationships.
Comparison "sessions" can be saved and re-played later without the
need of re-entering the parameters.
Command line parameter can be used to fully automate comparisons.
SCT works with SQL Server 2005, 2000 and 7.0 and between these
versions.
Dariusz Dziewialtowski.