Is there a SP or scripted task that I can use to backup a single tables contents to a file? Then I also need to script the table with all foreign dependancies and all custom data types too.
I have a 6+ GB database that I need to download from a clients servers and restore on mine for testing and development of a new project for them.
I could backup the entire database but it may take too long and put too much of a resource drain on their servers as users are online almost 24/7.
Thanks
Last edited by RobDog888; Mar 2nd, 2008 at 03:14 PM.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Finally got back to this as I have Server 2008 installed with SQL Server 2005 SP-2. I restored the database's but there is a common sql user account that I need to reattach to a new account on my sql server instance but I cant create the user account as the dbs have it from the backup.
How can I purge them or create a new account using the same name and relink the two?
I'm sure it has to do with the SID being diffferent between servers.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Bah! I had that user account still associated with another database. Thats why I thought there was still something retained in the db. I have 3 SQL databases that I downloaded and restored all with the same user account. I deleted from two but forgot the third. Guess thats multitasking for you.
Ok, one more issue. I need to still be able to connect from one workstation (XP) to the sql server in a workgroup environment. My connection string is valid but I think it may be permission issues now.
I have the user set as dbo on the 3 databases now and still I cant connect.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
We've had a couple of these workstation authentication threads in the past month or so.
I believe they were resolved by enabling SQL Authentication and adding a SQL login.
I'm not 100% sure but I believe that Windows Authentication only works on a domain (I've only ever had domains - so I cannot know for sure - only based on what the posters have had issues with).
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Yes, I have it setup as "SQL Server and Windows Authentication mode" as SQL only is no longer available under 2005. The concerned login account assigned as dbo of the three dbs is a sql user account.
We've had a couple of these workstation authentication threads in the past month or so.
I believe they were resolved by enabling SQL Authentication and adding a SQL login.
I'm not 100% sure but I believe that Windows Authentication only works on a domain (I've only ever had domains - so I cannot know for sure - only based on what the posters have had issues with).
Just like he said Windows Authentication works only on domains.
Also most of the connection errors in the SQL is caused by networking issues mostly.
Try pinging the computer name of the database server and see if it returns any requests.
I'm not sure about your connection string - but I don't want to lead you down a bad path - if it worked before it's probably an authentication/networking issue.
Our VB6 connections are made like this:
Code:
If strDriver = "" Then
strDriver = "SQLOLEDB"
End If
'Create a connection to the database
Set gCn = New ADODB.Connection
gCn.Provider = strDriver
gCn.Properties("Data Source").Value = strServer
gCn.Properties("Initial Catalog").Value = strDatabase
If gstrUser <> "" Then
gCn.Properties("User Id").Value = gstrUser
gCn.Properties("Password").Value = gstrPassWord
Else
gCn.Properties("Integrated Security").Value = "SSPI"
End If
SQLOLEDB is the driver for our MDAC/VB6 apps
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
What I will need to do is create a new instance of SQL 2005 with the correct collations, apply SP2, detach and attach databases, ensure that logins are correct, make changes on Team Foundation Application Tier, etc, etc.
That is alot of work, plus the added (and needless) overhead of another SQL 2005 instance. *Sigh*
Guess I will have to try reinstalling damn sql 2005, sp-2 and reselect a different collation. I had choosen the default one but noooo!
I had turned off the firewall on server 2008, created my user account with the same name as whats on my XP box, added it to the admin group and yet still cant connect.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Hmm Im thinking of just reformatting the server and downgrading it with installing 2003 R2 and then reinstall sql 2005 sp-2. I will make sure the collations match this time. For some reason I rebooted the server and the collation issue seems to have gone away.
If your connectionstring passes an appropriate user account it shouldnt matter if its in a workgroup or domain but the ability for one system to access the other is crucial. I thinkaccess is not an issue as I can see the server in net neighborhood and even logon.
Just a bit stumped here on this one.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
I figure I should post the solution to the connection issue.
For whatever reason when installing SQL 2005 on Server 2008, it disabled TCP and Pipes. I had to go into the SQL server Configuration Utility and enable them and thn programmatically connecting to them is good.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.