Showing posts with label unfortunately. Show all posts
Showing posts with label unfortunately. Show all posts

Thursday, March 22, 2012

Creating a table script that includes the data in the table

Hello,

I'm having a bear of a time moving my data from one database to another. Unfortunately both these databases are at webhosting providers so I don't readily have access to backup images. I might be able to get the new provider to put the backup image somewhere where I can reach it but the old provider is playing dead so I can't get to any backup image I could generate.

I've tried using Enterprise Manager for SQL2000 to move data from one to another. This grinds away for a while and eventually errors out with permission problems. I will try this again tonight as the provider has attempted to give me the needed permissions. In the meantime I'd like to try to pull the data out of the database just in case it goes belly-up. I've tried to create a script for my tables but all I get is the table structure, no data.

I don't have access to a full Enterprise Manager right now, only SQL Server Management Studio Express (someone needs to shorten that name :).

I'm a big SQL Server fan but it sure is easy to create one big SQL script for a MySQL databsae that you pull out of one db and apply to another one. Poof! Cloned copy. How do I do this with MSSQL and freely available tools? Command line is fine. Surely this is a problem that people have all the time?

Thanks,

Sander

Hi,

for a TSQL solution this could do the trick for you:

http://vyaskn.tripod.com/code.htm#inserts

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||Hello,

thanks for posing this solution! I succeeded in the meantime to copy the data using EM but I still want this tool to work so I'll give that a try as well.

Thanks,

Sander

Monday, March 19, 2012

Creating a publication

Hi,
I've come across this one before in one of the threads, unfortunately for me the author managed to figure it out for his/her self and there for no answer was posted, so can anybody help PLEASE?

Creating Publication

- Creating Publication 'SQLMobile' (Error)
Messages
* SQL Server could not create publication 'SQLMobile'. (New Publication Wizard)

ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Invalid object name 'dbo.sysmergepublications'.
Publication 'SQLMobile' does not exist.
Changed database context to 'SQLMobile'. (Microsoft SQL Server, Error: 208)

Its been created via UI

on SQL2005
the distributor is correctly installed

i also have not tried creating a publication on any other database.....this is the first.

Any Ideas?

try this

sp_replicationdboption 'SQLMobile','merge publish','true'

Creating a publication

Hi,
I've come across this one before in one of the threads, unfortunately for me the author managed to figure it out for his/her self and there for no answer was posted, so can anybody help PLEASE?

Creating Publication

- Creating Publication 'SQLMobile' (Error)
Messages
* SQL Server could not create publication 'SQLMobile'. (New Publication Wizard)

ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Invalid object name 'dbo.sysmergepublications'.
Publication 'SQLMobile' does not exist.
Changed database context to 'SQLMobile'. (Microsoft SQL Server, Error: 208)

Its been created via UI

on SQL2005
the distributor is correctly installed

i also have not tried creating a publication on any other database.....this is the first.

Any Ideas?

try this

sp_replicationdboption 'SQLMobile','merge publish','true'