Showing posts with label successfully. Show all posts
Showing posts with label successfully. Show all posts

Wednesday, March 28, 2012

Importing views from Oracle

I've been able to import tables successfully from Oracle
to a SQL Server database. However, when I try to import
views from Oracle it wants to import them as tables in
SQL Server. Any ideas how I can import views as views
from Oracle to SQL Server?A view is a virtual table. Technically, to import just the
view you would only be importing the view definition, not
the data. Import the data and then create a view in SQL
Server.
-Sue
On Mon, 23 Aug 2004 13:49:01 -0700, "Scott"
<anonymous@.discussions.microsoft.com> wrote:

>I've been able to import tables successfully from Oracle
>to a SQL Server database. However, when I try to import
>views from Oracle it wants to import them as tables in
>SQL Server. Any ideas how I can import views as views
>from Oracle to SQL Server?

Importing views from Oracle

I've been able to import tables successfully from Oracle
to a SQL Server database. However, when I try to import
views from Oracle it wants to import them as tables in
SQL Server. Any ideas how I can import views as views
from Oracle to SQL Server?
A view is a virtual table. Technically, to import just the
view you would only be importing the view definition, not
the data. Import the data and then create a view in SQL
Server.
-Sue
On Mon, 23 Aug 2004 13:49:01 -0700, "Scott"
<anonymous@.discussions.microsoft.com> wrote:

>I've been able to import tables successfully from Oracle
>to a SQL Server database. However, when I try to import
>views from Oracle it wants to import them as tables in
>SQL Server. Any ideas how I can import views as views
>from Oracle to SQL Server?

Monday, March 26, 2012

Importing stored procedure

ConfusedHi,

I am trying to import a database from other server which is in sql2000 to server in sql 2005, i can successfully import all the tables but not able to import the stored procedure. Can any one suggest me the method to import stored procedure from other server.

Thanx

We deploy our sp's to multiple different database servers with a deploy (.sql) script.

So every stored procedure is also stored in this script.

Or you can use the following script:

USE MYDATABASE

SELECTname,text

FROM sysobjects

INNERJOIN syscomments

ON sysobjects.id= syscomments.id

WHERE xtype='p'ANDNameLIKE'%'

ORDERBYNAME

|||

What tool or method are you using to import the database? Is the stored procededure import failing? Do you get an error message?

An easy method to transfer a database from server to server is to backup the database and restore it to the new server - using SQL Server Management Studio (or the express version which is a free download). The tool will take care of upgrading the database from 2000 to 2005 for you behind the scenes.

|||

Hi divya4k2007,

You can script your database to a *.sql file and then run this query file in a new database. After that you will have a db with the same schema/structure as your orginal one ( All the tables, sp's will be copied but the data won't. So you need to Impor the data later).

Another easy way is to use backup/restore (if migrate direction is sql2000 to sql2005). You can also try database detach/attach,however, since i don't have sql2000 installed on my box,i'm not sure if detach/attach will work. You can refer to my another post which addresses the same issue: http://forums.asp.net/t/1144769.aspx

Hope my suggestion helps

Monday, March 19, 2012

Importing Excel Into MS SQL Table

Hi.

I have done this successfully the last time but just couldn't get it to work this time round. Please help.

I was trying to import data from an Excel file into MS SQL table. NONE of the numeric or value fields (right justified) works because they shown <NULL> in MS SQL table after the import via DTS. Those string fields were able to import ok into the table. DTS didn't show any error message during the DTS run.

Any advise? Thank you.

Best regards
Teck BoonDo the values in the cells in the Excel-sheet have a ' in front of them?

This character tells Excel that it should leave the value in the cell alone, and when they are imported they are considered to be text.|||Hello oneleg_theone.

Thanks for your email reply. There isn't a ' in the cell. The problem was there were many other unwanted text at some point in the file. After removing them, I saved the file as a .csv file everything works. I was able to import into my SQL table using DTS.

Best regards
Teck Boon|||I don't know if this applies to this situation or not, but wanted to throw it out there as an FYI. Using DTS to import Excel, DTS will look at the first 8 rows (I think it's 8 rows anyways) of Excel data to look for certain characteristics, and base how it will do the import on that. I know that number can be changed, possibly even ignored. However, it's been several years since Ive had to deal with this, so my apologies for not being able to recall how to go about it.

Wednesday, March 7, 2012

Importing data from DB2 to SQL server

Hi,

I'm new to SQL server. My huge data is there in DB2. I tried to import using SSIS import/export wizard, it does successfully with default datatype columns.

for example, If my DB table has numeric columns, it has been imported as "double" and if it is string, it has been impoerted as "nvarchar". Is there any way to have correct/equivalnet datatype import from DB2?

Rgs

Vasu

You could save the package generated by the export/import wizard and then modify it as you need. Take a look at the data convertion transformation in the data flow. Here are some SSIS data types guidelines:

http://msdn2.microsoft.com/en-us/library/ms141036.aspx

|||I don't understand. The data types seem correct to me. What's the problem exactly?

DB2 data types are not necessarily the same as SQL Server.|||

This page has tables of data type mappings between DB2 and SQL Server:

http://www.redbooks.ibm.com/redbooks/SG246672/wwhelp/wwhimpl/common/html/wwhelp.htm?context=SG246672&file=23-2.htm

You can download the larger documentation from which this is taken (in PDF format) here:

http://www.redbooks.ibm.com/redbooks/pdfs/sg246672.pdf