Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Wednesday, March 28, 2012

Running a Report Automatically

I want to be able to setup a report that runs everynight at a certain time. Anyone know how to schedule sql server reports?

Thanks

macca

On your report server:

For an existing or shared schedule

Site settings:

Monday, March 26, 2012

Running a job at database startup

Is it possible to run a job (O/S cmd) each time a database is restarted? I
would like to automatically move the existing 'blackbox' trace(s) out of the
default folder at startup time so that they can be analyzed more
conveniently.
Hi
Look at sp_procoption with the startup parameter in BOL.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"JHowell" wrote:

> Is it possible to run a job (O/S cmd) each time a database is restarted? I
> would like to automatically move the existing 'blackbox' trace(s) out of the
> default folder at startup time so that they can be analyzed more
> conveniently.
|||It is possible to have a stored procedure execute at startup. Must be in the
Master DB.
"JHowell" <JHowell@.discussions.microsoft.com> wrote in message
news:4139206F-7C3C-4F8F-8DA9-AF9280A2CC87@.microsoft.com...
> Is it possible to run a job (O/S cmd) each time a database is restarted?
I
> would like to automatically move the existing 'blackbox' trace(s) out of
the
> default folder at startup time so that they can be analyzed more
> conveniently.

Running a job at database startup

Is it possible to run a job (O/S cmd) each time a database is restarted? I
would like to automatically move the existing 'blackbox' trace(s) out of the
default folder at startup time so that they can be analyzed more
conveniently.Hi
Look at sp_procoption with the startup parameter in BOL.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"JHowell" wrote:

> Is it possible to run a job (O/S cmd) each time a database is restarted?
I
> would like to automatically move the existing 'blackbox' trace(s) out of t
he
> default folder at startup time so that they can be analyzed more
> conveniently.|||It is possible to have a stored procedure execute at startup. Must be in the
Master DB.
"JHowell" <JHowell@.discussions.microsoft.com> wrote in message
news:4139206F-7C3C-4F8F-8DA9-AF9280A2CC87@.microsoft.com...
> Is it possible to run a job (O/S cmd) each time a database is restarted?
I
> would like to automatically move the existing 'blackbox' trace(s) out of
the
> default folder at startup time so that they can be analyzed more
> conveniently.

Running a job at database startup

Is it possible to run a job (O/S cmd) each time a database is restarted? I
would like to automatically move the existing 'blackbox' trace(s) out of the
default folder at startup time so that they can be analyzed more
conveniently.Hi
Look at sp_procoption with the startup parameter in BOL.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"JHowell" wrote:
> Is it possible to run a job (O/S cmd) each time a database is restarted? I
> would like to automatically move the existing 'blackbox' trace(s) out of the
> default folder at startup time so that they can be analyzed more
> conveniently.|||It is possible to have a stored procedure execute at startup. Must be in the
Master DB.
"JHowell" <JHowell@.discussions.microsoft.com> wrote in message
news:4139206F-7C3C-4F8F-8DA9-AF9280A2CC87@.microsoft.com...
> Is it possible to run a job (O/S cmd) each time a database is restarted?
I
> would like to automatically move the existing 'blackbox' trace(s) out of
the
> default folder at startup time so that they can be analyzed more
> conveniently.

Wednesday, March 21, 2012

Run Time parameter query

Why is it that I can create a parameter query in Enterprise Manager but
cannot repeat this in query analyser? How could I create a run time parameter
query (in my parlance a query that allows users to input values)!?
Thanks
SamOn Tue, 18 Jan 2005 03:29:03 -0800, Sam wrote:
>Why is it that I can create a parameter query in Enterprise Manager but
>cannot repeat this in query analyser? How could I create a run time parameter
>query (in my parlance a query that allows users to input values)!?
>Thanks
>Sam
Hi Sam,
This can't be done. Interaction with the end user (like asking for a
parameter) must be handled by the client application.
EM apparently has some support for asking parameter values. QA doesn't.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||SQL Server is a back-end server. It cannot ask a user for any parameters since SQL Server runs only
on the server. Possibly EM has some facility to ask for a parameter value, but that would be a
feature in EM. In SQL Server, you typically use stored procedures, where a stored procedure can take
a number of parameters, where the parameters are used inside the query or queries inside the
procedure.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:3755656C-5C1E-4AB5-9018-68B80F3FA855@.microsoft.com...
> Why is it that I can create a parameter query in Enterprise Manager but
> cannot repeat this in query analyser? How could I create a run time parameter
> query (in my parlance a query that allows users to input values)!?
> Thanks
> Sam
>sql

Run Time parameter query

Why is it that I can create a parameter query in Enterprise Manager but
cannot repeat this in query analyser? How could I create a run time parameter
query (in my parlance a query that allows users to input values)!?
Thanks
Sam
On Tue, 18 Jan 2005 03:29:03 -0800, Sam wrote:

>Why is it that I can create a parameter query in Enterprise Manager but
>cannot repeat this in query analyser? How could I create a run time parameter
>query (in my parlance a query that allows users to input values)!?
>Thanks
>Sam
Hi Sam,
This can't be done. Interaction with the end user (like asking for a
parameter) must be handled by the client application.
EM apparently has some support for asking parameter values. QA doesn't.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||SQL Server is a back-end server. It cannot ask a user for any parameters since SQL Server runs only
on the server. Possibly EM has some facility to ask for a parameter value, but that would be a
feature in EM. In SQL Server, you typically use stored procedures, where a stored procedure can take
a number of parameters, where the parameters are used inside the query or queries inside the
procedure.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:3755656C-5C1E-4AB5-9018-68B80F3FA855@.microsoft.com...
> Why is it that I can create a parameter query in Enterprise Manager but
> cannot repeat this in query analyser? How could I create a run time parameter
> query (in my parlance a query that allows users to input values)!?
> Thanks
> Sam
>

Run Time parameter query

Why is it that I can create a parameter query in Enterprise Manager but
cannot repeat this in query analyser? How could I create a run time paramete
r
query (in my parlance a query that allows users to input values)!?
Thanks
SamOn Tue, 18 Jan 2005 03:29:03 -0800, Sam wrote:

>Why is it that I can create a parameter query in Enterprise Manager but
>cannot repeat this in query analyser? How could I create a run time paramet
er
>query (in my parlance a query that allows users to input values)!?
>Thanks
>Sam
Hi Sam,
This can't be done. Interaction with the end user (like asking for a
parameter) must be handled by the client application.
EM apparently has some support for asking parameter values. QA doesn't.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||SQL Server is a back-end server. It cannot ask a user for any parameters sin
ce SQL Server runs only
on the server. Possibly EM has some facility to ask for a parameter value, b
ut that would be a
feature in EM. In SQL Server, you typically use stored procedures, where a s
tored procedure can take
a number of parameters, where the parameters are used inside the query or qu
eries inside the
procedure.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Sam" <Sam@.discussions.microsoft.com> wrote in message
news:3755656C-5C1E-4AB5-9018-68B80F3FA855@.microsoft.com...
> Why is it that I can create a parameter query in Enterprise Manager but
> cannot repeat this in query analyser? How could I create a run time parame
ter
> query (in my parlance a query that allows users to input values)!?
> Thanks
> Sam
>

Run time jobs

A job is created to fetch data from source server and populate the
destination server. This job has the owner as windows authentication(user
account). This main job inturn creates sub jobs with owner as sa.
when i run the sub jobs from query analyser it works fine. But when ran from
sql server agent/jobs it is failing with the following error.
Msg 18456, Sev 14: Login failed for user 'CHNDomain\CHNSHL23456$'. [SQLS
TATE
28000]
Msg 7312, Sev 14: [SQLSTATE 01000].
[Note: CHNSHL23456$ is the destination system number]
when same job ran from query analyser that was logged using 'sa' account
fails with the following error.
Server: Msg 18456, Level 14, State 1, Line 1
Login failed for user 'sa'.
[OLE/DB provider returned message: Invalid connection string attribute]
The windows authenticated user ID exists in both source server/destination
server users list.
Pls hlp to get rid of this error.
Regards,
SSKSSK
Does the login have full pemissions? What is an account SQL Server Agent run
under?
"SSK" <SSK@.discussions.microsoft.com> wrote in message
news:CC9BF3BD-5394-40B1-A8E2-7D1DAC73BBA2@.microsoft.com...
>A job is created to fetch data from source server and populate the
> destination server. This job has the owner as windows authentication(user
> account). This main job inturn creates sub jobs with owner as sa.
> when i run the sub jobs from query analyser it works fine. But when ran
> from
> sql server agent/jobs it is failing with the following error.
> Msg 18456, Sev 14: Login failed for user 'CHNDomain\CHNSHL23456$'.
> [SQLSTATE
> 28000]
> Msg 7312, Sev 14: [SQLSTATE 01000].
> [Note: CHNSHL23456$ is the destination system number]
> when same job ran from query analyser that was logged using 'sa' account
> fails with the following error.
> Server: Msg 18456, Level 14, State 1, Line 1
> Login failed for user 'sa'.
> [OLE/DB provider returned message: Invalid connection string attribute
]
> The windows authenticated user ID exists in both source server/destination
> server users list.
> Pls hlp to get rid of this error.
> Regards,
> SSK
>|||What account is the SQL Agent service running under ? Jobs owned by sa will
access resources under the context of the SQL Agent service account.
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"SSK" <SSK@.discussions.microsoft.com> wrote in message
news:CC9BF3BD-5394-40B1-A8E2-7D1DAC73BBA2@.microsoft.com...
>A job is created to fetch data from source server and populate the
> destination server. This job has the owner as windows authentication(user
> account). This main job inturn creates sub jobs with owner as sa.
> when i run the sub jobs from query analyser it works fine. But when ran
> from
> sql server agent/jobs it is failing with the following error.
> Msg 18456, Sev 14: Login failed for user 'CHNDomain\CHNSHL23456$'.
> [SQLSTATE
> 28000]
> Msg 7312, Sev 14: [SQLSTATE 01000].
> [Note: CHNSHL23456$ is the destination system number]
> when same job ran from query analyser that was logged using 'sa' account
> fails with the following error.
> Server: Msg 18456, Level 14, State 1, Line 1
> Login failed for user 'sa'.
> [OLE/DB provider returned message: Invalid connection string attribute
]
> The windows authenticated user ID exists in both source server/destination
> server users list.
> Pls hlp to get rid of this error.
> Regards,
> SSK
>|||The SQL server agent is started by Local System account.
The login account has admin privileges on source and destination server als
o.
"Jasper Smith" wrote:

> What account is the SQL Agent service running under ? Jobs owned by sa wil
l
> access resources under the context of the SQL Agent service account.
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "SSK" <SSK@.discussions.microsoft.com> wrote in message
> news:CC9BF3BD-5394-40B1-A8E2-7D1DAC73BBA2@.microsoft.com...
>
>|||Local System does not have access to network resources. If
you are accessing other servers, you need to use a domain
account for the service with the appropriate permissions.
-Sue
On Wed, 24 Aug 2005 23:33:09 -0700, SSK
<SSK@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>The SQL server agent is started by Local System account.
>The login account has admin privileges on source and destination server al
so.
>"Jasper Smith" wrote:
>

Run time error: out-of-range datetime value

Hi everyone, this is the exception:

System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value

Here's my code!


... 'datagrid code
cmdSelect.CommandText = "SELECT * FROM [Table] WHERE [Date and Time] > '" & Me.tbFromDate.Text & "' AND [Date and Time] < '" & Me.tbToDate.Text & "'"
...

Me.tbFromDate.Text and Me.tbFromDate.text look like this: 27/11/2003 1:11:43 PM

The SQL Query works fine - just that this code gives a runtime error.

Can someone help?? I'm guessing I have to do somekind of conversion!!

AndrewDoes your sql query work fine with 27/11/2003 1:11:43 PM
or 11/27/2003 1:11:43 PM

While checking the date Try DateTime.Parse<your date>)

run time error: Encountered the symbol "S" when expecting one of the following:

ocasionally, in the testing environment we receive following error:
(we using Oracle 9i), error is reported by the EXCEPTION
WHEN OTHERS THEN (see below)

upon logging ad posting status for 250
Normal -6550 ORA-06550: line 4, column 308:
PLS-00103:
Encountered the symbol "S" when expecting one of the following:
. ( ) , * @. % & | = - + < / > at in is mod not range rem => .. <>
or != or ~= >= <= <> and or like between ||
************************************************** *******

I am providing a complete PL/SQL, this error only occurs at the run-time

PROCEDURE logPostingStatus(p_session_id IN NUMBER,
p_person_id IN NUMBER,
p_ad_id IN NUMBER,
p_production IN VARCHAR2 DEFAULT 'y',
p_status IN VARCHAR2 DEFAULT 'started',
p_files IN VARCHAR2 DEFAULT null,
p_note IN VARCHAR2 DEFAULT null,
p_site_profile_id IN NUMBER DEFAULT -1,
p_site_id IN NUMBER DEFAULT -1)
AS

v_posted_before DATE;
v_change_type VARCHAR2(32);
v_job_num NUMBER;

v_files_passed VARCHAR2(2048) DEFAULT replace(ltrim(rtrim(p_files)), ',', '<br>');
v_files_just_pushed VARCHAR2(2048);
v_files_pushed_before VARCHAR2(2048);
v_files_to_purge VARCHAR2(2048);
v_filename VARCHAR2(256);
v_status VARCHAR2(16) DEFAULT p_status; -- the new status
v_pos NUMBER;
v_phase VARCHAR2(16);

BEGIN

UPDATE ad_post_status
SET end_time = SYSDATE,
-- update the status in the posting status, repeating status => ended
status = decode(status, 'aborted', 'aborted',
lower(p_status), 'ended',
lower(p_status)),
-- append the files pushed by this thread.
files_pushed = decode(files_pushed, null, v_files_passed,
files_pushed || '<br>' || v_files_passed),
note = decode(note, null, p_note, note || '. ' || p_note)
WHERE session_id = p_session_id and ad_id = p_ad_id and production = p_production
RETURNING files_pushed, status INTO v_files_just_pushed, v_status;
-- files_pushed now holds the files pushed by the both threads
-- v_status is the new status

IF (SQL%ROWCOUNT = 0) THEN

-- no log exists for the job yet: we are starting a new job (status will be
-- 'started', the column default)
INSERT INTO ad_post_status (session_id, ad_id, production, note, initiated_by)
VALUES(p_session_id, p_ad_id, p_production, p_note, p_person_id);

END IF;

-- log the session ID in the site/site profile if it is site/site profile roll-out
IF (p_site_profile_id > 0) THEN

UPDATE site_profile
SET roll_session = p_session_id
WHERE site_profile_id = p_site_profile_id and roll_session is null;

ELSIF (p_site_id > 0) THEN

UPDATE site
SET roll_session = p_session_id
WHERE site_id = p_site_id and roll_session is null;

END IF;

-- if two threads complete successfully ...
IF (v_status = 'ended') THEN

-- update posting time
IF (p_production <> 'y') THEN

UPDATE ad SET posted_preview = SYSDATE where ad_id = p_ad_id;

ELSE

SELECT posted_production, change_type
INTO v_posted_before, v_change_type
FROM ad
WHERE ad_id = p_ad_id;

-- ad descriptor_status: off (non-deleted) -> on
UPDATE ad SET descriptor_status = 'on',
dtor_status_modified_by = p_person_id,
dtor_status_modified_reason = 'ad approved and files pushed sucessfully'
WHERE ad_id = p_ad_id
AND status not in ('deleted','failed')
AND descriptor_status = 'off';

-- ad status pending -> live
UPDATE ad SET status = 'live',
status_modified_by = p_person_id,
status_modified_reason = 'ad approved and files pushed successfully'
WHERE ad_id = p_ad_id AND status = 'pending';

UPDATE ad SET posted_production = SYSDATE,
change_type = null
WHERE ad_id = p_ad_id;

-- decrement the live ad count as we are rolling out site profile changes
IF (p_site_profile_id > 0) THEN

UPDATE site_profile
SET roll_ad_count_rolled = roll_ad_count_rolled + 1,
roll_session = p_session_id,
status_modified_by = p_person_id
WHERE site_profile_id = p_site_profile_id;

ELSIF (p_site_id > 0) THEN

UPDATE site
SET roll_ad_count_rolled = roll_ad_count_rolled + 1,
roll_session = p_session_id,
status_modified_by = p_person_id
WHERE site_id = p_site_id;

END IF;

-- send traffic reminder email in 24 hours if the ad was approved not for the first time
-- (and not trafficed in 24 hours)
IF (v_posted_before is not null and instr(v_change_type, 'T') > 0) THEN

DBMS_JOB.SUBMIT(v_job_num,
'notify.trafficReminder(' || p_ad_id || ',' || p_person_id || ');',
SYSDATE + 1);

END IF;

/*
* handle akamai file purge: store the files to be pushed;
* detect if there is any file that needs to be purged,
* if yes, send reminder email
*/

v_files_to_purge := '';

IF (v_files_just_pushed || '' = '') THEN
UPDATE ad_post_status
SET files_pushed = '(no file to push)'
WHERE session_id = p_session_id and ad_id = p_ad_id and production = p_production;
RETURN;
END IF;

BEGIN
-- files just pushed
SELECT value INTO v_files_pushed_before
FROM ad_prop
WHERE ad_id = p_ad_id AND name = 'files_pushed';

-- find files to be purged, e.g., files that are passed from p_files and already
-- in the ad_prop 'files_pushed'
LOOP
-- parse the filenames from files_pushed
EXIT WHEN (length(v_files_just_pushed || 'x') = 1);
v_pos := instr( v_files_just_pushed, '<br>' );
IF (nvl(v_pos, 0) = 0) THEN
v_pos := length(v_files_just_pushed) + 1;
END IF;

v_filename := ltrim(rtrim(substr(v_files_just_pushed,1,v_pos-1)));

IF (length(v_filename) > 0) THEN
IF (instr(v_files_pushed_before, v_filename) <= 0) THEN
UPDATE ad_prop
SET value = value || '<br>' || v_filename
WHERE ad_id = p_ad_id
AND name = 'files_pushed';
ELSE
-- the string @.@. is used as a place-holder for the site tag file path
-- the string !! is used as a place-holder for the ad file path
-- the string ## is used for the creative (generic) file path
IF (instr(v_filename, '_sitetag.txt') > 0) THEN
v_files_to_purge := v_files_to_purge || '..@.@.' || v_filename;
ELSIF (instr(v_filename, 'SiteId_') = 1) THEN
v_files_to_purge := v_files_to_purge || '..!!' || v_filename;
ELSE
v_files_to_purge := v_files_to_purge || '..##' || v_filename;
END IF;
END IF;
END IF;
-- jump over the delimiter <br>
v_files_just_pushed := substr( v_files_just_pushed, v_pos+4 );

END LOOP;

-- notify of files to be purged
IF (v_files_to_purge || 'x' <> 'x') THEN
notify.filesToPurge(p_ad_id, v_files_to_purge, p_person_id, p_site_profile_id, p_site_id);
END IF;

EXCEPTION
WHEN NO_DATA_FOUND THEN
-- no file has been pushed before: insert the ad_prop
INSERT INTO ad_prop (ad_id, type, name, value)
VALUES(p_ad_id, '-', 'files_pushed', v_files_just_pushed);

END;

END IF;

ELSIF (v_status = 'aborted') THEN

-- determine phase to be written into error notification
IF (p_production = 'y') THEN
v_phase := 'production';
ELSE
v_phase := 'live preview';
END IF;

-- decrement the live ad count as we are rolling out site profile changes
IF (p_site_profile_id > 0) THEN

UPDATE site_profile
SET roll_ad_count_rolled = roll_ad_count_rolled + 1,
roll_session = p_session_id,
status_modified_by = p_person_id
WHERE site_profile_id = p_site_profile_id
AND roll_ad_count > 0;

ELSIF (p_site_id > 0) THEN

UPDATE site
SET roll_ad_count_rolled = roll_ad_count_rolled + 1,
roll_session = p_session_id,
status_modified_by = p_person_id
WHERE site_id = p_site_id
AND roll_ad_count > 0;

END IF;

notify.postError(p_ad_id, p_person_id, p_site_profile_id, p_site_id, v_phase, p_note);

END IF;

EXCEPTION
WHEN OTHERS THEN
library.logError('upon logging ad posting status for ' || to_char(p_ad_id));
--raise_application_error( -20002, 'logging ad posting status failed');

END logPostingStatus;I can't see where the error is coming from, but try this: comment out (or remove) all the exception handling:

--EXCEPTION
--WHEN OTHERS THEN
--library.logError('upon logging ad posting status for ' || to_char(p_ad_id));

Then the error message will inform you of precisely which line of code the error occured on.

One error I did spot (but is irrelevant to your problem):

IF (v_files_just_pushed || '' = '') THEN

This will never be true, because in Oracle '' is equivalent to NULL, and NULL = NULL is never true. Your test should be:

IF v_files_just_pushed IS NULL THENsql

run time error 3265 after moving from Sql servr 7 to sql server 20

Hopefully somebody see the mistake I am doing.
We are using an Vb application connecting to SQL 7. After moving to SQL 2000
and Windows 2000 system the same application send error message when trying
to insert or update any data via the VB application. What did I missied to
transfer?
I try to move the application via the Copy wizard and also via data import
and both had same result. I also checked the security settings on the old
server and the new one.
Thanks Katja
What exactly are you doing when you get the error?
Andrew J. Kelly SQL MVP
"Katja J." <Katja J.@.discussions.microsoft.com> wrote in message
news:8ABAEC7E-CB87-415F-9066-D19340ED688B@.microsoft.com...
> Hopefully somebody see the mistake I am doing.
> We are using an Vb application connecting to SQL 7. After moving to SQL
> 2000
> and Windows 2000 system the same application send error message when
> trying
> to insert or update any data via the VB application. What did I missied to
> transfer?
> I try to move the application via the Copy wizard and also via data import
> and both had same result. I also checked the security settings on the old
> server and the new one.
> Thanks Katja

Run Time Error '-2147467259(80004005)':

WE have couple of applications using sql and were working
till friday 01/02/04. This morning when users are trying
to access it giveing the error Run Time Error '-2147467259
(80004005)':
Invalid connection String.
Any Idea.
Application connects to 2 sql 6.5 servers and 1 sql 2000
server. I changed the TCP/Ip ports on one of the server
in server network Utility to 1521 and changed it back to
1433 . nothing else. has changed as far as I can think
of.. please help THanks in advanceReply back with the connection string syntax.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

run time error

I create an application with Visual Basic 6 and Crystal Report 10
with IDE Environment.While Developing the application it works fine
in my system.but after i made the application
setup, and when while I am deploying (install)the application
in the same system (widows xp) it show run time error. i ignore the
error and continue the installiation till the end.
and then when i run the application it works ok but when i use print
command it show error(crviewer file not found). and the application
closed.so what is the problem here.please help
to solve it.

thanksEither you have not included the crviewer.dll file in your setup package or there might have been a problem while copying/registering the file. Try registering the File manually using regsvr32.

Run Time Database Connection

Hi
I 've created dsn for sqlserver during run time but while connecting with crystalreport it gives ODBC Error . I need to connect using CRAXDRT.Report,CRAXDRT.Application ,I'm Using vb as front end
Thanks In AdvGenerall the errors are descriptive, so please provide details on which ODBC error it is.

Dave
(Me.HomeTown = DarrenLehmann.HomeTown)
Go Aussies.|||Hi Spring soft

I solved my problem thanx for ur post|||Hi Tony,
Perhaps you could let us know the solution, for enlightenment of others.
On reflection, I suspect the report had a subreport. That's the most common reason (apart from improperly structured formulae) that raises ODBC errors.

Dave|||Ofcourse dave

Private m_crxApp As New CRAXDRT.Application
Private m_crxRep As CRAXDRT.Report
Attribute m_crxRep.VB_VarHelpID = -1
Private m_crxTab As CRAXDRT.DatabaseTable
Implements clsSimpleReport
Public Function clsSimpleReport_RunReport(sReportFileName As String, sTitle As String) As Variant
Dim i As Integer, j As Integer
On Error Resume Next
Screen.MousePointer = 11
m_crxApp.LogOnServer "p2sodbc.dll", "DSN", "DBNAME, "UID", "PWD"
Set m_crxRep = m_crxApp.OpenReport(App.Path & "\Reports\" & sReportFileName)
crvReport.ReportSource = m_crxRep
crvReport.ViewReport
End sub

My mistake was instead of p2sodbc.dll in logon server function i put some other dll file i'm not remembering that nowsql

Run SQL2k SE 32-bit on 64-bit machine?

Is this possible? If so, are there any OS configurations that need to be se
t
ahead of time? When attempting to install, I am getting an error that says:
The image file autorun.exe is valid, but for a machine type other than the
current machine.
Thanks!Try running setup ipv autorun; autorun is likely a 16 bit app, which
will not run on x64.
Mitch wrote:
> Is this possible? If so, are there any OS configurations that need to be
set
> ahead of time? When attempting to install, I am getting an error that say
s:
> The image file autorun.exe is valid, but for a machine type other than the
> current machine.
> Thanks!

Run SQL2k SE 32-bit on 64-bit machine?

Is this possible? If so, are there any OS configurations that need to be set
ahead of time? When attempting to install, I am getting an error that says:
The image file autorun.exe is valid, but for a machine type other than the
current machine.
Thanks!Try running setup ipv autorun; autorun is likely a 16 bit app, which
will not run on x64.
Mitch wrote:
> Is this possible? If so, are there any OS configurations that need to be set
> ahead of time? When attempting to install, I am getting an error that says:
> The image file autorun.exe is valid, but for a machine type other than the
> current machine.
> Thanks!

Tuesday, March 20, 2012

run sql script at a specific time

I have an sql statement that I can run by hand. How do I get a job to run this automatically.
I have tried to create a job and it just failes out every time...You need to give more information. What does your job do. What job steps are executed. What error messages are generated...
Start by setting the job to log messages to a file for review.|||Sorry for the late response here is my sql statement:

use intranet;
INSERT INTO USER_INFO (fpu_id,FIRSTNAME, LASTNAME, BOXNUMBER) SELECT id,first,last,box FROM stmailbox WHERE id NOT IN (SELECT FPU_ID FROM USER_INFO);

And when I go through the DTS screens. Telling DTS to copy data from a 3 column temp database to a permanent database called USER_INFO I get a warning that says "LINE 3 incorrect syntax near ')'" This is for the create table steps....

Under the next line I get, Invalid Opject named results...

I am new to DTS,

Any help would be good|||You are still not making any sense.
In your first post you say you have a job that is failing. In your second post you are talking about a DTS package.
You list some SQL code, but not how this has anything to do with your DTS package. Your error "LINE 3 incorrect syntax near ')'" doesn't even make sense given that your code only has two lines. I don't even know whether your error is referring to your SQL statement or code within your DTS package.

Run reports on SQL 2000 databases with RS 2005?

All our databases are running on SQL 2000, with no migration to SQL
2005 planned at this time.
We do not currently use Reporting Services. A deployment of Reporting
Services 2005 is in the pipeline.
My question is, will I need to install RS 2005 on a SQL 2000 server to
be able to report on my 2000 databases? Or will it work to install RS
2005 on SQL2005 and report on SQL 2000 databases?
Thanks for helping a neophyte.The box that run RS 2005 must have a SQL Server 2005 license. You can use
SQL 2000 as the object/metadata store or you can use SQL 2005. RS reports
off of many many different types of data (SQL Server 2000, 2005, Sybase,
Oracle, etc). The does not need to and in many cases does not reside on the
same box as RS.
Even when you install RS it does not have to have the database on the same
machine(it must have a database for its object/metadata store, it just does
not have to be on the same machine) However, even if the database resides
elsewhere you have to have a license on whatever box you install RS 2005.
My preference is to have SQL Server 2005 on the box with RS even if it is
only used for RS and all the data being reported off of is elsewhere.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"xr7" <ewilson@.tpna.com> wrote in message
news:1158165177.262203.310810@.d34g2000cwd.googlegroups.com...
> All our databases are running on SQL 2000, with no migration to SQL
> 2005 planned at this time.
> We do not currently use Reporting Services. A deployment of Reporting
> Services 2005 is in the pipeline.
> My question is, will I need to install RS 2005 on a SQL 2000 server to
> be able to report on my 2000 databases? Or will it work to install RS
> 2005 on SQL2005 and report on SQL 2000 databases?
> Thanks for helping a neophyte.
>|||Yes, this will work:
"Or will it work to install RS 2005 on SQL2005 and report on SQL 2000
databases?"
Steve MunLeeuw
"xr7" <ewilson@.tpna.com> wrote in message
news:1158165177.262203.310810@.d34g2000cwd.googlegroups.com...
> All our databases are running on SQL 2000, with no migration to SQL
> 2005 planned at this time.
> We do not currently use Reporting Services. A deployment of Reporting
> Services 2005 is in the pipeline.
> My question is, will I need to install RS 2005 on a SQL 2000 server to
> be able to report on my 2000 databases? Or will it work to install RS
> 2005 on SQL2005 and report on SQL 2000 databases?
> Thanks for helping a neophyte.
>

Monday, March 12, 2012

run profiler when high cpu

I want to have profiler run for a period of time - 5 minutes - when system
cpu exceeds 90%. This would happen automatically. Can this be done?
My suggestion would be to add an alert to Performance Monitor to detect the
> 90% CPU, and then have it execute 'the relevant SQL' to start a
server-side profile. See
http://vyaskn.tripod.com/server_side_tracing_in_sql_server.htm for the
latter. The '5 minutes' would just be a case of storing the trace start
time somewhere, and having a SQL job that runs intermittently that stops the
trace after the required time.
"nickI" <nickI@.discussions.microsoft.com> wrote in message
news:184E59AD-FE7A-40FB-9783-BAAA17BF0348@.microsoft.com...
>I want to have profiler run for a period of time - 5 minutes - when system
> cpu exceeds 90%. This would happen automatically. Can this be done?

Run package performance

i made a packge with sql task

this task execute stored procedure contains cursor

it take alot of time (arround 1 houre ), want increase the performance

note: sql2005 and sp2

please help

You might want to ask your question in the Transact-SQL forum and while there, provide the details of your stored procedure to them. I don't believe this to be an SSIS issue -- not yet anyway.|||The performance is not related to SSIS at all. Well, probably not.

How long does it take to run if you execute it through MSSMS?
if you have a cursor in the proc, this is most probably your problem and the code contain within it. SQL is not a row based language.

Use the SQL group for help on performance of the procedure.