Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts

Sunday, March 25, 2012

DTS Execute from Com Object (Workgroup Version)

Hey Guys,

I have written some code that executes a DTS package from a COM object. It works great on my staging server which is MSSQL 2000 Standard Edition. I just got a new live server which has MSSQL Server 2000 Workgroup Edition. Now I recieve an error message when trying to execute the DTS package from the COM object. Is this perhaps something that is not supported with the Workgroup edition? Is there anyway to varify for sure because as you all know it would cost me a good amount of money to upgrade.

Thanks in advance!

JayStang wrote:

Hey Guys,

I have written some code that executes a DTS package from a COM object. It works great on my staging server which is MSSQL 2000 Standard Edition. I just got a new live server which has MSSQL Server 2000 Workgroup Edition. Now I recieve an error message when trying to execute the DTS package from the COM object. Is this perhaps something that is not supported with the Workgroup edition? Is there anyway to varify for sure because as you all know it would cost me a good amount of money to upgrade.

Thanks in advance!

I recommend you try the DTS newsgroup microsoft.public.sqlserver.dts

Monday, March 19, 2012

DTS and Oracle

I want to import a table called emp(user name scott/tiger) from oracle database to MSSQL database

Step 1
login to scott/tiger in oracle

Step 2
Create a table called emp

create table emp (empno int, empname varchar(20))

Step 3
insert into emp (empno, empname)
values(1,'aaa')

insert into emp (empno, empname)
values(2,'bbb')

insert into emp (empno, empname)
values(3,'ccc')

Step 4
Now I want to import this table to mssql using DTS.

I have used Data Transmission task in DTS for source query. I have given "select * from scott.emp"

I am able to get the exact result set. I am able to get the same values in MSSQL.

Step 5
Now I am creating another user called "test" and give access to "emp" table of "scott" user.

Step 6
Now i want to pass on "test" instead of "scott" in the Data Transmission Task.(i.e).
"SELECT * FROM test.emp" instead of "scott.test". I want to pass "test" dynamically.

how to do this.use a linked server to oracle.

create a stored proc with dynamic sql.

pass the table owner as a paramter to the stored procedure.|||Hi
I have given you only a sample. I dont have permissions to create tables or create stored procedures. I have only permissions for select statement.

Thanks

I want to import a table called emp(user name scott/tiger) from oracle database to MSSQL database

Step 1
login to scott/tiger in oracle

Step 2
Create a table called emp

create table emp (empno int, empname varchar(20))

Step 3
insert into emp (empno, empname)
values(1,'aaa')

insert into emp (empno, empname)
values(2,'bbb')

insert into emp (empno, empname)
values(3,'ccc')

Step 4
Now I want to import this table to mssql using DTS.

I have used Data Transmission task in DTS for source query. I have given "select * from scott.emp"

I am able to get the exact result set. I am able to get the same values in MSSQL.

Step 5
Now I am creating another user called "test" and give access to "emp" table of "scott" user.

Step 6
Now i want to pass on "test" instead of "scott" in the Data Transmission Task.(i.e).
"SELECT * FROM test.emp" instead of "scott.test". I want to pass "test" dynamically.

how to do this.|||how are you going to step 2 without create table permissions?|||Hi
I have given you only a sample. I dont have permissions to create tables or create stored procedures. I have only permissions for select statement.

Thanks

I think Thras meant to create the stored procedures on the SQL Server side.

Regards,

hmscott

Friday, March 9, 2012

DTS / DMO

I'd like to load a few huge CVS files to an MSSQL server.
I don't want to create temporary files, instead I want to read the CVS
file from the disk line by line and after transforming it I'd send it to
the database.
Formerly I used INSERTs, but they seemed very slow.
BULK INSERTs don't work either, because the file format cannot be parsed
with bcp.
Now I'm considering using DTS or DMO, but I don't know which of them
fits my needs better. And which of them is the easier to learn and work
with from C#.
I'd be greatful for any example, or comment on using these tools.
Thanks in advance,
Gabor GludovatzDTS is definatley the way to go to here. You can use it to do
transforms if the CSV format needs to be massaged in anyway. You can
also dynamically adjust the columns that might need to be imported if
you have different file formats.
Gabor Gludovatz wrote:
> I'd like to load a few huge CVS files to an MSSQL server.
> I don't want to create temporary files, instead I want to read the CVS
> file from the disk line by line and after transforming it I'd send it to
> the database.
> Formerly I used INSERTs, but they seemed very slow.
> BULK INSERTs don't work either, because the file format cannot be parsed
> with bcp.
> Now I'm considering using DTS or DMO, but I don't know which of them
> fits my needs better. And which of them is the easier to learn and work
> with from C#.
> I'd be greatful for any example, or comment on using these tools.
> Thanks in advance,
> Gabor Gludovatz
>