Friday, March 30, 2012
scripting
mulitple databases on their respective servers. My question is concerned
with updating the multiple databases to keep the schemas the same. I am
using scripts generate using the Create Script command in Enterprise Manager
to create a script to drop and create all the functions, views and procs and
that works without any problem. My question is how to deal with the tables.
Is there some method for automatically creating a script that will add
missing tables and modify exiiting ones based on the source tables
collection. I don't want to use drop and create as for the functions, etc,
because I will lose all the data in the tables. The database schemas must b
e
the same but the data in each is different. If I have to create the script
by hand, it is just as easy to modify the tables by hand so what I am lookin
g
for is a command that says, "make all the tables the same"
JBJB
http://www.karaszi.com/SQLServer/in...rate_script.asp
"JB" <JB@.discussions.microsoft.com> wrote in message
news:3126220C-6899-4EDB-92C5-F3CB34AC9017@.microsoft.com...
>I am a developer working with an application that requires connections with
> mulitple databases on their respective servers. My question is concerned
> with updating the multiple databases to keep the schemas the same. I am
> using scripts generate using the Create Script command in Enterprise
> Manager
> to create a script to drop and create all the functions, views and procs
> and
> that works without any problem. My question is how to deal with the
> tables.
> Is there some method for automatically creating a script that will add
> missing tables and modify exiiting ones based on the source tables
> collection. I don't want to use drop and create as for the functions,
> etc,
> because I will lose all the data in the tables. The database schemas must
> be
> the same but the data in each is different. If I have to create the
> script
> by hand, it is just as easy to modify the tables by hand so what I am
> looking
> for is a command that says, "make all the tables the same"
>
> --
> JB|||You may find some of the Comparison tools useful. Most of them will compare,
and then create scripts to rectify the differences.
Object Comparison:
AdeptSQL Diff
AlfaAlfa Software - SQL Server Comparison Tool
ApexSQL - SQL Diff
Best SoftTool - SQL DBCompare
e-Dule - DB SynchroComp
PrimeLogics - DataVision 2007
Quest - SchemaCompare
RAC4SQL's QALite (Free)
Red Gate - SQL Compare
SQL Effects Clarity
TASC - SQL Delta
Teratrax Database Compare
TulsaSoft - SQL Examiner
Voltex Data Systems - SQLDBcontrol
XpressApps - sqlXpress Diff
xSQL Software - xSQL Object
Free Tools
RAC4SQL's QALite (Free)
SQL Effects Clarity CE Edition
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"JB" <JB@.discussions.microsoft.com> wrote in message
news:3126220C-6899-4EDB-92C5-F3CB34AC9017@.microsoft.com...
>I am a developer working with an application that requires connections with
> mulitple databases on their respective servers. My question is concerned
> with updating the multiple databases to keep the schemas the same. I am
> using scripts generate using the Create Script command in Enterprise
> Manager
> to create a script to drop and create all the functions, views and procs
> and
> that works without any problem. My question is how to deal with the
> tables.
> Is there some method for automatically creating a script that will add
> missing tables and modify exiiting ones based on the source tables
> collection. I don't want to use drop and create as for the functions,
> etc,
> because I will lose all the data in the tables. The database schemas must
> be
> the same but the data in each is different. If I have to create the
> script
> by hand, it is just as easy to modify the tables by hand so what I am
> looking
> for is a command that says, "make all the tables the same"
>
> --
> JB
scripting
mulitple databases on their respective servers. My question is concerned
with updating the multiple databases to keep the schemas the same. I am
using scripts generate using the Create Script command in Enterprise Manager
to create a script to drop and create all the functions, views and procs and
that works without any problem. My question is how to deal with the tables.
Is there some method for automatically creating a script that will add
missing tables and modify exiiting ones based on the source tables
collection. I don't want to use drop and create as for the functions, etc,
because I will lose all the data in the tables. The database schemas must be
the same but the data in each is different. If I have to create the script
by hand, it is just as easy to modify the tables by hand so what I am looking
for is a command that says, "make all the tables the same"
JB
JB
http://www.karaszi.com/SQLServer/info_generate_script.asp
"JB" <JB@.discussions.microsoft.com> wrote in message
news:3126220C-6899-4EDB-92C5-F3CB34AC9017@.microsoft.com...
>I am a developer working with an application that requires connections with
> mulitple databases on their respective servers. My question is concerned
> with updating the multiple databases to keep the schemas the same. I am
> using scripts generate using the Create Script command in Enterprise
> Manager
> to create a script to drop and create all the functions, views and procs
> and
> that works without any problem. My question is how to deal with the
> tables.
> Is there some method for automatically creating a script that will add
> missing tables and modify exiiting ones based on the source tables
> collection. I don't want to use drop and create as for the functions,
> etc,
> because I will lose all the data in the tables. The database schemas must
> be
> the same but the data in each is different. If I have to create the
> script
> by hand, it is just as easy to modify the tables by hand so what I am
> looking
> for is a command that says, "make all the tables the same"
>
> --
> JB
|||You may find some of the Comparison tools useful. Most of them will compare,
and then create scripts to rectify the differences.
Object Comparison:
AdeptSQL Diff
AlfaAlfa Software - SQL Server Comparison Tool
ApexSQL - SQL Diff
Best SoftTool - SQL DBCompare
e-Dule - DB SynchroComp
PrimeLogics - DataVision 2007
Quest - SchemaCompare
RAC4SQL's QALite (Free)
Red Gate - SQL Compare
SQL Effects Clarity
TASC - SQL Delta
Teratrax Database Compare
TulsaSoft - SQL Examiner
Voltex Data Systems - SQLDBcontrol
XpressApps - sqlXpress Diff
xSQL Software - xSQL Object
Free Tools
RAC4SQL's QALite (Free)
SQL Effects Clarity CE Edition
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"JB" <JB@.discussions.microsoft.com> wrote in message
news:3126220C-6899-4EDB-92C5-F3CB34AC9017@.microsoft.com...
>I am a developer working with an application that requires connections with
> mulitple databases on their respective servers. My question is concerned
> with updating the multiple databases to keep the schemas the same. I am
> using scripts generate using the Create Script command in Enterprise
> Manager
> to create a script to drop and create all the functions, views and procs
> and
> that works without any problem. My question is how to deal with the
> tables.
> Is there some method for automatically creating a script that will add
> missing tables and modify exiiting ones based on the source tables
> collection. I don't want to use drop and create as for the functions,
> etc,
> because I will lose all the data in the tables. The database schemas must
> be
> the same but the data in each is different. If I have to create the
> script
> by hand, it is just as easy to modify the tables by hand so what I am
> looking
> for is a command that says, "make all the tables the same"
>
> --
> JB
scripting
mulitple databases on their respective servers. My question is concerned
with updating the multiple databases to keep the schemas the same. I am
using scripts generate using the Create Script command in Enterprise Manager
to create a script to drop and create all the functions, views and procs and
that works without any problem. My question is how to deal with the tables.
Is there some method for automatically creating a script that will add
missing tables and modify exiiting ones based on the source tables
collection. I don't want to use drop and create as for the functions, etc,
because I will lose all the data in the tables. The database schemas must be
the same but the data in each is different. If I have to create the script
by hand, it is just as easy to modify the tables by hand so what I am looking
for is a command that says, "make all the tables the same"
--
JBJB
http://www.karaszi.com/SQLServer/info_generate_script.asp
"JB" <JB@.discussions.microsoft.com> wrote in message
news:3126220C-6899-4EDB-92C5-F3CB34AC9017@.microsoft.com...
>I am a developer working with an application that requires connections with
> mulitple databases on their respective servers. My question is concerned
> with updating the multiple databases to keep the schemas the same. I am
> using scripts generate using the Create Script command in Enterprise
> Manager
> to create a script to drop and create all the functions, views and procs
> and
> that works without any problem. My question is how to deal with the
> tables.
> Is there some method for automatically creating a script that will add
> missing tables and modify exiiting ones based on the source tables
> collection. I don't want to use drop and create as for the functions,
> etc,
> because I will lose all the data in the tables. The database schemas must
> be
> the same but the data in each is different. If I have to create the
> script
> by hand, it is just as easy to modify the tables by hand so what I am
> looking
> for is a command that says, "make all the tables the same"
>
> --
> JB|||You may find some of the Comparison tools useful. Most of them will compare,
and then create scripts to rectify the differences.
Object Comparison:
AdeptSQL Diff
AlfaAlfa Software - SQL Server Comparison Tool
ApexSQL - SQL Diff
Best SoftTool - SQL DBCompare
e-Dule - DB SynchroComp
PrimeLogics - DataVision 2007
Quest - SchemaCompare
RAC4SQL's QALite (Free)
Red Gate - SQL Compare
SQL Effects Clarity
TASC - SQL Delta
Teratrax Database Compare
TulsaSoft - SQL Examiner
Voltex Data Systems - SQLDBcontrol
XpressApps - sqlXpress Diff
xSQL Software - xSQL Object
Free Tools
RAC4SQL's QALite (Free)
SQL Effects Clarity CE Edition
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"JB" <JB@.discussions.microsoft.com> wrote in message
news:3126220C-6899-4EDB-92C5-F3CB34AC9017@.microsoft.com...
>I am a developer working with an application that requires connections with
> mulitple databases on their respective servers. My question is concerned
> with updating the multiple databases to keep the schemas the same. I am
> using scripts generate using the Create Script command in Enterprise
> Manager
> to create a script to drop and create all the functions, views and procs
> and
> that works without any problem. My question is how to deal with the
> tables.
> Is there some method for automatically creating a script that will add
> missing tables and modify exiiting ones based on the source tables
> collection. I don't want to use drop and create as for the functions,
> etc,
> because I will lose all the data in the tables. The database schemas must
> be
> the same but the data in each is different. If I have to create the
> script
> by hand, it is just as easy to modify the tables by hand so what I am
> looking
> for is a command that says, "make all the tables the same"
>
> --
> JB
Monday, March 26, 2012
Script to kill all user connections to a db except three
SQL 2000 Database needs all user connections terminated to it except
three. These need to be kept running for a job ran later on.
Is anyone aware of a script that will recursively go through all the
connections to a specific database and kill all processes except the
ones we want to remain intact ?
Please let me know if you need any more information
Thanks in advance
PaulYou can use the one at http://www.dbmaint.com/util_proc.asp as a starting po
int...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<paullie69@.hotmail.com> wrote in message
news:1173778649.068899.204390@.64g2000cwx.googlegroups.com...
> Hi guru's
> SQL 2000 Database needs all user connections terminated to it except
> three. These need to be kept running for a job ran later on.
> Is anyone aware of a script that will recursively go through all the
> connections to a specific database and kill all processes except the
> ones we want to remain intact ?
> Please let me know if you need any more information
> Thanks in advance
> Paul
>|||ALTER DATABASE .... SET SINGLE_USER WITH ROLLBACK IMMEDIATE
<paullie69@.hotmail.com> wrote in message
news:1173778649.068899.204390@.64g2000cwx.googlegroups.com...
> Hi guru's
> SQL 2000 Database needs all user connections terminated to it except
> three. These need to be kept running for a job ran later on.
> Is anyone aware of a script that will recursively go through all the
> connections to a specific database and kill all processes except the
> ones we want to remain intact ?
> Please let me know if you need any more information
> Thanks in advance
> Paul
>
Script to kill all user connections to a db except three
SQL 2000 Database needs all user connections terminated to it except
three. These need to be kept running for a job ran later on.
Is anyone aware of a script that will recursively go through all the
connections to a specific database and kill all processes except the
ones we want to remain intact ?
Please let me know if you need any more information
Thanks in advance
Paul
ALTER DATABASE .... SET SINGLE_USER WITH ROLLBACK IMMEDIATE
<paullie69@.hotmail.com> wrote in message
news:1173778649.068899.204390@.64g2000cwx.googlegro ups.com...
> Hi guru's
> SQL 2000 Database needs all user connections terminated to it except
> three. These need to be kept running for a job ran later on.
> Is anyone aware of a script that will recursively go through all the
> connections to a specific database and kill all processes except the
> ones we want to remain intact ?
> Please let me know if you need any more information
> Thanks in advance
> Paul
>
Script to kill all user connections to a db except three
SQL 2000 Database needs all user connections terminated to it except
three. These need to be kept running for a job ran later on.
Is anyone aware of a script that will recursively go through all the
connections to a specific database and kill all processes except the
ones we want to remain intact ?
Please let me know if you need any more information
Thanks in advance
PaulYou can use the one at http://www.dbmaint.com/util_proc.asp as a starting point...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<paullie69@.hotmail.com> wrote in message
news:1173778649.068899.204390@.64g2000cwx.googlegroups.com...
> Hi guru's
> SQL 2000 Database needs all user connections terminated to it except
> three. These need to be kept running for a job ran later on.
> Is anyone aware of a script that will recursively go through all the
> connections to a specific database and kill all processes except the
> ones we want to remain intact ?
> Please let me know if you need any more information
> Thanks in advance
> Paul
>|||ALTER DATABASE .... SET SINGLE_USER WITH ROLLBACK IMMEDIATE
<paullie69@.hotmail.com> wrote in message
news:1173778649.068899.204390@.64g2000cwx.googlegroups.com...
> Hi guru's
> SQL 2000 Database needs all user connections terminated to it except
> three. These need to be kept running for a job ran later on.
> Is anyone aware of a script that will recursively go through all the
> connections to a specific database and kill all processes except the
> ones we want to remain intact ?
> Please let me know if you need any more information
> Thanks in advance
> Paul
>
Friday, March 23, 2012
Script to check inactive db connections
Thanks,
Warren
DECLARE @.sql varchar(4000)
WHILE 1=1
BEGIN
SET @.sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
GETDATE()) >= 6
AND spid <> @.@.spid AND spid >= 50)
IF @.sql IS NULL BREAK
EXEC (@.sql)
END
Just schedule it as a job to run at regular intervals. It kills all
processes that have been inactive for more than 6 hours.
Jacco Schalkwijk
SQL Server MVP
"Warren" <anonymous@.discussions.microsoft.com> wrote in message
news:AFF451DE-ADDC-4244-B10A-697A37706CFC@.microsoft.com...
> Does anyone have a script I can automate that will 1) Check for inactive
db connections, 2) Kill those inactive db connections?
> Thanks,
> Warren
|||Thanks Jacco!!!!
Warren
Script to check inactive db connections
connections, 2) Kill those inactive db connections?
Thanks,
WarrenDECLARE @.sql varchar(4000)
WHILE 1=1
BEGIN
SET @.sql = (SELECT TOP 1 'KILL ' + CAST(spid AS VARCHAR(10))
FROM master.dbo.sysprocesses WHERE DATEDIFF(hh, last_batch,
GETDATE()) >= 6
AND spid <> @.@.spid AND spid >= 50)
IF @.sql IS NULL BREAK
EXEC (@.sql)
END
Just schedule it as a job to run at regular intervals. It kills all
processes that have been inactive for more than 6 hours.
Jacco Schalkwijk
SQL Server MVP
"Warren" <anonymous@.discussions.microsoft.com> wrote in message
news:AFF451DE-ADDC-4244-B10A-697A37706CFC@.microsoft.com...
> Does anyone have a script I can automate that will 1) Check for inactive
db connections, 2) Kill those inactive db connections?
> Thanks,
> Warren|||Thanks Jacco!!!!
Warren
Tuesday, March 20, 2012
Script Question: Getting data from SQL Server
I am trying to fill a DataTable with values from SQL server in SSIS. I just can't get the hang of the connections inside SSIS. I tried taking the example in BOL for "Script component [Integration Services], source components" and adapting to my needs but sqlReader doesn't seem to have the ability to use fill to populate a DataTable - so I tried changing to sqlAdapter and can't get it to work. (I get error about connection not being closed or object reference not set to instance of object) Thanks in advance for all the help...
Imports SystemImports System.Data
Imports System.Math
Imports System.Data.SqlClient
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports System.Xml
Public Class ScriptMain
Inherits UserComponent
Dim connMgr As IDTSConnectionManager90
Dim sqlConn As SqlConnection
Dim sqlQuery As SqlCommand
Dim sqlDataHolder As SqlDataAdapter
Dim dtLookup As DataTable = New DataTable()
Public Overrides Sub AcquireConnections(ByVal Transaction As Object)
connMgr = Me.Connections.ADOLOOKUP
sqlConn = CType(connMgr.AcquireConnection(Nothing), SqlConnection)
End Sub
Public Overrides Sub PreExecute()
Dim LookupSql As String
LookupSql = "SELECT "
LookupSql += "* "
LookupSql += "FROM "
LookupSql += "Table "
LookupSql += "WHERE "
LookupSql += "TypeID = " & Me.Variables.TypeID
sqlConn.Open()
sqlQuery.CommandText = LookupSql
sqlQuery.Connection = sqlConn
sqlDataHolder.SelectCommand = sqlQuery
sqlDataHolder.Fill(dtLookup)
sqlConn.Close()
End Sub
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
' Lookup stuff here
End Sub
End Class
Connections are not the problem here. Creating objects is.
You've created variables of type SqlCommand and SqlDataAdapter, but are not instantiating them.
Try something like the following and you'll get a lot closer to what you're looking for.
If Not sqlConn.State = ConnectionState.Open ThensqlConn.Open()
End If
sqlQuery = New SqlCommand()
sqlQuery.CommandText = LookupSql
sqlQuery.Connection = sqlConn
sqlDataHolder = New SqlDataAdapter()
sqlDataHolder.SelectCommand = sqlQuery
sqlDataHolder.Fill(dtLookup)
sqlConn.Close()
By the way, is the reason for this component to overcome the fact that you can't parameterize a fully cached lookup (without a lot of schenanigans involving stage table, or views, or TVFS)?
|||The reason is I have a large dataset (around 1 million rows) and a relatively small lookup table (depending on the variable between 3 and 1500 rows). The problem is the lookup is range based on date time (time >= lookup.starttime and time < lookup.endtime). Basically a record comes in and I have to assign it to a "timeslice" based on the lookup (the size of the timeslice is stored in the variable you see in the lookup).
If I use the standard SSIS lookup and change the sql within, its hideously slow as its making 1 million sql calls - so I am attempting to pull the whole lookup table into memory and instead lookup on that.
Thanks for the info on instantiating... that did the trick.
Wednesday, March 7, 2012
Script Component Connection Management
Greetings, and Happy Friday. I want to check myself in regards to the proper use of connections in a data flow script component being used as a transformation. I want to ensure that the solution is ideal from a performance standpoint, but more importantly that there won't be any resource leaks from connections that are not being closed or objects that are not being disposed properly.
This transformation script component is writing to a table based on the rows that pass through Input0_ProcessInputRow(). What I'm doing so far is, in the script component script, I've declared a class-level variable of type System.Data.SqlClient.SqlConnection. In the PreExecute() event handler I am initializing this connection with the following code (which comes after the call to MyBase.PreExecute()):
Dim connMgr As IDTSConnectionManager90
connMgr = Me.Connections.JobDB
adoConn = CType(connMgr.AcquireConnection(Nothing), SqlClient.SqlConnection)
If adoConn.State <> ConnectionState.Open Then
adoConn.Open()
End If
connMgr = Nothing
The adoConn variable referred to there is the class-level variable. So, my first questions:
Is this the best way to initialize the connection? And is that code checking adoConn.State necessary? Can I pretty much assume that the connection manager is going to give me an open connection?
Then in the PostExecute() event handler I have this code (again, after the MyBase call):
If Not (adoConn Is Nothing) Then
If adoConn.State = ConnectionState.Open Then
adoConn.Close()
End If
adoConn.Dispose()
adoConn = Nothing
End If
Next questions:
Is this adoConn variable actually holding a reference to an object whose primary owner is in the connection manager? Is it necessary to close my SqlConnection this way, or is that going to actually close the connection manager's connection?
I'm also wondering whether I need to have this same code in the script component's Finalize() handler also...if there's an error I don't want the resource to leak. Or will PostExecute() fire even if there's an error in Input0_ProcessInputRow()?
Thanks in advance,
Dan
Not necessarily in order:
The ADO.NET Connection Manager returns an open connection object. I would rely on it to do its job and assume a problem with the connection manager if by chance you get a connection object that not's open.
I would also rely on the connection manager to do its work afterwards. I suggest that you call ReleaseConnection rather than closing the connection directly.
While it's correct to use PreExecute and PostExecute for things that you only need to do once, you're not taking full advantage of the Integration Services component architecture by (apparently) collapsing a source, a transformation, and a destination into a single component. You may find that all three pieces will be more flexible, and more easily adapted for use elsewhere, if you separate them out. Otherwise, in a sense, you have little more than an ADO.NET application wrapped with the overhead of the SSIS runtime.
The ReleaseConnection method of the connection manager should be taking care of Dispose/Finalize housekeeping.
-Doug
|||I would also rely on the connection manager to do its work afterwards. I suggest that you call ReleaseConnection rather than closing the connection directly.
Thank you. I will look into ReleaseConnection.
you're not taking full advantage of the Integration Services component architecture by (apparently) collapsing a source, a transformation, and a destination into a single component.
This is a keen observation, and one I'd like to discuss further if you're open
to it. I struggled with finding the best design for this particular situation that fits within the SSIS paradigm and built-in tools. Believe me, if I thought there was a better way than using a script component, I would embrace it, becuase I've been struggling with getting the DataSet caching, managed by PreExecute and PostExecute, to work. If you were to peek into the other parts of my SSIS packages, you would find I think traditional uses of lookups and derivations and unions and destinations.
My situation is that I have a row from a tab-delimited text file flowing through this dataflow that, among 185 other fields, has five fields in it that are not normalized. That is, these five fields each contain a comma-delimited string of value codes. Another way to say it is that these are multi-value fields.
So each mutli-value field must be parsed, and then each sub-value must be looked up in a mapping table. I don't think there's a straightforward way to do that using the built-in transformations.
I can imagine what you might be thinking at this point as an obvious solution, but the kicker is that in advance I will never be able to know how many subvalues any of these five fields could have. There could be anywhere from zero to a dozen for a given row and field. So that makes it tough to use the Derived Column transformation to just parse them and add new columns, because I can't know in advance how many columns will be needed to add.
Furthermore, downstream from that I would not know how many Lookup transformations to create to resolve the values. Perhaps some kind of "Foreach" functionality at the field level within the dataflow would be helpful in a future SSIS version, but in the meantime it seems to me the script component is where it's at.
Thoughts welcome, and thanks again, Doug, for your input on connection management.
Dan
|||
It sounds like what you're really designing is a source (more than a transformation), that needs to parse the multi-valued columns before presenting the data to the Data Flow.
The metadata-driven solution that would be the ideal theoretical solution would be possible using the Integration Services object model, but would require a heck of a lot more lines of code than you now have in your Script component. While lots of users have been asking about self-configuring packages that are driven by run-time metadata, I don't believe I've seen any examples of this yet. Changes in a source ripple all the way downstream through the data flow, so it would not be nearly so simple as just changing (programmatically) the number of output columns coming out of your source.
(As an aside: The IS team took great pains to prevent access from any one component to the package object model and to other components, beyond what was absolutely necessary, like variables and connections. However in Service Pack 1 a means will be provided (IDtsPipelineEnvironmentService) to give custom data flow components programmatic access to the parent data flow task and other objects in it. This would enable a custom solution along the lines of the Load SCD Wizard, which creates transformations etc. as needed...or like a custom source that creates or configures downstream Derived Column and Lookup transformations as needed.)
More clever minds may offer you more clever solutions. :-)
Best wishes,
-Doug
Script : Clear connections on a database
I would like to do some manipulations on a database, can someone tell
me how do I do to script the clear connections on a database
Thanks,
Stefanuse master
go
alter database [db_name] set {single_user | restricted_user} with rollback
immediate
go
WBR, Evergray
--
Words mean nothing...
"Stefan" <maltistefan@.yahoo.co.nz> wrote in message
news:1141896358.903551.201090@.i39g2000cwa.googlegroups.com...
> Hi there,
> I would like to do some manipulations on a database, can someone tell
> me how do I do to script the clear connections on a database
> Thanks,
> Stefan
>