Showing posts with label agent. Show all posts
Showing posts with label agent. Show all posts

Wednesday, March 7, 2012

Compairing updated data base.

I do not know SQL but learning fast and furious.

I am programming an agent and working with a group of existing databases.
I would like to able to compare the database before and after an update.
The testing databases are relatively small.
I have no problem programming some compare but how do I go about it.

Should I do this in SQL duplicating the database.
I would be happy to write some SQL and dump the databases and do the compare
externally.

I would appreciate any suggestion.

AndreIf you just want to compare data between similar tables you can do so
with a JOIN:

SELECT COALESCE(A.key_col, B.key_col),
COALESCE(A.col1, B.col1), COALESCE(A.col2, B.col2), ...
FROM TableA AS A
FULL JOIN TableB AS B
ON A.key_col = B.key_col
WHERE COALESCE(A.col1,'')<>COALESCE(A.col1,'')
AND COALESCE(A.col2,'')<>COALESCE(A.col2,'')

assuming key_col is the primary key in both tables.

--
David Portas
SQL Server MVP
--|||What I would like to do is probably
1) back up the data base
2) restore it under a different name
-- run my agent
3) create a difference database ( a new database with any table which is
different)

Step 1 and 2 are easy so can be ignored
now step 3
I can create a new temporary database but how can I fill the tables in this
database using SQL

"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1111586542.235632.69940@.o13g2000cwo.googlegro ups.com...
> If you just want to compare data between similar tables you can do so
> with a JOIN:
> SELECT COALESCE(A.key_col, B.key_col),
> COALESCE(A.col1, B.col1), COALESCE(A.col2, B.col2), ...
> FROM TableA AS A
> FULL JOIN TableB AS B
> ON A.key_col = B.key_col
> WHERE COALESCE(A.col1,'')<>COALESCE(A.col1,'')
> AND COALESCE(A.col2,'')<>COALESCE(A.col2,'')
> assuming key_col is the primary key in both tables.
> --
> David Portas
> SQL Server MVP
> --|||Andre Arpin (arpin@.kingston.net) writes:
> What I would like to do is probably
> 1) back up the data base
> 2) restore it under a different name
> -- run my agent
> 3) create a difference database ( a new database with any table which is
> different)
> Step 1 and 2 are easy so can be ignored
> now step 3
> I can create a new temporary database but how can I fill the tables in
> this database using SQL

Red Gate has products for this, check out http://www.red-gate.com/.

If you would like to roll your own, you would have to write a query
like the one that David showed you for each table.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||You can easily populate a table from another in a different database:

INSERT INTO DatabaseA.dbo.TableA (col1, col2, ...)
SELECT col1, col2, ...
FROM DatabaseB.dbo.TableB
WHERE ... ?

--
David Portas
SQL Server MVP
--

Saturday, February 25, 2012

Communication Link Failure

SQL 7, SP4
windows NT 4, SP6
SQL Server Agent jobs are failing, history
reports "ConnectionRead (SQLState 01000) Message 0
Communication Link Failure (SQL Sate 08S01) (Error 10004)
Jobs have been working fine until yesterday.
DBCC checkdb master, msdb, no errors reported.
I can backup the databases through a third party
application though, so what's up with the ODBC error
message reported by the job history?
Internet searching no help.
Need someone to come to my rescue!"Mary" <Mary_Scheffler@.urscorp.com> wrote in message
news:030e01c3fc16$dc082ff0$3a01280a@.phx.gbl...
> SQL 7, SP4
> windows NT 4, SP6
> SQL Server Agent jobs are failing, history
> reports "ConnectionRead (SQLState 01000) Message 0
> Communication Link Failure (SQL Sate 08S01) (Error 10004)
> Jobs have been working fine until yesterday.
> DBCC checkdb master, msdb, no errors reported.
> I can backup the databases through a third party
> application though, so what's up with the ODBC error
> message reported by the job history?
Check this out -- may be caused if there are pending transactions:
http://support.microsoft.com/defaul...kb;en-us;114630
Steve

Tuesday, February 14, 2012

command window open when SQL agent start

When i start mssqlserver service, it do not start SQLAgent
It is listed in the dependancies of both
when i start the sqlAgent manually, there is a command window that opens up with nothing in it, just the cursor blinking, BUT everything runs fine, the msssqlServer and the SQLAgent are both running
if i close that window, SQLAgent stop, and naturally, the connection to the DB is lost as well.
This never use to do that before
?
Thanx
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
You need to check the configuration for the service. Go to
Services(from Control Panel or Administrative Tools -
depending on your OS).
Go to the sqlserveragent service and view the properties for
the service. Select the LogOn tab and make sure to uncheck
the "Allow service to interact with desktop" checkbox.
-Sue
On Wed, 23 Jun 2004 07:51:56 -0700, korivo
(mathieu_corriveau@.hotmail.com) wrote:

>When i start mssqlserver service, it do not start SQLAgent
>It is listed in the dependancies of both
>when i start the sqlAgent manually, there is a command window that opens up with nothing in it, just the cursor blinking, BUT everything runs fine, the msssqlServer and the SQLAgent are both running
>if i close that window, SQLAgent stop, and naturally, the connection to the DB is lost as well.
>This never use to do that before
>?
>Thanx
>************************************************* *********************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

command window open when SQL agent start

When i start mssqlserver service, it do not start SQLAgent
It is listed in the dependancies of both
when i start the sqlAgent manually, there is a command window that opens up
with nothing in it, just the cursor blinking, BUT everything runs fine, the
msssqlServer and the SQLAgent are both running
if i close that window, SQLAgent stop, and naturally, the connection to the
DB is lost as well.
This never use to do that before
?
Thanx
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...You need to check the configuration for the service. Go to
Services(from Control Panel or Administrative Tools -
depending on your OS).
Go to the sqlserveragent service and view the properties for
the service. Select the LogOn tab and make sure to uncheck
the "Allow service to interact with desktop" checkbox.
-Sue
On Wed, 23 Jun 2004 07:51:56 -0700, korivo
(mathieu_corriveau@.hotmail.com) wrote:

>When i start mssqlserver service, it do not start SQLAgent
>It is listed in the dependancies of both
>when i start the sqlAgent manually, there is a command window that opens up
with nothing in it, just the cursor blinking, BUT everything runs fine, the
msssqlServer and the SQLAgent are both running
>if i close that window, SQLAgent stop, and naturally, the connection to the
DB is lost as well.
>This never use to do that before
>?
>Thanx
> ****************************************
******************************
>Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
>Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resourc
es...

command textbox in job has limitations ?

Hi ,
Is there any word limitations in the command text box of a job Management --
> SQL Server Agent --> Jobs '
it seems there is and it has given me some issue.
i have pasted all the SQL statements into a .sql file but how do i call that
file ?
i know using Osql is able to do so but is there other easier method (i.e i
dun have to create a batch file with the osql commands) w/o having to create
too many files
apreciate ur advice
tks & rdgs
Message posted via http://www.webservertalk.commaxzsim via webservertalk.com (u14644@.uwe) writes:
> it seems there is and it has given me some issue.
> i have pasted all the SQL statements into a .sql file but how do i call
> that file ?
> i know using Osql is able to do so but is there other easier method (i.e
> i dun have to create a batch file with the osql commands) w/o having to
> create too many files
You could put the stuff in a stored procedure, although this has some
implications, and depending on what your script does it may not be
practical.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||tks Erland Sommarskog , i have used DTS and put the script in the SQLTask
Erland Sommarskog wrote:
>[quoted text clipped - 4 lines]
>You could put the stuff in a stored procedure, although this has some
>implications, and depending on what your script does it may not be
>practical.
>
Message posted via http://www.webservertalk.com

Sunday, February 12, 2012

command line parameters are invalid in SQL server Agent

Hi

Microsoft confirmed that the error message "The command line parameters are invalid" issue mentioned above is a bug and has been resolved in the next "drop" of SQL Server 2005.

has this error been fixed by microsoft. Cos i still get this error!!!!!!!!!

I am also trying to run the package from command line and when i click on execute the package it runs half way and hangs. What could be the problem?.

But when i run it from my Studio and stored package it works fine!!!

Thanks,

Jas

Perhaps the command line is incorrect. You do appear to have some keys that stick on your keyboard, which could lead to typing invalid commands.

Seriously, we need some more information to help you. What command line parameters are you trying to set?

Your second issue probably needs another thread. We would need to know what the package does - what tasks execute and what it is doing when it hangs.

Donald

|||

I have created a job to execute a SSIS package located in the SSIS Package Store. When starting the job I receive an error. The history log reports:

Message
Executed as user: semaster\vagnel. The command line parameters are invalid. The step failed.

I did not write this command line it is auto generated through wizard.


This is the command line:

/SQL "\ArchiveMain" /SERVER "SE413695\AASQL2005" /WARNASERROR /MAXCONCURRENT " -1 " /CHECKPOINTING OFF

Thanks,

Jasmine