Thursday, March 29, 2012
Adding a sysdate to a tablename
SELECT *
INTO tablename + CONVERT(char(10), GETDATE(), 112)
FROM tablename
So the tablename should looksomething like this
tablename20031210
The error message is: incorrect syntax near +
Can anybody help.
ThanksUse dynamic Sql within pl/sql:
l_statement varchar2(100);
begin
l_statement:=' create table name_'||to_char(sysdate,'DDMMRRRR');
l_statement:=l_statement||define colums here
execute immediate l_statement;
end;
eventually you must append an ; at the end of the varchar2 because it is an DDL-Statement
Adding a sysdate to a table
SELECT *
INTO tablename + CONVERT(char(10), GETDATE(), 112)
FROM tablename
So the tablename should looksomething like this
tablename20031210
The error message is: incorrect syntax near +
Can anybody help.
ThanksMaybe...
Declare @.Query nVarchar(1000)
SET @.Query=N'Select * From ' + 'tablename' + CONVERT(char(10), GETDATE(), 112)
EXECUTE sp_executesql @.Query, N'@.level tinyint', @.level = 35|||Thanks a lot this has been driving me crazy. I had to modify the code slightly but it works fine.
DECLARE @.Query nVarchar(1000)
SET @.Query = N'Select * INTO ' + 'tablename' + CONVERT(char(10), GETDATE(), 112) + 'FROM tablename' EXECUTE sp_executesql @.Query, N'@.level tinyint',
@.level = 35
Sunday, March 25, 2012
Adding a linked server?
What I would like to do is export only the current month records from this database\table to another database\table (Statements\Clientdata) by means of a stored proc.
How do I setup the store proc as I have not done one yet ?
Thanksy dont u use a DTS package?
Monday, March 19, 2012
Add user to Local Group Error
Guys,
I need help installing SQL Server 2005. I meet all of the pre-req's and setup seems to run normally until it starts installing the services and database engine. I receive the following error:
SQL Server Setup was unable add user NT AUTHORITY\NETWORK SERVICE to local group SQLSERVER2005DTSUser$server.
It repeats the error for for the other groups that are created with SQL install.
Am i missing something that's obvious? I couldn't find anything in the documentation or anywhere else.
Here are a couple of things to try:
1. Check the installation log files, located at %Program Files%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files for more details on the error.
2. Try to add the service manually to the local groups using the Computer Management Admin tool. Then re-run setup.
Paul
Sunday, March 11, 2012
Add step to JOB that checks to see if Maintenance Plan X is running
How can I add a step to a job that will check to see if a maintenance
plan is running? If it is, don't run the rest of the job, but if it
isn't run the rest of the job.
Thanks!
KiranYou could look at the job state:
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
Add step to JOB that checks to see if Maintenance Plan X is running
How can I add a step to a job that will check to see if a maintenance
plan is running? If it is, don't run the rest of the job, but if it
isn't run the rest of the job.
Thanks!
Kiran
You could look at the job state:
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
Add step to JOB that checks to see if Maintenance Plan X is running
How can I add a step to a job that will check to see if a maintenance
plan is running? If it is, don't run the rest of the job, but if it
isn't run the rest of the job.
Thanks!
KiranYou could look at the job state:
http://www.replicationanswers.com/D...RunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
Add spaces to a string value in a cell
Hi,
I am trying to add spaces to a string value in a cell but when I run the report the value is trimmed.
Any ideas?
Here is the expression I am using:
=Fields!strVal.Value & " "
Thanks,
Igor
Igor,
Try using a calculated field on your dataset, In the expression, use =" number of spaces wanted" save field name like Space5. You can then use this field in your expressions.
Ham
|||I tried and it still comes out trimmed.|||Igor,
Can you wrap a LEN around your expression? I used this to verify that the spaces where actually there. If the spaces are there then you made have some other issue.
Ham
|||the Len function returns the correct number of characters (including the empty spaces) but the spaces just don't show up.|||Igor,
What type of formatting are you trying to accomplish? Are you trying to align text, columns?
Ham
|||I am trying to move some of the values a little to the left but still keeping them right-justified.|||
Igor,
You can try a couple of different things (what you have should work, but if not I can only suggest these)....
=Cstr(Fields!strVal.Value) & Space(5)
or
=Cstr(Fields!strVal.Value) + Space(5)
In Data you could try Cast or Convert on the field to force it to a certain number of characters as well.|||
Igor,
Why not use your "Left-Alignment" properties on your textbox?
Ham
|||Hello Igor,
Can you try something like this in your field's expression:
=Fields!FIELD1.Value & StrDup(5, " ")
Hope this helps.
Jarret
Add space between matrix row group
Click on the row that you want to add the space below, go to the properties window and increase your 'Height' value. Also, make sure that the 'VerticalAlign' field is set to 'Top'. This will add empty space between that row and the one directly below it.
Hope this helps.
Jarret
|||I guess I wasn't clear. I dont need space between the rows, but between the last column in a row group and the first column in the next row group. Does that make sense?|||Click on the last column in the matrix, and in the properties window, increase the Padding-Right value. You might want to increase the Width of that column to handle the additional padding. Does this do what you are trying to accomplish?
Hope this helps.
Jarret
|||No, padding won't help. Here's my layout. I need more space between the subject areas.
So, you are wanting something like a 'spacer' column? What if you add another blank column to you report? Right click your textbox below the 'Advanced' column and select 'Add Column', then just leave it blank.
Jarret
|||
| ELA | Math | ||||||||||
| Below Basic | Basic | Proficient | Advanced | Below Basic | Basic | Proficient | Advanced | ||||
| 17% | 46% | 37% | 1% | 14% | 36% | 30% | 20% | ||||
| 9% | 57% | 30% | 4% | 22% | 49% | 16% | 13% | ||||
| 16% | 36% | 44% | 4% | 13% | 39% | 22% | 26% | ||||
See the space I've added between ELA and Math sections? Thats what I want.
|||That adds a second column of data that will repeat. So instead of one column under advanced I have two.|||Would you still want the tables to appear horizontally next to each other? Have you considered placing the matrix in a list control and adding a groupping by subject? This would effectively give you a matrix per subject but they would be layed out vertically.|||I have to lay them out horizontally bc of how many rows there are. If I do it vertically the report gets too long to read.|||Does anybody have a clue how to do this? It seems like it'd be so simple...Thursday, March 8, 2012
Add new SQL Server in "SQL Server Group"
Does anyone know how to add a new SQL Server under the "SQL Server Group"
using Enterprise Manager other than run the setup.exe in MSDE?
Thanks.
Paul
Paul wrote:
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server
> Group" using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul
SQL EM does not actually create new instances of SQL Server. It only
"adds" instances of SQL Server that already exist to its UI. To create a
new instance of SQL Server, you need to re-run the SQL Server
installation and apply the necessary service packs. I'm not sure MSDE
supports multiple instances. It might, but I'm not sure.
David Gugick
Imceda Software
www.imceda.com
|||David,
Thanks. MSDE does support multiple instances. I am just trying to find a
better way to add a new instance.
Paul
"David Gugick" wrote:
> Paul wrote:
> SQL EM does not actually create new instances of SQL Server. It only
> "adds" instances of SQL Server that already exist to its UI. To create a
> new instance of SQL Server, you need to re-run the SQL Server
> installation and apply the necessary service packs. I'm not sure MSDE
> supports multiple instances. It might, but I'm not sure.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>
|||To install another instance of SQL Server you must go through setup..
If you merely wish to administer an existing SQL in your SEM, then right
click the server group, and select Register server
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server Group"
> using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul
|||Wayne,
Thanks.
Paul
"Wayne Snyder" wrote:
> To install another instance of SQL Server you must go through setup..
> If you merely wish to administer an existing SQL in your SEM, then right
> click the server group, and select Register server
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
>
>
|||No problem
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:7EE2E3E4-10BE-4D72-A0CB-CD1E78ADBE82@.microsoft.com...[vbcol=seagreen]
> Wayne,
> Thanks.
> Paul
> "Wayne Snyder" wrote:
Group"[vbcol=seagreen]
Add new SQL Server in "SQL Server Group"
Does anyone know how to add a new SQL Server under the "SQL Server Group"
using Enterprise Manager other than run the setup.exe in MSDE?
Thanks.
PaulPaul wrote:
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server
> Group" using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul
SQL EM does not actually create new instances of SQL Server. It only
"adds" instances of SQL Server that already exist to its UI. To create a
new instance of SQL Server, you need to re-run the SQL Server
installation and apply the necessary service packs. I'm not sure MSDE
supports multiple instances. It might, but I'm not sure.
--
David Gugick
Imceda Software
www.imceda.com|||David,
Thanks. MSDE does support multiple instances. I am just trying to find a
better way to add a new instance.
Paul
"David Gugick" wrote:
> Paul wrote:
> > Hi,
> >
> > Does anyone know how to add a new SQL Server under the "SQL Server
> > Group" using Enterprise Manager other than run the setup.exe in MSDE?
> > Thanks.
> >
> > Paul
> SQL EM does not actually create new instances of SQL Server. It only
> "adds" instances of SQL Server that already exist to its UI. To create a
> new instance of SQL Server, you need to re-run the SQL Server
> installation and apply the necessary service packs. I'm not sure MSDE
> supports multiple instances. It might, but I'm not sure.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||To install another instance of SQL Server you must go through setup..
If you merely wish to administer an existing SQL in your SEM, then right
click the server group, and select Register server
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server Group"
> using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul|||Wayne,
Thanks.
Paul
"Wayne Snyder" wrote:
> To install another instance of SQL Server you must go through setup..
> If you merely wish to administer an existing SQL in your SEM, then right
> click the server group, and select Register server
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> > Hi,
> >
> > Does anyone know how to add a new SQL Server under the "SQL Server Group"
> > using Enterprise Manager other than run the setup.exe in MSDE?
> > Thanks.
> >
> > Paul
>
>|||No problem
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:7EE2E3E4-10BE-4D72-A0CB-CD1E78ADBE82@.microsoft.com...
> Wayne,
> Thanks.
> Paul
> "Wayne Snyder" wrote:
> > To install another instance of SQL Server you must go through setup..
> >
> > If you merely wish to administer an existing SQL in your SEM, then right
> > click the server group, and select Register server
> >
> > --
> > Wayne Snyder, MCDBA, SQL Server MVP
> > Mariner, Charlotte, NC
> > www.mariner-usa.com
> > (Please respond only to the newsgroups.)
> >
> > I support the Professional Association of SQL Server (PASS) and it's
> > community of SQL Server professionals.
> > www.sqlpass.org
> >
> > "Paul" <Paul@.discussions.microsoft.com> wrote in message
> > news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> > > Hi,
> > >
> > > Does anyone know how to add a new SQL Server under the "SQL Server
Group"
> > > using Enterprise Manager other than run the setup.exe in MSDE?
> > > Thanks.
> > >
> > > Paul
> >
> >
> >
Add new SQL Server in "SQL Server Group"
Does anyone know how to add a new SQL Server under the "SQL Server Group"
using Enterprise Manager other than run the setup.exe in MSDE?
Thanks.
PaulPaul wrote:
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server
> Group" using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul
SQL EM does not actually create new instances of SQL Server. It only
"adds" instances of SQL Server that already exist to its UI. To create a
new instance of SQL Server, you need to re-run the SQL Server
installation and apply the necessary service packs. I'm not sure MSDE
supports multiple instances. It might, but I'm not sure.
David Gugick
Imceda Software
www.imceda.com|||David,
Thanks. MSDE does support multiple instances. I am just trying to find a
better way to add a new instance.
Paul
"David Gugick" wrote:
> Paul wrote:
> SQL EM does not actually create new instances of SQL Server. It only
> "adds" instances of SQL Server that already exist to its UI. To create a
> new instance of SQL Server, you need to re-run the SQL Server
> installation and apply the necessary service packs. I'm not sure MSDE
> supports multiple instances. It might, but I'm not sure.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||To install another instance of SQL Server you must go through setup..
If you merely wish to administer an existing SQL in your SEM, then right
click the server group, and select Register server
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
> Hi,
> Does anyone know how to add a new SQL Server under the "SQL Server Group"
> using Enterprise Manager other than run the setup.exe in MSDE?
> Thanks.
> Paul|||Wayne,
Thanks.
Paul
"Wayne Snyder" wrote:
> To install another instance of SQL Server you must go through setup..
> If you merely wish to administer an existing SQL in your SEM, then right
> click the server group, and select Register server
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:0B1A4C3B-2FEC-49B6-AF61-3A3F98921FEE@.microsoft.com...
>
>|||No problem
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:7EE2E3E4-10BE-4D72-A0CB-CD1E78ADBE82@.microsoft.com...[vbcol=seagreen]
> Wayne,
> Thanks.
> Paul
> "Wayne Snyder" wrote:
>
Group"[vbcol=seagreen]
Thursday, February 16, 2012
Add a variable from custom component
Hi
I am writing a custom transformation component that utilises a user variable.
Before using the variable at run time I am checking that the variable exists, but it would be nice to be able to add it if it does not. I cannot find any documentation on the subject, though I can see that the Variables class is derived from a ReadOnlyCollectionBase.
Is there a way to add a user variable with package scope from a custom component, either at run time or design time?
Thanks . . . Ed
I do not think it is possible currently.
Thanks.
Thursday, February 9, 2012
Actual size of Getdate()
When you set the mode Results in text in QA and run this ,
declare @.s1 varchar(20)
declare @.s2 varchar(30)
set @.s1='no'
set @.s2='the'
select @.s1,@.s2
select getdate()
you get the following result
-- --
no the
(1 row(s) affected)
---
2006-03-16 14:51:26.140
(1 row(s) affected)
The number of '-' is the length of the column or varialbe which
correctly matches with the size of @.s1 and @.s2
But for getdate(), why does it display 54 '-'s? Does it mean the
maximum length is 54?
MadhivananGETDATE returns datetime, not a string. It is the client that does the forma
tting from datetime
(binary information) to something which is readable for us humans. The clien
t application can adapt
to regional settings on the client machine. SQL Server has no control of how
this is presented at
the client. I imagine that some locales can end up with pretty long strings
to represent a datetime,
hence the rather long meta-data definition of such a column.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Madhivanan" <madhivanan2001@.gmail.com> wrote in message
news:1142950451.878083.249060@.u72g2000cwu.googlegroups.com...
> what is the actual length of the result returned by getdate()?
> When you set the mode Results in text in QA and run this ,
> declare @.s1 varchar(20)
> declare @.s2 varchar(30)
> set @.s1='no'
> set @.s2='the'
> select @.s1,@.s2
> select getdate()
> you get the following result
>
> -- --
> no the
> (1 row(s) affected)
>
> ---
> 2006-03-16 14:51:26.140
> (1 row(s) affected)
> The number of '-' is the length of the column or varialbe which
> correctly matches with the size of @.s1 and @.s2
> But for getdate(), why does it display 54 '-'s? Does it mean the
> maximum length is 54?
> Madhivanan
>|||That is interesting
run these 2
select convert(varchar,getdate(),109)
select getdate()
first one is longer but has less -
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||> select convert(varchar,getdate(),109)
You didn't specify a length for the varchar. In all but two cases, that will
result in varchar(1).
The two exceptions are inside CAST and CONVERT where you get varchar(30). Th
is is why you see a
length of 30 for this column.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"SQL" <denis.gobo@.gmail.com> wrote in message
news:1142951590.221838.143270@.g10g2000cwb.googlegroups.com...
> That is interesting
> run these 2
> select convert(varchar,getdate(),109)
> select getdate()
> first one is longer but has less -
>
> Denis the SQL Menace
> http://sqlservercode.blogspot.com/
>|||> You didn't specify a length for the varchar. In all but two cases, that
> will result in varchar(1). The two exceptions are inside CAST and CONVERT
> where you get varchar(30). This is why you see a length of 30 for this
> column.
Hey Tibor, do you think they will ever deprecate this silly syntax? Or at
least make the default length consistent across all methods?|||> Hey Tibor, do you think they will ever deprecate this silly syntax? Or at least make the
default
> length consistent across all methods?
I wish it would be deprecated, Aaron. We all se how much trouble it causes.
I'd prefer an error if
omitting length. Next best would be consistent length of 1 (easier to catch
the mistakes).
I checked ANSI SQL a while back, and for char, you should get 1 if you omit.
But for varchar, you
have to specify a length. (http://www.karaszi.com/SQLServer/in.../>
tatypes.asp)
I haven't vented this with MS, though...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:e6o6KfQTGHA.4452@.TK2MSFTNGP12.phx.gbl...
> Hey Tibor, do you think they will ever deprecate this silly syntax? Or at
least make the default
> length consistent across all methods?
>
Actual Query is fast, Report is slow and does not render
Each Query by itself works flawlessly, and returns all of the data within 5-10 seconds(Run through Query Analizer). Is there some funny thing that is resource intensive with actually rendering the report, it is basically just displaying the returned data, no crazy calculations. There can be a pretty big row count but nothing crazy. around 1500- 2000 on the last one
Is there a way that it is trying to run all three queries at the same time and that is killing the server?
Any help offerred is greatly appriciated
And as stated before the queries are fine and not the bottleneck, their effeciency is not the question.
Have you run all three queries together from QA with the same criteria that is taking a long time?
Can you post the queries?
Can you use 3 stored procs instead?
I ran all queries involved in this report in a total of 5 minutes and that includes the amount of time to switch between the queries and enter the value of the parameter.
The report itself took 46 Minutes, nothing different, i actually ran the queries from the actual query used in the report when i achieved the 5 minute mark
Does something in SP2 fix this?|||Sorry - late to this POST
You have to install SP2 and I think there may be a "HotFix" as well --
Also, is there a Document Map you are creating when generating the report? I have had situations where I created a Document Map with a SQL table of about 400,000 records and I got inpatient and started to select a hyperling on a row of data that was displayed - but the entire worker process was not completed and my machine "hung" everytime!
Then if NO DOCUMENT MAP, then is there a problem with the length of the parameters defined within the stored procedure - As you know there is no length to define within MSRS - but if you enter a 5 byte field in MS RS and the resulting parameter in the stored procedure is 2 - then problems!
But nevertheless, I havfe not seen this behavior in MS RS and I have used a lot!
Best regards,
]
Joe|||What does the document map do? Does it make the creation of the report more efficient?
I am having this problem with many reports.
I am not using a stored procedure, but can you expand more on the thought of parameter size? why would it change?
What can you do to prevent it?
Activity log backup
SQL2000 servers. I need a job that will run each night moving the logs to an
archive file naming the logs to date.logs leaving only the "Current-date
time" log. I have set up the sp-cycle-errorlog to run each night. This
creates a new log in the number sequence.
Any assistance is greatly appreciated. Thanks.
Jerry
Hi
You may want to check out http://www.sqldts.com/default.aspx?292
John
"Jerry" wrote:
> My company requires a 6 month retention of the archive activity logs for
> SQL2000 servers. I need a job that will run each night moving the logs to an
> archive file naming the logs to date.logs leaving only the "Current-date
> time" log. I have set up the sp-cycle-errorlog to run each night. This
> creates a new log in the number sequence.
> Any assistance is greatly appreciated. Thanks.
> --
> Jerry
Activity log backup
SQL2000 servers. I need a job that will run each night moving the logs to a
n
archive file naming the logs to date.logs leaving only the "Current-date
time" log. I have set up the sp-cycle-errorlog to run each night. This
creates a new log in the number sequence.
Any assistance is greatly appreciated. Thanks.
--
JerryHi
You may want to check out http://www.sqldts.com/default.aspx?292
John
"Jerry" wrote:
> My company requires a 6 month retention of the archive activity logs for
> SQL2000 servers. I need a job that will run each night moving the logs to
an
> archive file naming the logs to date.logs leaving only the "Current-date
> time" log. I have set up the sp-cycle-errorlog to run each night. This
> creates a new log in the number sequence.
> Any assistance is greatly appreciated. Thanks.
> --
> Jerry
Activity log backup
SQL2000 servers. I need a job that will run each night moving the logs to an
archive file naming the logs to date.logs leaving only the "Current-date
time" log. I have set up the sp-cycle-errorlog to run each night. This
creates a new log in the number sequence.
Any assistance is greatly appreciated. Thanks.
--
JerryHi
You may want to check out http://www.sqldts.com/default.aspx?292
John
"Jerry" wrote:
> My company requires a 6 month retention of the archive activity logs for
> SQL2000 servers. I need a job that will run each night moving the logs to an
> archive file naming the logs to date.logs leaving only the "Current-date
> time" log. I have set up the sp-cycle-errorlog to run each night. This
> creates a new log in the number sequence.
> Any assistance is greatly appreciated. Thanks.
> --
> Jerry
Activity in one DB causes time-outs in another
One of the applications I'm responsible for has batch jobs that run for an hour; all activity is on the database. During this hour, other applications that use other databases on the same server experience time-outs. One of my coworkers did a count(*) on an empty table and it took 11 seconds.
We pay people to keep our servers up and running. Is this something they might solve by reconfiguring the server? It seems strange to me that a single database is allowed to hog all server resources.
We are meeting with them later this week, and I'd like to have some knowledge about this; we don't want to BS'ed into buying a new server.personally, I would look at optimizing your hour long batch process if at all possible. If you follow the directions in Brett's sticky at the top, I am sure some one would be happy to look over your code for you.|||There's that,yes. Right now it's cursor driven, because, "you know, if we just make some changes to the previous version we'll be done quicker."
Data is read from a file (created at a specific point in time) into a single table, and the batch process consists of two stages: stage one is comparing the new data to what we already have, and create an entry in the log table for every difference. Stage two is changing our data so that it reflects the data in the file, for that particular point in time.
I'm pretty sure that stage one can be done set-based, but I'm not so sure about stage two. The actions required for each row in the new data depend on what's already there in our db.