Showing posts with label backend. Show all posts
Showing posts with label backend. Show all posts

Friday, March 30, 2012

Install RS - Separate DB from Web

I am trying to install reporting services on a web server, which will connect
to an existing instance of the RS Sql Server backend on another machine.
This backend server already has SP2 installed - so when I install RS on the
web server machine and try to point to the existing backend during
installation, it tells me that it is not compatible.
What would be the correct steps to take in order to install on a web server
and connect to an existing RS backend DB? Any relevant articles will help...
Enjoy!
mikeFirst, are you implementing a web farm?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Michael R" <MichaelR@.discussions.microsoft.com> wrote in message
news:9F638932-02F0-48DF-8EF9-A54EF42AF0FA@.microsoft.com...
>I am trying to install reporting services on a web server, which will
>connect
> to an existing instance of the RS Sql Server backend on another machine.
> This backend server already has SP2 installed - so when I install RS on
> the
> web server machine and try to point to the existing backend during
> installation, it tells me that it is not compatible.
> What would be the correct steps to take in order to install on a web
> server
> and connect to an existing RS backend DB? Any relevant articles will
> help...
> Enjoy!
> mike|||Not in the sense that I will have multiple ReportServer databases. I will
have a one to one relationship: 1 web server and 1 server with the
ReportServer database.
It was recommended that I do this by the server admins, in order to take the
load off of IIS.
"Bruce L-C [MVP]" wrote:
> First, are you implementing a web farm?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Michael R" <MichaelR@.discussions.microsoft.com> wrote in message
> news:9F638932-02F0-48DF-8EF9-A54EF42AF0FA@.microsoft.com...
> >I am trying to install reporting services on a web server, which will
> >connect
> > to an existing instance of the RS Sql Server backend on another machine.
> > This backend server already has SP2 installed - so when I install RS on
> > the
> > web server machine and try to point to the existing backend during
> > installation, it tells me that it is not compatible.
> >
> > What would be the correct steps to take in order to install on a web
> > server
> > and connect to an existing RS backend DB? Any relevant articles will
> > help...
> >
> > Enjoy!
> >
> > mike
>
>|||I would try this:
1) install SQL RS on the web server, and during the install, create new
SQL RS database(s) for it to point to / use (doesn't matter where you
put the DB, you'll end up dropping them soon). At the end of the
install, you'll have a new SQL RS web app, pointing to a new SQL RS db.
2) Apply SP1 to the SQL RS instance (web & new database).
3) Apply SP2 to the SQL RS instance (web & new database).
4) Now that you're web app is up to SP2, you can point it to your
original database using the 'rsconfig' command line utility (see SQL RS
Books Online for details of usage & syntax). After using 'rsconfig' to
point your app to the original database, you'll need to run the
'rskeymgmt' command line utility to initialize / activate your Report
Server for use with the original database (allows it to read the
original database) -- see Books Online for details of syntax and usage.
5) Drop the new SQL RS databases that were created in Step #1, since
you're not going to use them, now that your web app is pointing to the
'original' SP2 database.

Sunday, February 19, 2012

Inserting only time (09:00:00) into SQL server

I'm having problems inserting times into my SQL backend through my VB app
I have a access front end that I am wanting to recreate in VB but when i
execute my SQL insert statement instead of 09:00:00 showing in the field,
01/01/1900 09:00:00 or similar shows, i can insert only a date into the date
field 01/01/2005 and it stores how i want. but i cant seperately store the
time the field is set to datetime.
any one have any ideas, also I am getting an error with the SQL statement i
dont think it likes the ' around the time variable but errors if it isnt
there. If i paste the SQL statement into query analyzer with the ' it runs
no problem.
TIA
some sample code is below
strSQL = "INSERT INTO Appointment (Date_Of_Travel, Time_Of_Appointment,
House, Postcode, CMS_Ref, Agent_ID) VALUES ('" & _
DateTrav & "', '" & txtTime & "', '" & txtHouse & "', '" & txtPCode & "', '"
& txtCMS & "', '" & txtAgentID & "');"
Cmd.CommandText = strSQL
Cmd.Executehi steven,
u cannot store the time alone in the datetime obj. it has to be with the
date part. since u have not specified the date , sql server has picked up th
e
default date : 1/1/1900.
optionally u can think of adding the time along with some date and then
ignore the date part , when ever u operate on this field.
anu
"steven scaife" wrote:

> I'm having problems inserting times into my SQL backend through my VB app
> I have a access front end that I am wanting to recreate in VB but when i
> execute my SQL insert statement instead of 09:00:00 showing in the field,
> 01/01/1900 09:00:00 or similar shows, i can insert only a date into the da
te
> field 01/01/2005 and it stores how i want. but i cant seperately store th
e
> time the field is set to datetime.
> any one have any ideas, also I am getting an error with the SQL statement
i
> dont think it likes the ' around the time variable but errors if it isnt
> there. If i paste the SQL statement into query analyzer with the ' it run
s
> no problem.
> TIA
> some sample code is below
> strSQL = "INSERT INTO Appointment (Date_Of_Travel, Time_Of_Appointment,
> House, Postcode, CMS_Ref, Agent_ID) VALUES ('" & _
> DateTrav & "', '" & txtTime & "', '" & txtHouse & "', '" & txtPCode & "',
'"
> & txtCMS & "', '" & txtAgentID & "');"
> Cmd.CommandText = strSQL
> Cmd.Execute
>|||SQL Server doesn't have a TIME datatype. DATETIME always stores both
date and time. Looking at your INSERT statement it seems you have
separate columns for date and time. That doesn't seem like a good idea.
Why use one column instead of two? You can easily separate the date and
time elements when you query the table, or just format it differently
to show only date or only time on screen.
Don't build and execute dynamic SQL strings from user input. It exposes
you to SQL Injection vulnerabilities (Google for it if you don't know).
Data-access code in your client app also increases database maintenance
problems because it forces you to change your application when you make
schema changes. All data access should usually be performed through
parameterized stored procedures.
David Portas
SQL Server MVP
--|||Hi
I'd create stored procedure that accept few parameters
declare @.dt DATETIME,@.t CHAR(5)
SET @.dt=GETDATE()
SET @.t='09:00'
CREATE TABLE #Test
(
col DATETIME
)
INSERT INTO #Test SELECT GETDATE()
INSERT INTO #Test SELECT CAST(CONVERT(CHAR(10),@.dt,112)+@.t AS DATETIME)
SELECT * FROM #Test
"steven scaife" <stevenscaife@.discussions.microsoft.com> wrote in message
news:A60949B8-0E18-46D0-9937-A01761A3FB8D@.microsoft.com...
> I'm having problems inserting times into my SQL backend through my VB app
> I have a access front end that I am wanting to recreate in VB but when i
> execute my SQL insert statement instead of 09:00:00 showing in the field,
> 01/01/1900 09:00:00 or similar shows, i can insert only a date into the
date
> field 01/01/2005 and it stores how i want. but i cant seperately store
the
> time the field is set to datetime.
> any one have any ideas, also I am getting an error with the SQL statement
i
> dont think it likes the ' around the time variable but errors if it isnt
> there. If i paste the SQL statement into query analyzer with the ' it
runs
> no problem.
> TIA
> some sample code is below
> strSQL = "INSERT INTO Appointment (Date_Of_Travel, Time_Of_Appointment,
> House, Postcode, CMS_Ref, Agent_ID) VALUES ('" & _
> DateTrav & "', '" & txtTime & "', '" & txtHouse & "', '" & txtPCode & "',
'"
> & txtCMS & "', '" & txtAgentID & "');"
> Cmd.CommandText = strSQL
> Cmd.Execute
>