Showing posts with label entire. Show all posts
Showing posts with label entire. Show all posts

Tuesday, March 27, 2012

Exporting from MSDE to SQL Server

Hi All,

I recently created my entire site before even starting to look at hosting providers. It's a very complex ASP.NET e-Commerce site built on SQL Server. I've (nearly) got it to a point where I want it to go live.

I found a host that caters for all my needs and is a good price. What I need to do now is migrate all my data, as well as all my tables and stored procedures, into the database with my host.

Is there an easy wy to go about this?

- Mina

I would install SQL Server backup your databases and restore it in SQL Server with same name if you use the restore from Device option in the backup wizard and SQL Server will move everything for you including permissions. Then moving to the host provider will be easy because SQL Sever Enterprise Manager is needed to move your databases with most Host Companies. Hope this helps.|||You need to talk to your hosting provider -- the easiest way toaccomplish this will be to simply send them the detached MDF and LDFfiles and have the provider attach them. Whether or not they'rewilling to do that is another questionBig Smile [:D]

Sunday, March 25, 2012

Exporting DB as SQL using SQL Server 2005

Hi all,

I have a MSSQL database running on my SQL 2005 server and I want to export the entire contents to a file as SQL statements with INSERT statements. How do I do this?

I've discovered how to export the contents as a flat comma deliminiated file (although only one table at a time) and how to export the CREATE statements in SQL for each table but so far I cannot find a way to just export the entire DB as SQL.

Thanks!

There are no SQL Server tools that will create the INSERT statements for you...but it should be fairly staightforward to create a C# program that would gererate the CREATE TABLE statements using SMO and then code to retrieve the data for generating the INSERT statements.

Thanks,

Peter Saddow

|||

Hi,

tzake a look at this one here: http://vyaskn.tripod.com/code/generate_inserts_2005.txt

Just to give you an example SMO for creating table scripts (DDL) is quite easy, that a sample posted a few days ago:

string Script = new Microsoft.SqlServer.Management.Smo.Server(".").Databases["Adventureworks"].Tables["SomeTable"].Script();

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Friday, February 24, 2012

Export to Excel

Hi,
I am new to reporting services. From the HTML toolbar, if i try to export to
excel... i get the entire report. eg. if i have 3 sections in the report
s1 - header
s2- data
s3 - footer
all 3 of them are exported to excel.
I want to export only the data section (s2).
Is that possible. Please let me know.Its something like SSRS takes (whatever is displayed) it in excel. Generally
what I do is that I copy the same report give a seperate name and in that
report I remove header and footer and in the original report I provide a link
called "Export to Excel" and in the action you should give URL access syntax
for excel.
Ofcourse this is one of the method you can use.
Amarnath
"Gaurav" wrote:
> Hi,
> I am new to reporting services. From the HTML toolbar, if i try to export to
> excel... i get the entire report. eg. if i have 3 sections in the report
> s1 - header
> s2- data
> s3 - footer
> all 3 of them are exported to excel.
> I want to export only the data section (s2).
> Is that possible. Please let me know.
>

Friday, February 17, 2012

export SQLServer2000 DB to Access

is there a simple way to remotely (using a ColdFusion application that can
access the database) making a copy of an entire SQLServer2000 database into
Access?
I can make an Access DB with empty tables that match the SQLServer tables,
they only have to be filled.
Somebody suggested this
insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'c:\myaccessdb.mdb';;,mytable) select * from mytable
but it is possible that this only runs with SQLServer2005 ... because it
requires enabling the Ad Hoc Distributed Queries feature which was
introduced with SQLServer2005 ... or can I run statements like this also in
SQLServer2000 ?
-MichaelMichael
1)DTS doesnt work?
2)
INSERT INTO OPENDATASOURCE(
'Microsoft.Jet.OLEDB.4.0', 'Data Source="c:\myaccessdb.mdb"; User
ID=Admin;Password='
)...Table(col1)
SELECT col1 FROM Table
"Michael Peters" <mp@.michaelpeters.de> wrote in message
news:dteomt$8eu$01$1@.news.t-online.com...
> is there a simple way to remotely (using a ColdFusion application that can
> access the database) making a copy of an entire SQLServer2000 database
> into Access?
> I can make an Access DB with empty tables that match the SQLServer tables,
> they only have to be filled.
> Somebody suggested this
> insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
> 'c:\myaccessdb.mdb';;,mytable) select * from mytable
> but it is possible that this only runs with SQLServer2005 ... because it
> requires enabling the Ad Hoc Distributed Queries feature which was
> introduced with SQLServer2005 ... or can I run statements like this also
> in SQLServer2000 ?
> -Michael
>
>|||What about using the DTS wizard for this ?
HTH, Jens Suessmeyer.|||How many tables in the DB? About how many total records?|||> DTS doesnt work?
no, DTS is not available as the server is remote and not under my control. I
have to do it programmatically, as I wrote,

> How many tables in the DB?
several dozen

> About how many total records?
thousands
-Michael|||> INSERT INTO OPENDATASOURCE(
> 'Microsoft.Jet.OLEDB.4.0', 'Data Source="c:\myaccessdb.mdb"; User
> ID=Admin;Password='
> )...Table(col1)
> SELECT col1 FROM Table
"Der Ad-hoc-Zugriff auf den OLE DB-Provider 'Microsoft.Jet.OLEDB.4.0' wurde
verweigert. Sie mssen auf diesen Provider ber einen Verbindungsserver
zugreifen."
-Michael