Copying Tables, MSDE

Jun 6, 2005

Hi!

I've got a very simple problem I can't find an answere to.

I've got an MSDE database and I want to copy a table.

I've tried something like:

create table2 as select * from table1

with and without the "as", but I can't get it to work and I can't find a good answere on the internet.

very thankful for an answere!

 

/Jon

 

View 3 Replies


ADVERTISEMENT

Copying MSDE Database

Feb 20, 2004

I have a MSDE database on a laptop and need to copy it to another machine in order to use Access 2000 to inspect the tables and view the data using an Access project adp file.

Could someone please tell me how to do this and whether there are any relevant issues/problems.

thanks

View 1 Replies View Related

Copying MSDE Database To Disk - How??

Dec 7, 2003

I have my little MSDE on my computer. I can add and delete stuff from it through Web Matrix. My question is, where exactly is the database stored in Windows?? Also, say I wanted to copy it to a disk so I could show it to someone else, what file(s) would I need to copy?

The reason why I ask is because I have been doing a website as a project and we have to hand in all files on a disk. Getting all the .aspx & .ascx and the .config file is easy, but the database & stored procedures is proving tricky to find.

Thanks

View 2 Replies View Related

Copying MSDE Database Into SQL 2005

Mar 20, 2007

I have a legasy database developed for SQL 2000 running in MSDE. I've tried COPY DATABASE into SQL 2005 (Developer edition, to see if I can get it to work right before specing out a new server), but the user accounts don't copy and I also suspect my settings for security and permissions aren't right.

I can set SQL server security to mixed mode, and the legasy system front end Access projects to connect using Windows authentication only, but then I'm unable to control access and set roles. I need to be able to connect as a particular user in order to admin the legasy system.

Is there a fairly uncomplicated way to copy user accounts and set SQL Server options to assign roles/permissions for an MSDE legasy system copy to SQL 2005?

View 1 Replies View Related

Tables Copying

Dec 24, 2007

 
i have sql local database in the application . I want to copy the table from one local database to another. here the detination table is already created with
one field which is incremental and other field is image and some other fields are text. any solutions on how to do it
 

View 3 Replies View Related

Copying Tables

Dec 22, 2004

hi,



I have a database called marketing in it i have a table called products and right now there are five products in the table with product_id as 8003,8004,8005,8006,8007 i want to create the same table in the database but my product_id should start from 1 and i only want three products from the old table to be copied into the new table any idea how to make this happen.

thanks,

belord

View 1 Replies View Related

Copying Tables

May 19, 2004

Hi,

I'd like a really simple way of making a replica of a table. The thing is i'd like the table name to be a variable. The following code doesn't work, any ideas??

Thanks in advance,

Alph

CREATE Procedure Test

@vMonth as varchar(3)

As

SELECT tbl_Targets.* INTO @vmonth
FROM tbl_Targets;
GO

View 1 Replies View Related

Tmp Tables (copying From..)

Apr 2, 2007

Hi
I need to update an existing table with the contents of a temporary table ?
what is the syntax for this, for example i have temp table #tmptable

I need to add this to a existing table (ExTable)
Can i do something like
INSERT into Extable..
.
. (data)
FROM SELECT * from #tmptable



??
any help appreciated ..

View 15 Replies View Related

Copying Tables And Data

Jul 25, 2007

Is there any simple way to copy tables from one database to another in SQL Management Studio or VS 2005?  I sometimes work split work between home and work and I often need to copy and table and its data (data, stored procedure, etc) to a different database, but having to create a new database then copy the data is a pain.  Is there an easier way? 

View 5 Replies View Related

Copying Tables In SQL SERVER

Aug 30, 2004

I have a 100m row table that I need to come from one database to another database in SQL SERVER.

The bulkcopy feature in DTS is nice -- however is there a stored procedure or external software that will be able to do this outside of DTS.

Right now I am doing a
SELECT *
INTO
(table name)
FROM (table name)

and on a 100m row table it is taking around 52 hours. Not acceptable.

View 6 Replies View Related

SQL 2012 :: Copying Data Between Tables

Apr 15, 2015

We've had a new server set up with SQL 2012 and I'm in the process of moving data to it from a 2008 (SP2) server.

Details are as follows:-
2012 instance:- Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
May 14 2014 18:34:29
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)

2008 instance:- Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64)
Sep 16 2010 19:43:16
Copyright (c) 1988-2008 Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) (VM)

I don't want to do a backup/restore routine as there are collation conflicts on the 2008 server.I've created the database and tables on the 2012 instance and now I want to transfer the data from the 2008 instance to the 2012 one.

The 2012 instance has a linked server to the 2008 instance.I was trying to use sp_MSForEachTable (I know, it's old and will probably disappear shortly) but that doesn't seem to work properly because some of the columns have an Identity field set up.

Some of the tables have upwards of 10 million records in them and are quite sizeable.how I can achieve the transfer without a back-up/restore?

View 9 Replies View Related

Removing 0 And Copying Fields To Other Tables

May 19, 2008

Hi guys,

please help.

I use to copy one column from one database to another database. What query should I use?

moreover,

How can I convert this

code
000001

the result would be
code
1

thanks!

View 5 Replies View Related

Copying Tables From 2005 To Another Is Failing

May 9, 2007

HI,
I current have two 2005 boxes running 9.0.3050 in different DMZ with the source running a DTS to drop and copy its tables to the source every night. It was working up until last thursday. Nothing has changed in the FW rules and getting no errors. One is 3.5GB which copies fine, the other is 21GB and runs all night with only getting a fraction of the tables populated. I'm the hardware guy, but have some understanding w/ sql. Thanks in advance for any help.

View 1 Replies View Related

Copying Tables And Generating New Keys

May 23, 2007

I have a large table that I need to copy, but I need to generate a new value for my id field using a SPROC and replace my existing ID value. I also have a few mapping tables I need to copy, so I need to store this new ID for later use. I currently have a SPROC that performs all these actions, but it takes about 3 or 4 minutes to complete and completely hogs the CPU time. Thus, I can't perform any actions until it finishes.



I'm looking for a way to run this procedure in the background. Unfortunately, my ID field value is not a GUID nor an IDENTITY column. I've researched Integration Services, but I was unable to find any DataFlow Tranformations to call a SPROC to retreive a new id nor could I find anything that would let me store my new id to update my mapping tables. SQLBulkCopy wasn't a good solution either.



If anyone has any insight to this, it would be greatly appreciated. Thanks,

View 1 Replies View Related

Copying Data Between Database Tables

Sep 7, 2006

Hi. I need to move data from one database table to
another across database instances. A simple example of the typical
move would be:



[CODE]

INSERT into destination_db.dbo.table1

SELECT column1, column2, column3, column4 from source_db.dbo.table2

[/CODE]



My options are:



1. Create an SSIS package to perform the move.

2. Create sprocs and schedule the data move as jobs.

3. Write .NET code using sprocs to perform the move.



I'll have to move hundreds of thousands of records, so I want the
option that provides the best performance. I'm guessing that option 3
will be the slowest.



Thanks for the help!

View 4 Replies View Related

Copying Tables Using SSIS Package

Nov 3, 2006

I need to create a fairly simple package. And almost because of the simplicity, I'm stumped.

I need to copy all non-system tables from server1.database1 to server2.database2. Additionally, four of the 30+ tables need to be renamed on the fly -- i.e. their name will reflect the year and month that the copy takes place.

I've tried using the Transfer SQL Server Object Task to simply copy the tables, but I get flaky results at best with it. Sometimes it tells me the source table doesn't exist, when I can clearly see it (and I've selected it from the list). And even though I have turned on the Include Indexes option, they don't always come through.

I'm wondering if I need to do a For Each loop looking at an ADO object?

Any suggestions?

Stephanie

View 5 Replies View Related

Copying Tables DTS Vs SSIS - Speed!!!

Mar 26, 2007

Hi,
I'm trying to create a package with SSIS to replace the DTS process that we have in place already.
DTS package copy four table content from one server to another. I have created a simple SSIS to do the same processes but the process it alot slower than DTS!!

I did ran the SSIS package using ctrl+F5 and also from command prompt but still it's quite slow.
SSIS uses SMO to access to server and both are running on 2005

Thanks

View 9 Replies View Related

SQL Server 2012 :: Copying Data From One Set Of Tables To Another

Mar 26, 2014

1. Take a subset of data from about 100 tables that have multiple references to other tables in this group of 100 from a first DB.
2. Insert the above data into a second DB, a database that already has data in the 100 tables, while maintaining the correct references.

As a general approach, the best way I can think of doing this is as follows:

1. Create mapping tables for every ID that is referenced in a different table (OldID NewID)
2. Insert the old data into the new table and output the OldID and NewID into the mapping table.
3. Use that mapping data to make sure all tables that use those IDs have the new IDs in DB2.

This approach is extremely labor intensive both on initial implementation and would require a fairly substantial amount of work to maintain going forward.

View 7 Replies View Related

Copying A Request From Draft To Original Tables

Jan 6, 2014

I have been using the below query to copy a record of data that exists in several draft tables to the original tables. how do i change this query such that i can input multiple records at one time so multiple records get copied to original tables from the draft tables

At this time when i feed mutiple requestids to my query it simply errors out

SET NOCOUNT ON
GO
DECLARE @oldrequestid varchar(50),@newrequestid varchar(50)
DECLARE db_cursor CURSOR FOR
SELECT RequestId from report_request_draft where requestid in (320762)

[Code] ....

View 6 Replies View Related

Transact SQL :: Copying Data From One Table Into Two Tables

Jun 17, 2015

I have a table, dbo.Table1(Id,Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8) that I need to split between two tables dbo.Table2(Id, Col1, Col3, Col4) and dbo.Table3(Id,dbo.Table2_Id,Col5,Col6,Col7,Col8).  But in dbo.Table3 I need to have the Id column from dbo.Table2 populated since its a foreign key constraint in dbo.Table3.  How do I go about doing this?

View 3 Replies View Related

Copying Data From Multiple Tables To One Table

Sep 20, 2007



Hi,

I have 3 tables with the follwing schema
Table <Category>
{

UniqueID,
LastDate DateTime
}


Assume the follwing tables with data following the above schema

Table Cat1
{

1, D1
2, D2
3, D3
}
Table Cat2
{

2, D4
3,D5
4, D6
}
Table Cat3
{

1, D7
3,D8
5,D9
}

I have a Master and the schema is as follows
Table master
{

UniqueId,
Cat1 DateTime, -- This is same as the Table name
Cat2 DateTime, -- This is same as the Table name
Cat3 DateTime -- This is same as the Table name
}

After inserting the data from all these 3 tables, I want the my master table to look like this
Table Master
{

UniqueId cat1 cat2 Cat3
------------ --------- ------- -----------
1 D1 NULL D7
2 D2 D4 NULL
3 D3 D5 D8
4 NULL D6 NULL
5 NULL NULL D9
}


Please remember the column names will be same as that of table names

can any one pelase let me know the query t o acheive this

Thanks for your quick response
~Mohan Babu

View 1 Replies View Related

Copying Dimension And Fact Tables From One Database To Another...

Dec 17, 2007

Hi there, my question is really simple. I want to setup an automatic task in SSIS that drops the tables in the target database and substitutes them with tables from the source database. We are talking about two or three dimension tables and one fact table. The dimension tables are pretty small. The fact table will contain, at maximum, 300,000 rows and 12 columns. I do not use delta or flag historisation btw. What tasks in SSIS would you suggest to use?

BTW I'm new to SSIS... ;-) Thanks in advance!

View 9 Replies View Related

Copying Tables From 2000 To 2005 Express

Sep 13, 2006

I have a rather sizeable SQLServer 2000 database. To work on an issue, I would like to copy just a couple tables into SQL Server 2005 Express. How does one go about this efficiently?

View 7 Replies View Related

Copying Multiple Tables From SQL 2000 To SQL 2005

Mar 27, 2008



Hello-

I need to know what would be the best way to perform a task I have been assigned. I have read multiple post online, and I came to the conclusion that the Import/Export wizard was my best choice. I'm trying to copy at least 80 tables from a SQL 2000 server to a SQL 2005 server. Currently I have these tables over on the destination server (SQL 2005) but this data is outdated and needs to be updated. The ulitimate goal would be to set up a SSIS process so that I can schedule this process to copy over once the data has passed QA. I followed through the Import/Export Wizard inside of the BID and I manually highlighted all of the tables and performed a edit "delete rows in destination table" . But to my alarm this did not occurr and now I have duplicate records in all of my 80 tables. I'm going to go through this process again, but I wanted to make sure this was going to be my best option.

Any suggestion ?



Shanon

View 4 Replies View Related

Copying Tables From Access To Sql Server Express

Nov 27, 2006

I am trying to export a databse from access into sql server express. The access database is on a network and the sql server express is on my local machine.



Could someone give me setp by step instructions please as to how to export the data from the tables into my sql server express.



Thank you very much for your time

View 1 Replies View Related

Error 0x80004005 When Copying Tables Between Servers

Feb 23, 2007

hi
I've got a job which copy tables between different servers .
I am feeding the tables one by one and the process of copying is in a loop so I have cotrol over the copying process.
it works fine but sometimes randomly I am getting
Execution failed with the following error: "ERROR : errorCode=-1071636471 description=SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification".An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification". helpFile=dtsmsg.rll helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}".

and the process fails and this might happen for in any point and on any table and sometimes it runs all the way successfully!!
any idea what the problem might be!
Thanks

View 5 Replies View Related

Copying Rows From Multiple Tables To A Single Table

Sep 20, 2007



Hi,

I have 3 tables with the follwing schema
Table <Category>
{

UniqueID,
LastDate DateTime
}


Assume the follwing tables with data following the above schema

Table Cat1
{

1, D1
2, D2
3, D3
}
Table Cat2
{

2, D4
3,D5
4, D6
}
Table Cat3
{

1, D7
3,D8
5,D9
}

I have a Master and the schema is as follows
Table master
{

UniqueId,
Cat1 DateTime, -- This is same as the Table name
Cat2 DateTime, -- This is same as the Table name
Cat3 DateTime -- This is same as the Table name
}

After inserting the data from all these 3 tables, I want the my master table to look like this
Table Master
{

UniqueId cat1 cat2 Cat3
------------ --------- ------- -----------
1 D1 NULL D7
2 D2 D4 NULL
3 D3 D5 D8
4 NULL D6 NULL
5 NULL NULL D9
}


Please remember the column names will be same as that of table names

can any one pelase let me know the query t o acheive this

Thanks for your quick response
~Mohan Babu

View 8 Replies View Related

Copying Multiple Tables From One Db To Another Using SSIS Object Model

Dec 25, 2007

Hi,

Can anyone tell how to copy multiple tables from from one db to another using SSIS object model.

I am confused with things like. Do I need to add multiple source and destination in a dataflow task or do I need to add multiple dataflow task?

What is the difference between these two? Is there any other (easy way) to achieve this?


Thanks.

View 7 Replies View Related

Need Help In Copying A Temp Tables Contents To A Existing Table

Nov 8, 2006

I have a real table with an identity column and a trigger to populate this column.

I need to import / massage data for data loads from a different format, so I have a temp table defined that contains only the columns that are represented in the data file so I can bulk insert.

I then alter this table to add all the other columns so that it reflects all the columns in the real table. I then populate all the values so that this contains the data I need.

I then want to insert into the real table pushing the data from the temp table, however this gives me errors stating that the query returned multiple rows.

I specified all the columns in the insert grouping as well as on the select from the temp table.

ANY thoughts / comments are appreciated. This is beginning to drive me nuts.



Rob

View 5 Replies View Related

SSIS Task Or Design Considerations For Copying/updating/replicating Tables From One Server To Another

Dec 13, 2007




I need to copy all the data from all the tables in a database to a copy of this database on another server.
What feature of SSIS should I take advantage of to accomplish this?

We have an SLA for 8am, most times the data warehousing jobs complete at 8:05am. Adding an additional process/set of tasks to this package would obviously make matters so I'm trying to update/copy/replicate the data in the fastest manner. Typically we're talking 2 marts (10-20GB) with 2 large tables (5-10 mill records) and 20 marts (0.5 - 5 GB) with many more smaller tables (~40 tables with record count ranging from 1 to a million)

Additionally please indicate if the design/feature you suggest can handle (pushing schema changes and additions to the target server) schema changes or new tablesviews added to the source database.

My only idea so far...is using the import wizard (in Management Studio) to create an SSIS package (top copy all the tables from one server to another) and saving it to the server, Then executing this package after the job is complete. However this would not work if the schema of a table changed, or if a a table is added. Moreover I don't think I can edit this package in visual studio.

View 3 Replies View Related

Renaming Tables In MSDE

Jun 2, 2005

Hi! I'm trying to rename tables in a msde database, without succeeding. Simple question, I guess, but I can't find out how to do this. I know this doesn't work though:--- Dim connectionString As String = "server='(local)'; trusted_connection=true; database='GustafTest1'"Dim cn As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
cn.Open()
 Dim queryString As String = "RENAME TABLE table1 TO table2" '"ALTER TABLE [table1] RENAME TO [table2]"
 dbCommand.CommandText = queryString dbCommand.Connection = cndbCommand.ExecuteNonQuery()---The reason to why I want to do this is that I'm updating the information of my system, and store the new data in a temporary table during update, in case something goes wrong. If the storing goes alright, the newly loaded the old table is renamed to backup_table and the temporary table is renamed from updating_table to active_table.That is a good solution, right?Thanx,Jon Engström, Sweden 

View 1 Replies View Related

MSDE And ODBC Tables

Jul 23, 2005

I have a MSDE database and I need to delete the contents of the exitingtables and then import new data on a scheduled basis from an ODBC datasource (preferable through a system DSN). This was easy to do in SQL2000 Enterprise given the DTS tools and then just scheduling a job thruthe agent.Is there an example of how I could do this just using scripts and MSDE(like a stored proc)? It looks like I have the agent still in MSDE touse.Help appreciated.Thanks,Frank*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 4 Replies View Related

How To Create Database And Tables In MSDE

Sep 25, 2005

I have install the MSDE from Ofiice 2000 cd and my MSDE sql server is running fine that I can see from my tray bar with green arrow button. Now i want to create the database so can any body tell me how do i create database. Is there ne query analyser or enterprise manager by which I can create database. Also when i try to install starterkit it doen not allow me to install it. It ask me to select database from the dropdown list and when I select Localhost (only option available) and click on test connection it gives me error UnsuccessfullI am new at MSDN so please help me.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved