.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Copying/Importing A Database

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :Sql Server
 

Hey, hopefully this is the right place to post this - wasn't really sure.

I'm trying to move a relatively large database from an old server to a new one.  I've tried using the data import tool and I've tried copying the mdf files directly over to the new server and attaching the database and in both scenarios the ID columns that were marked as identity columns lose their Identity Specification settings.

The old server is running SQL Server 2008 and the new server is running SQL Server 2008 R2.

Can anyone advise me on remedying this problem or tell me what I'm doing wrong?




View Complete Post


More Related Resource Links

Importing Excel 2007 data into SQL 2005 database

  
I have a SQL 2005 cluster installation without SSIS and without management studio (I didn't install it). Now we need to import data from an excel 2007 file into a specific table in a database. I have tried doing this from a remote management studio, BI development studio and DTSwizard but I can't seem to make it work. The error message from BIDS is that "the data source is on a remote computer..." Does any of you have a step by step  guide that works from a remote location. BR Rasmus    

Importing large dat file into sql server database

  
I have a dat file which consists of thousands of columns which i have to insert into a database. I have to insert the data into multiple datatables. I am looking for the best possible way to do that. I have looked into bulk insert also but is there a better way? something like normalizing the data in the data access layer and inserting into the tables or creating ssis packages? Any help is highly appreciated.

Copying a database structure (with or without data)

  

I designed a database on my local machine (cert.mdf), and attached it to SQL Server Mgmt Studio.  I signed up with a db hosting company and copied it to their site (using "script database as / create to") and got it set up out there.  Since then I've made further changes to the design, but only to the web-based version.

Now I'd like to bring the web-based design back to my local cert.mdf so I can do some further development & testing but I can't seem to find a way to do that.  (I don't mind being destructive on my local machine).  If I try the same thing but in reverse, I get a 'metadata unreadable' error.  If I just try a copy (via mgmt studio) I get a message about 'unable to connect to local server'.

Suggestions?


SSIS importing from a global temp table to another database

  

I have a work flow as followed but haven't been had any success after the 1st step.

1. run a query to create a global temp table from ServerA.databaseX

2. pull the data from the global temp table to the ServerB.databaseY

I think the problem is that after the step1 excuted, the session closes and the global temp table gets deleted. So when the step 2 tries to access the global temp table it's no longer there.

I tried to pull the data using the direct query method (no temp table) but it took too long - more than 45 minutes. If i have to do the above steps manually, it wouldn't take more than 15 minutes.

I dont have access to create a local table in the destination server/database.

Is there a way to keep the session alive so i can pull data from the global temp table.

I appreciate any help you can provide.


COPY DATABASE WIZARD GIVES ERROR WHILE COPYING

  

Hi,

I am using copy wizard in sql server 2008 machine to copy a database to another sql server 2008 machine. Here is the log file.

---------------------------------------------------------------------------------------------------------------------------------------------------

#Fields: event,computer,operator,source,sourceid,executionid,starttime,endtime,datacode,databytes,message
OnPreValidate,NL-DEVXP95,NT AUTHORITY\SYSTEM,CDW_NL-DEVXP95_MSSQL2008_NL-DEVXP95_MSSQL2008R2_3,{65EB1D9A-DC17-4649-90B7-B3292DFE1ADE},{01BB97DA-C96C-4216-BD10-026F14D1BC7C},11/15/2010 3:05:12 PM,11/15/2010 3:05:12 PM,0,0x,(null)
OnPreValidate,NL-DEVXP95,NT AUTHORITY\SYSTEM,192_168_3_144_MSSQL2008_192_168_3_144_MSSQL2008R2_Transfer Objects Task,{5231CE89-011F-4E2F-8B23-3DC5809CCB86},{01BB97DA-C96C-4216-BD10-026F14D1BC7C},11/15/2010 3:05:12 PM,11/15/2010 3:05:12 PM,0,0x,(null)
OnPostValidate,NL-DEVXP95,NT AUTHORITY\SYSTEM,192_168_3_144_MSSQL2008_192_168_3_144_MSSQL2008R2_Transfer Objects Task,{5231CE89-011F-4E2F-8B23-3DC5809CCB86},{01BB97DA-C96C-4216-BD10-026F14D1BC7C},11/15/2010 3:05:12 PM,11/15/2010 3:05:12 PM,0,0x,(null)
OnPostValidate,NL-DEVXP95,NT AUTHORITY\SYSTEM,CDW_NL-DEVXP95_MSSQL2008_NL-DEVXP95_MSSQL2008R2_3,{65EB1D9A-DC17-4649-90B7-B3292DFE1ADE},{01BB97DA-C96C-4216-BD10-026F14D1BC7C},11/15/2010 3:05:12 PM,11/15/2010 3:05:12 PM,0,0x,(null)
Pack

Importing Data to SQL Server Compact Database

  

Hi there.  I am newb to Microsoft SQL.  I have used Access for a couple of years.  I created a new database and a table.  I have two questions.  1.) Is there a way to add data manually to a table I built in SQL?  2.) I created some VBA to pull data in and I get Major Error 0x80040E14, what does this mean?

Thanks for your help and patience.


Copying contents of table from one SQL CE database to another

  

Hello,

I'm trying to copy an entire table's content from one SQL CE database to another. I would use sequential INSERT statements (read from the original table, then insert the results into the destination table) except for the fact that I don't know if they indexes from the primary keys would match, and I need them to match.

I'm programming this in C#, in case this helps.


Multiple database support with Entity Framework

  
One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Export Visio Database Table Names to Excel

  
If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

MS SQL Server: Disconnect Users From Database - Kill User Session

  
If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

  
We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

Adding Rows in GridView without using a Database

  
This article describes on how to add rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in the TextBox on Button Click and retain the GridView data on post back.

Adding Multiple Columns and Rows in GridView without using a Database

  
This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

ASP.NET Database Tutorial

  
This tutorial will show you how to display data using the .NET GridView Control, ASP.NET 2.0 and VB.NET

The GridView control is a powerful tool and is simple to implement.

First, you will need to import the System.Data.SqlClient namespace.

Connestion string create any database server

  
This links important to how to create connection string to any data base sever.

SQL Server Database Transaction

  
A transaction is a group of SQL commands executed together as a single component of work to be accomplished. If all of these commands succeed, then a transaction is committed - the changes to the data are made final. If any of the commands within a transaction fail, then the entire transaction is cancelled, or in SQL Server terms, the transaction will be rolled back.

Transactions are one of the things that keep your data safe, but they're not necessarily easy to understand. Here's some help:

Database Export Wizard for ASP.net and SQL Server

  
A step wizard for ASP.net to export database objects to CSV, TXT, HTML, XML, or SQL. it guides users through a few simple steps to choose a database object (table, view, or query), select columns, and export the data in any of the standard formats CSV, HTML, XML, or SQL.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend