User Instances / AttachDBFile

Forum for users of SQL Toolkit 3,4,and 5

User Instances / AttachDBFile

Postby vivus » Thu Jan 12, 2006 12:14 am

will the new 4.0 beta support Syncing with user instances and attachDBFile?

is there an rss feed or email list when the new 4.0 is released and will it be compatible with the 2.0 framework?

Deepest Regards,
Michael
vivus
 
Posts: 3
Joined: Wed Jan 04, 2006 4:09 pm
Location: Charlottesville, Va

Postby Brian Donahue » Tue Jan 24, 2006 6:23 pm

Hello,

All of the programs in SQL Bundle 4.0 are compatible with .NET Framework 2.0. They require Framework 1.1, which is the Framework version they're targeted at.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Tue Jan 24, 2006 6:54 pm

Attachfile seems to work, but it's officially unsupported by the software. To get it working, you can enter the name of a SQL Server 2005 into the server box, followed by the attachdbfilename command:
Code: Select all
BRIAN\\SQL2005;AttachDBFileName=c:\\temp\\mydb.mdf

You will need a powerful account (probably sa) to log into the SQL Server 2005 in the logon credentials in SQL Compare, and also a database name to attach the file as. SQL Server 2005 will then attach the file to the server and you can compare it as a database.

This saves you the additional step of attaching the file using the Management Studio before using SQL Compare/Data Compare to compare the database in the file.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Still cant get this to work

Postby jprice2269 » Thu Dec 13, 2007 12:15 am

I create a string to hold the name of the database and the attach string property, and, even though I test to make sue the file exists, the register command still says it doesnt... Any ideas?

Public Sub SourceDatabase(ByVal serverName As String, ByVal databaseName As String, ByVal userName As String, ByVal password As String)
Dim _connectionProperties As Engine.ConnectionProperties

Dim _combinedServerName As String

m_db1 = New Engine.Database

If FileIO.FileSystem.FileExists(databaseName) Then
_combinedServerName = String.Concat(serverName, "; AttachDBFileName=", databaseName)
databaseName = "Source"
Else
_combinedServerName = serverName
End If

If String.IsNullOrEmpty(userName) Then
_connectionProperties = New Engine.ConnectionProperties(_combinedServerName, databaseName)
_connectionProperties.IntegratedSecurity = True
Else
_connectionProperties = New Engine.ConnectionProperties(serverName, databaseName, userName, password)
End If

m_db1.Register(_connectionProperties, m_engineOptions)
End Sub
jprice2269
 
Posts: 7
Joined: Sun Dec 02, 2007 4:52 pm


Return to SQL Toolkit Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests