Hi guys,
I figure this should not be a complex one. I know how to manually pull in data from Oracle 9i into SQL Server 2000 using DTS. However this is my issue....
I simply want to automate the pulling in of data from 1 table in my ORACLE 9i database into another table in my Sql Server 200. I was hoping I could simple write a stored procedure that would sort of utilize a dblink like in ORACLE and then schedule that procedure. Is this feasible in Sql Server, and how would one go about setting this automated import up??
Thanks in Advance all.........
'WaleDid 9i ever come out with an export utility?
Your best bet is to schedule the Oracle export, TRUNCATE the SQL Server table, then do a bcp load or BULK INSERT...
or you can set up a linked server in sql server and do a delete and an insert from the oracle table...
The latter will incur more over head...but will appear to be easier...|||problem is that the ORACLE database is not in my control. So I can't just schedule an export.|||I wonder if you can bcp out data from a linked server...
look into sp_addlinkedserver
You must authority to that box, right?|||yeah I do have authority on the SQL Server box. i'll look into it.|||You'll have to look into sp_addlinkedsrvlogin as well
Showing posts with label figure. Show all posts
Showing posts with label figure. Show all posts
Thursday, March 29, 2012
Tuesday, March 27, 2012
Automatically update datetime field in a database table.
hi e'body:
I have some database tables, and each one of them have a creation_date and modified_date in them. I was trying to figure out a way where when a row in one of these tables is changed using Enterprise Manager (Database -> Tables -> select table -> right click -> select all rows -> change a field in a row inside a table), is there a way apart from triggers, such that the "modified_date" column for that row get changed to 'getdate()' (rather picks up the current datetime).
thanks in advance.Here is the generic trigger I use to record who modified a record and when:
CREATE TRIGGER TR_[TABLENAME]_U ON dbo.[TABLENAME]
FOR UPDATE
AS
set nocount on
update [TABLENAME]
set Modified = getdate(),
Modifier = isnull(inserted.Modifier, (convert(nvarchar(50),suser_sname())))
from [TABLENAME]
inner join Inserted on TABLENAME.PKey = Inserted.PKey
set nocount offNote that this trigger is for update only. For inserts, you should have default values defined on the table.
I have some database tables, and each one of them have a creation_date and modified_date in them. I was trying to figure out a way where when a row in one of these tables is changed using Enterprise Manager (Database -> Tables -> select table -> right click -> select all rows -> change a field in a row inside a table), is there a way apart from triggers, such that the "modified_date" column for that row get changed to 'getdate()' (rather picks up the current datetime).
thanks in advance.Here is the generic trigger I use to record who modified a record and when:
CREATE TRIGGER TR_[TABLENAME]_U ON dbo.[TABLENAME]
FOR UPDATE
AS
set nocount on
update [TABLENAME]
set Modified = getdate(),
Modifier = isnull(inserted.Modifier, (convert(nvarchar(50),suser_sname())))
from [TABLENAME]
inner join Inserted on TABLENAME.PKey = Inserted.PKey
set nocount offNote that this trigger is for update only. For inserts, you should have default values defined on the table.
Thursday, March 8, 2012
Automated Printing of Report
I have a report that I want to print. This report is invoked from a windows
app. The only thing I have been able to figure out so far is displaying the
report in a browser. Is there a way to programmatically send my report to
the printer without viewing in browser first.
I would like it to print just as it does when I preview and print from the
designer.
--
Don
--
DonHmm, the only way to print from anywhere (designer or otherwise) is to
export to another format (like PDF) and print. Printing in any other way
just prints the currently showing page. Render as PDF and print that. You
could use web services to render as PDF, save the file and then print it.
Note that with SP2 there will be client supported printing (Yeah!). Don't
know when SP2 will be.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Don" <Don@.discussions.microsoft.com> wrote in message
news:8C7AC7D1-F4CF-4EF1-BCF4-170D7610A9DF@.microsoft.com...
> I have a report that I want to print. This report is invoked from a
windows
> app. The only thing I have been able to figure out so far is displaying
the
> report in a browser. Is there a way to programmatically send my report to
> the printer without viewing in browser first.
> I would like it to print just as it does when I preview and print from the
> designer.
> --
> Don
> --
> Don|||you can print from the designer by clicking on the Preview tab and just to
the right of the page number range buttons and the refresh button there is a
print preview icon, click it and the print icon will be enabled. you can
print it from there.
"Bruce L-C [MVP]" wrote:
> Hmm, the only way to print from anywhere (designer or otherwise) is to
> export to another format (like PDF) and print. Printing in any other way
> just prints the currently showing page. Render as PDF and print that. You
> could use web services to render as PDF, save the file and then print it.
> Note that with SP2 there will be client supported printing (Yeah!). Don't
> know when SP2 will be.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Don" <Don@.discussions.microsoft.com> wrote in message
> news:8C7AC7D1-F4CF-4EF1-BCF4-170D7610A9DF@.microsoft.com...
> > I have a report that I want to print. This report is invoked from a
> windows
> > app. The only thing I have been able to figure out so far is displaying
> the
> > report in a browser. Is there a way to programmatically send my report to
> > the printer without viewing in browser first.
> >
> > I would like it to print just as it does when I preview and print from the
> > designer.
> >
> > --
> > Don
> > --
> > Don
>
>|||How about that, I've never paid attention to that. I guess since there was
no printing from deployed reports I've never paid attention to it. That's a
little embarassing. I decided to see what it did and at least for me the
print preview is totally flaky. Nothing shows, I click the print button
after the preview and then the preview shows up. I click the print button
after the print preview and cancel it and I see part of the page.
Behind the scenes it must be doing the same thing that you could do. I am
guessing that it is rendering it in pdf and showing in the embedded browser
control and then telling it to print.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Don" <Don@.discussions.microsoft.com> wrote in message
news:78D74B64-F4C7-47C9-863E-6D905AE1A3F1@.microsoft.com...
> you can print from the designer by clicking on the Preview tab and just to
> the right of the page number range buttons and the refresh button there is
a
> print preview icon, click it and the print icon will be enabled. you can
> print it from there.
> "Bruce L-C [MVP]" wrote:
> > Hmm, the only way to print from anywhere (designer or otherwise) is to
> > export to another format (like PDF) and print. Printing in any other way
> > just prints the currently showing page. Render as PDF and print that.
You
> > could use web services to render as PDF, save the file and then print
it.
> >
> > Note that with SP2 there will be client supported printing (Yeah!).
Don't
> > know when SP2 will be.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Don" <Don@.discussions.microsoft.com> wrote in message
> > news:8C7AC7D1-F4CF-4EF1-BCF4-170D7610A9DF@.microsoft.com...
> > > I have a report that I want to print. This report is invoked from a
> > windows
> > > app. The only thing I have been able to figure out so far is
displaying
> > the
> > > report in a browser. Is there a way to programmatically send my
report to
> > > the printer without viewing in browser first.
> > >
> > > I would like it to print just as it does when I preview and print from
the
> > > designer.
> > >
> > > --
> > > Don
> > > --
> > > Don
> >
> >
> >|||Have you tried installing and using the sample print delivery extension? Look
in the samples section of the Reporting Services Books Online for how to
install it. I believe it is just a sample which therefore is not supported,
and I have never used it myself.
Charles Kangai, MCT, MCDBA
"Don" wrote:
> I have a report that I want to print. This report is invoked from a windows
> app. The only thing I have been able to figure out so far is displaying the
> report in a browser. Is there a way to programmatically send my report to
> the printer without viewing in browser first.
> I would like it to print just as it does when I preview and print from the
> designer.
> --
> Don
> --
> Don|||If you use DebugLocal configuration mode and 'Run' the report, it comes
up with a specialised viewer with a print button. I believe this uses
the RS.exe command line utility - but I don't know how!
Maybe you could utilise this somehow?
Also the following link in BOL shows you how to develop your own
renderer (if you're so inclined!);
ms-help://MS.RSBOL80.1033/RSAMPLES/htm/rss_sampleapps_v1_0q28.htm
Regards
Chris
Bruce L-C [MVP] wrote:
> How about that, I've never paid attention to that. I guess since
> there was no printing from deployed reports I've never paid attention
> to it. That's a little embarassing. I decided to see what it did and
> at least for me the print preview is totally flaky. Nothing shows, I
> click the print button after the preview and then the preview shows
> up. I click the print button after the print preview and cancel it
> and I see part of the page.
> Behind the scenes it must be doing the same thing that you could do.
> I am guessing that it is rendering it in pdf and showing in the
> embedded browser control and then telling it to print.
app. The only thing I have been able to figure out so far is displaying the
report in a browser. Is there a way to programmatically send my report to
the printer without viewing in browser first.
I would like it to print just as it does when I preview and print from the
designer.
--
Don
--
DonHmm, the only way to print from anywhere (designer or otherwise) is to
export to another format (like PDF) and print. Printing in any other way
just prints the currently showing page. Render as PDF and print that. You
could use web services to render as PDF, save the file and then print it.
Note that with SP2 there will be client supported printing (Yeah!). Don't
know when SP2 will be.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Don" <Don@.discussions.microsoft.com> wrote in message
news:8C7AC7D1-F4CF-4EF1-BCF4-170D7610A9DF@.microsoft.com...
> I have a report that I want to print. This report is invoked from a
windows
> app. The only thing I have been able to figure out so far is displaying
the
> report in a browser. Is there a way to programmatically send my report to
> the printer without viewing in browser first.
> I would like it to print just as it does when I preview and print from the
> designer.
> --
> Don
> --
> Don|||you can print from the designer by clicking on the Preview tab and just to
the right of the page number range buttons and the refresh button there is a
print preview icon, click it and the print icon will be enabled. you can
print it from there.
"Bruce L-C [MVP]" wrote:
> Hmm, the only way to print from anywhere (designer or otherwise) is to
> export to another format (like PDF) and print. Printing in any other way
> just prints the currently showing page. Render as PDF and print that. You
> could use web services to render as PDF, save the file and then print it.
> Note that with SP2 there will be client supported printing (Yeah!). Don't
> know when SP2 will be.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Don" <Don@.discussions.microsoft.com> wrote in message
> news:8C7AC7D1-F4CF-4EF1-BCF4-170D7610A9DF@.microsoft.com...
> > I have a report that I want to print. This report is invoked from a
> windows
> > app. The only thing I have been able to figure out so far is displaying
> the
> > report in a browser. Is there a way to programmatically send my report to
> > the printer without viewing in browser first.
> >
> > I would like it to print just as it does when I preview and print from the
> > designer.
> >
> > --
> > Don
> > --
> > Don
>
>|||How about that, I've never paid attention to that. I guess since there was
no printing from deployed reports I've never paid attention to it. That's a
little embarassing. I decided to see what it did and at least for me the
print preview is totally flaky. Nothing shows, I click the print button
after the preview and then the preview shows up. I click the print button
after the print preview and cancel it and I see part of the page.
Behind the scenes it must be doing the same thing that you could do. I am
guessing that it is rendering it in pdf and showing in the embedded browser
control and then telling it to print.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Don" <Don@.discussions.microsoft.com> wrote in message
news:78D74B64-F4C7-47C9-863E-6D905AE1A3F1@.microsoft.com...
> you can print from the designer by clicking on the Preview tab and just to
> the right of the page number range buttons and the refresh button there is
a
> print preview icon, click it and the print icon will be enabled. you can
> print it from there.
> "Bruce L-C [MVP]" wrote:
> > Hmm, the only way to print from anywhere (designer or otherwise) is to
> > export to another format (like PDF) and print. Printing in any other way
> > just prints the currently showing page. Render as PDF and print that.
You
> > could use web services to render as PDF, save the file and then print
it.
> >
> > Note that with SP2 there will be client supported printing (Yeah!).
Don't
> > know when SP2 will be.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Don" <Don@.discussions.microsoft.com> wrote in message
> > news:8C7AC7D1-F4CF-4EF1-BCF4-170D7610A9DF@.microsoft.com...
> > > I have a report that I want to print. This report is invoked from a
> > windows
> > > app. The only thing I have been able to figure out so far is
displaying
> > the
> > > report in a browser. Is there a way to programmatically send my
report to
> > > the printer without viewing in browser first.
> > >
> > > I would like it to print just as it does when I preview and print from
the
> > > designer.
> > >
> > > --
> > > Don
> > > --
> > > Don
> >
> >
> >|||Have you tried installing and using the sample print delivery extension? Look
in the samples section of the Reporting Services Books Online for how to
install it. I believe it is just a sample which therefore is not supported,
and I have never used it myself.
Charles Kangai, MCT, MCDBA
"Don" wrote:
> I have a report that I want to print. This report is invoked from a windows
> app. The only thing I have been able to figure out so far is displaying the
> report in a browser. Is there a way to programmatically send my report to
> the printer without viewing in browser first.
> I would like it to print just as it does when I preview and print from the
> designer.
> --
> Don
> --
> Don|||If you use DebugLocal configuration mode and 'Run' the report, it comes
up with a specialised viewer with a print button. I believe this uses
the RS.exe command line utility - but I don't know how!
Maybe you could utilise this somehow?
Also the following link in BOL shows you how to develop your own
renderer (if you're so inclined!);
ms-help://MS.RSBOL80.1033/RSAMPLES/htm/rss_sampleapps_v1_0q28.htm
Regards
Chris
Bruce L-C [MVP] wrote:
> How about that, I've never paid attention to that. I guess since
> there was no printing from deployed reports I've never paid attention
> to it. That's a little embarassing. I decided to see what it did and
> at least for me the print preview is totally flaky. Nothing shows, I
> click the print button after the preview and then the preview shows
> up. I click the print button after the print preview and cancel it
> and I see part of the page.
> Behind the scenes it must be doing the same thing that you could do.
> I am guessing that it is rendering it in pdf and showing in the
> embedded browser control and then telling it to print.
Subscribe to:
Comments (Atom)