Showing posts with label text. Show all posts
Showing posts with label text. Show all posts

Friday, March 30, 2012

putting Word docs, etc in DB

We have a project when multiple people in the company will
want to look at Word documents, other text files, maybe
Excel spreadsheets.
Would it be best to put the location of the files in a
database and have our network mappings set up for anyone
in the company can see these files
or
Has anyone put the actual Word document in a SQL Server
(store the binary data in an Image data type) and then
tried using that to bring up the Word document? I think
storing the data from the file into an Image data type
should be fine, but I'm not sure how you'd get Word to
work with the data in the database and display the
contents.
The first option will work but there are some networking
issues. I'm just wondering if a database solution might
work and how you'd do that.
TIA,
Doughttp://www.aspfaq.com/show.asp?id=2149
"Doug" <anonymous@.discussions.microsoft.com> wrote in message
news:5a3e01c4009a$e6919280$a501280a@.phx.gbl...
> We have a project when multiple people in the company will
> want to look at Word documents, other text files, maybe
> Excel spreadsheets.
> Would it be best to put the location of the files in a
> database and have our network mappings set up for anyone
> in the company can see these files
> or
> Has anyone put the actual Word document in a SQL Server
> (store the binary data in an Image data type) and then
> tried using that to bring up the Word document? I think
> storing the data from the file into an Image data type
> should be fine, but I'm not sure how you'd get Word to
> work with the data in the database and display the
> contents.
> The first option will work but there are some networking
> issues. I'm just wondering if a database solution might
> work and how you'd do that.
> TIA,
> Dougsql

putting Word docs, etc in DB

We have a project when multiple people in the company will
want to look at Word documents, other text files, maybe
Excel spreadsheets.
Would it be best to put the location of the files in a
database and have our network mappings set up for anyone
in the company can see these files
or
Has anyone put the actual Word document in a SQL Server
(store the binary data in an Image data type) and then
tried using that to bring up the Word document? I think
storing the data from the file into an Image data type
should be fine, but I'm not sure how you'd get Word to
work with the data in the database and display the
contents.
The first option will work but there are some networking
issues. I'm just wondering if a database solution might
work and how you'd do that.
TIA,
Doughttp://www.aspfaq.com/show.asp?id=2149
"Doug" <anonymous@.discussions.microsoft.com> wrote in message
news:5a3e01c4009a$e6919280$a501280a@.phx.gbl...
> We have a project when multiple people in the company will
> want to look at Word documents, other text files, maybe
> Excel spreadsheets.
> Would it be best to put the location of the files in a
> database and have our network mappings set up for anyone
> in the company can see these files
> or
> Has anyone put the actual Word document in a SQL Server
> (store the binary data in an Image data type) and then
> tried using that to bring up the Word document? I think
> storing the data from the file into an Image data type
> should be fine, but I'm not sure how you'd get Word to
> work with the data in the database and display the
> contents.
> The first option will work but there are some networking
> issues. I'm just wondering if a database solution might
> work and how you'd do that.
> TIA,
> Doug

putting error lines in new table or file

I'm importing large text files (12Gig). I know there are rows in the data
that will not parse correctly. What I'm trying to figure out is how to set
up the import and when there is an error parsing a row, that row either gets
saved to another table or text file and then continues to import the data.
This process would continue until the entire file is imported.Hi,
If you use some of the Tasks in the DTS packages you can configure "an
Error file".
If any rows are skipped they are placed in the the file. I'm pretty
sure that you can use this feature with the Text file import.
HTH
Barry

Wednesday, March 28, 2012

Putting CSS and web settings in the DataBase expensive?

I had an idea to put all my web design settings, css text and web content in the database..This way it would be easy for others to edit remotely. Do you guys think this would have an impact on performance if I do this?no .|||Its not an uncommon approach. Many web content management tools store their pages in databases.|||I wouldn't store your CSS in the database. You most definately will incur a performance hit if you do this. In order to pull this off, you would have to handle calls to http://yoursite.com/yourCss.css open a connection to the database and dynamically provide the valid CSS to each and every client that views your webpage. Storing page content dynamically suffers similar performance hits.

That said, dynamic CMS's such as DNN, Wordpress and Drupal take a similar strategy for the content of the pages. The construction of the pages themselves is handled through a set of business classes which have been optimized to construct pages from a given set of parameters as opposed to storing the entire page itself in a database.

If you are working on anything marginally complex, you will also have the issue of developers being able to view the entire project, or at least the relevant peices they are working on in real-time.

Moral: I wouldn't do this unless you have a REALLY good reason. Use Visual Source Safe or CVS or something else that is designed explicitly for this purpose.|||Well, you certainly sound like you know what you are talking about more than I sound like I know what I am talking about.

Good enough for me.|||Well, you certainly sound like you know what you are talking about more than I sound like I know what I am talking about.Welcome to my world :)|||storing css in a database is a fabulous idea, and not a new one

let's say you go to a site, and, amongst other things that you can customize, you are allowed to set various display properties like colours, font choice and size, display of various sidebars or not, and so on...

when you press the "save these settings" option, the backend will save these as your custom css parameters, but not just in the database, the backend will also (re)save them to a static .css file so that your browsing experience can take advantage of browser caching

i didn't really mean to bore you with details of web development in a database-driven environment, but the key point is, the database is used as a repository for all kinds of stuff

hence the name Content Management System|||when you press the "save these settings" option, the backend will save these as your custom css parameters, but not just in the database, the backend will also (re)save them to a static .css file so that your browsing experience can take advantage of browser caching

That's subtly different from serving up CSS from the database, which is the point I was attempting to make (albiet poorly).

CMS's also are not generally going to store the raw source for an entire page in the database.

We're arguing from the same side of the fence.

Puting huge chunk of data into database? workable?

Hi.

I am trying to put a hugh chunk of text into my database for example information to a particular product which has more than 2000 characters. I had saw this datatype "nvarchar(MAX)" in SQL Server 2005 and was wondering if i can use this to store my text.

Thanks

yes that's the purpose of it - to store large chunks of data

Wednesday, March 21, 2012

purge a log file

Hello,

I would like to use the built in logging feature to log to a text file.

Is there a way to purge the log peridically (only keep enties for the last 30 days, etc).

Thanks,

Michael

There's no built in feature for doing this. You would have to build something yourself.

If you require this as a feature then request it at Microsoft Connect.

-Jamie

purge .txt log files

SS2005, SP2
Anyone has a quick way of deleting log files for db maint. plans? By default
they are text files created under the LOG directory. Tired of googling for
it 'cause there arn't many posts...I believe this is in one of the maint tasks.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...
> SS2005, SP2
> Anyone has a quick way of deleting log files for db maint. plans? By default
> they are text files created under the LOG directory. Tired of googling for
> it 'cause there arn't many posts...
>|||Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the
job. They simply cleanup the actual backup files, or the backup/restore
history tables in msdb. I want something to clean up the log files otherwise
they keep accumulating...
I can write a homegrown process to handle this. But I'd be amazed that
there isn't anything out of the SSIS box that can do this.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...
>I believe this is in one of the maint tasks.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...
>> SS2005, SP2
>> Anyone has a quick way of deleting log files for db maint. plans? By
>> default they are text files created under the LOG directory. Tired of
>> googling for it 'cause there arn't many posts...|||> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the job.
I see, I though this was part of the "standard process". But Maint Cleanup Task isn't limited to
deletion of backup files. Did you try to add one more such task for deletion of the .txt files?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...
> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the job. They simply
> cleanup the actual backup files, or the backup/restore history tables in msdb. I want something to
> clean up the log files otherwise they keep accumulating...
> I can write a homegrown process to handle this. But I'd be amazed that there isn't anything out
> of the SSIS box that can do this.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...
>>I believe this is in one of the maint tasks.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "YPD" <y.ding@.neu.edu> wrote in message news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...
>> SS2005, SP2
>> Anyone has a quick way of deleting log files for db maint. plans? By default they are text files
>> created under the LOG directory. Tired of googling for it 'cause there arn't many posts...
>|||Yes, I tried but it didn't work. I also tried to fool the manit plan to
purge regular text files that were renamed just like the backup files. It's
smart enough to know what files are real backup files and what are not, and
only delete REAL backup files. interesting! Fortunately those txt log files
are tiny (1 or 2 kbs each) so leaving them uncleaned really isn't a big
deal.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
>> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does
>> the job.
> I see, I though this was part of the "standard process". But Maint Cleanup
> Task isn't limited to deletion of backup files. Did you try to add one
> more such task for deletion of the .txt files?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...
>> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does
>> the job. They simply cleanup the actual backup files, or the
>> backup/restore history tables in msdb. I want something to clean up the
>> log files otherwise they keep accumulating...
>> I can write a homegrown process to handle this. But I'd be amazed that
>> there isn't anything out of the SSIS box that can do this.
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...
>>I believe this is in one of the maint tasks.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "YPD" <y.ding@.neu.edu> wrote in message
>> news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...
>> SS2005, SP2
>> Anyone has a quick way of deleting log files for db maint. plans? By
>> default they are text files created under the LOG directory. Tired of
>> googling for it 'cause there arn't many posts...
>>
>|||I'm a bit confused here. When I open the "Maintenance Cleanup Dialog", there's an option to delete
"Maintenance Plan text reports". Perhaps this was introduced with sp2? Or did you try it and it
didn't work (of so, you should file a bug on http://connect.microsoft.com/sql)?.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eCfoO8ysHHA.4548@.TK2MSFTNGP04.phx.gbl...
> Yes, I tried but it didn't work. I also tried to fool the manit plan to purge regular text files
> that were renamed just like the backup files. It's smart enough to know what files are real backup
> files and what are not, and only delete REAL backup files. interesting! Fortunately those txt log
> files are tiny (1 or 2 kbs each) so leaving them uncleaned really isn't a big deal.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
>> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the job.
>> I see, I though this was part of the "standard process". But Maint Cleanup Task isn't limited to
>> deletion of backup files. Did you try to add one more such task for deletion of the .txt files?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "YPD" <y.ding@.neu.edu> wrote in message news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...
>> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the job. They simply
>> cleanup the actual backup files, or the backup/restore history tables in msdb. I want something
>> to clean up the log files otherwise they keep accumulating...
>> I can write a homegrown process to handle this. But I'd be amazed that there isn't anything out
>> of the SSIS box that can do this.
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
>> news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...
>>I believe this is in one of the maint tasks.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "YPD" <y.ding@.neu.edu> wrote in message news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...
>> SS2005, SP2
>> Anyone has a quick way of deleting log files for db maint. plans? By default they are text
>> files created under the LOG directory. Tired of googling for it 'cause there arn't many
>> posts...
>>
>|||Tibor, that's a good catch. I overlooked it.
However, i still was unable to get it to work. I have tried it on one
default instance and two clustered instances, with a separate cleanup task
and proper length of days /weeks to purge - log files are not deleted.
A similar bug was logged in the Feedback list earlier this month and MS
marked it as resolved. The ticket wished to build both purging backups and
log files into one interface. So from the wording, it seems someone has
successfully gotten it worked.
I'll try more instances in case it's just a permission issue. Since I've
already had my purge routine in place, it won't be an issue any more even if
it doesn't work. but I'll try to send them a comment on this.
Thanks for your time on helping this.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:EB5BC91A-5A5A-4204-99EA-E6743554D034@.microsoft.com...
> I'm a bit confused here. When I open the "Maintenance Cleanup Dialog",
> there's an option to delete "Maintenance Plan text reports". Perhaps this
> was introduced with sp2? Or did you try it and it didn't work (of so, you
> should file a bug on http://connect.microsoft.com/sql)?.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:eCfoO8ysHHA.4548@.TK2MSFTNGP04.phx.gbl...
>> Yes, I tried but it didn't work. I also tried to fool the manit plan to
>> purge regular text files that were renamed just like the backup files.
>> It's smart enough to know what files are real backup files and what are
>> not, and only delete REAL backup files. interesting! Fortunately those
>> txt log files are tiny (1 or 2 kbs each) so leaving them uncleaned really
>> isn't a big deal.
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
>> Have tried the History Cleanup Task and Maint Cleanup Task. Neither
>> does the job.
>> I see, I though this was part of the "standard process". But Maint
>> Cleanup Task isn't limited to deletion of backup files. Did you try to
>> add one more such task for deletion of the .txt files?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "YPD" <y.ding@.neu.edu> wrote in message
>> news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...
>> Have tried the History Cleanup Task and Maint Cleanup Task. Neither
>> does the job. They simply cleanup the actual backup files, or the
>> backup/restore history tables in msdb. I want something to clean up the
>> log files otherwise they keep accumulating...
>> I can write a homegrown process to handle this. But I'd be amazed that
>> there isn't anything out of the SSIS box that can do this.
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
>> wrote in message
>> news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...
>>I believe this is in one of the maint tasks.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "YPD" <y.ding@.neu.edu> wrote in message
>> news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...
>> SS2005, SP2
>> Anyone has a quick way of deleting log files for db maint. plans? By
>> default they are text files created under the LOG directory. Tired of
>> googling for it 'cause there arn't many posts...
>>
>>
>|||> I'll try more instances in case it's just a permission issue. Since I've
> already had my purge routine in place, it won't be an issue any more even if
> it doesn't work. but I'll try to send them a comment on this.
This is what I also tend to do. When Maint plans don't do what you want, do it yourself... :-)
Let us know if you find out anything more about this... :-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eOtl7aDuHHA.1204@.TK2MSFTNGP03.phx.gbl...
> Tibor, that's a good catch. I overlooked it.
> However, i still was unable to get it to work. I have tried it on one
> default instance and two clustered instances, with a separate cleanup task
> and proper length of days /weeks to purge - log files are not deleted.
> A similar bug was logged in the Feedback list earlier this month and MS
> marked it as resolved. The ticket wished to build both purging backups and
> log files into one interface. So from the wording, it seems someone has
> successfully gotten it worked.
> I'll try more instances in case it's just a permission issue. Since I've
> already had my purge routine in place, it won't be an issue any more even if
> it doesn't work. but I'll try to send them a comment on this.
> Thanks for your time on helping this.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:EB5BC91A-5A5A-4204-99EA-E6743554D034@.microsoft.com...
>> I'm a bit confused here. When I open the "Maintenance Cleanup Dialog",
>> there's an option to delete "Maintenance Plan text reports". Perhaps this
>> was introduced with sp2? Or did you try it and it didn't work (of so, you
>> should file a bug on http://connect.microsoft.com/sql)?.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "YPD" <y.ding@.neu.edu> wrote in message
>> news:eCfoO8ysHHA.4548@.TK2MSFTNGP04.phx.gbl...
>> Yes, I tried but it didn't work. I also tried to fool the manit plan to
>> purge regular text files that were renamed just like the backup files.
>> It's smart enough to know what files are real backup files and what are
>> not, and only delete REAL backup files. interesting! Fortunately those
>> txt log files are tiny (1 or 2 kbs each) so leaving them uncleaned really
>> isn't a big deal.
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
>> Have tried the History Cleanup Task and Maint Cleanup Task. Neither
>> does the job.
>> I see, I though this was part of the "standard process". But Maint
>> Cleanup Task isn't limited to deletion of backup files. Did you try to
>> add one more such task for deletion of the .txt files?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "YPD" <y.ding@.neu.edu> wrote in message
>> news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...
>> Have tried the History Cleanup Task and Maint Cleanup Task. Neither
>> does the job. They simply cleanup the actual backup files, or the
>> backup/restore history tables in msdb. I want something to clean up the
>> log files otherwise they keep accumulating...
>> I can write a homegrown process to handle this. But I'd be amazed that
>> there isn't anything out of the SSIS box that can do this.
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com>
>> wrote in message
>> news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...
>>I believe this is in one of the maint tasks.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "YPD" <y.ding@.neu.edu> wrote in message
>> news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...
>>> SS2005, SP2
>>>
>>> Anyone has a quick way of deleting log files for db maint. plans? By
>>> default they are text files created under the LOG directory. Tired of
>>> googling for it 'cause there arn't many posts...
>>
>>
>>
>

purge .txt log files

SS2005, SP2
Anyone has a quick way of deleting log files for db maint. plans? By default
they are text files created under the LOG directory. Tired of googling for
it 'cause there arn't many posts...I believe this is in one of the maint tasks.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...seagreen">
> SS2005, SP2
> Anyone has a quick way of deleting log files for db maint. plans? By defau
lt
> they are text files created under the LOG directory. Tired of googling for
> it 'cause there arn't many posts...
>|||Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the
job. They simply cleanup the actual backup files, or the backup/restore
history tables in msdb. I want something to clean up the log files otherwise
they keep accumulating...
I can write a homegrown process to handle this. But I'd be amazed that
there isn't anything out of the SSIS box that can do this.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...[vbcol=seagreen]
>I believe this is in one of the maint tasks.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...|||> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does t
he job.
I see, I though this was part of the "standard process". But Maint Cleanup T
ask isn't limited to
deletion of backup files. Did you try to add one more such task for deletion
of the .txt files?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...[vbco
l=seagreen]
> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does t
he job. They simply
> cleanup the actual backup files, or the backup/restore history tables in m
sdb. I want something to
> clean up the log files otherwise they keep accumulating...
> I can write a homegrown process to handle this. But I'd be amazed that th
ere isn't anything out
> of the SSIS box that can do this.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...
>[/vbcol]|||Yes, I tried but it didn't work. I also tried to fool the manit plan to
purge regular text files that were renamed just like the backup files. It's
smart enough to know what files are real backup files and what are not, and
only delete REAL backup files. interesting! Fortunately those txt log files
are tiny (1 or 2 kbs each) so leaving them uncleaned really isn't a big
deal.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
> I see, I though this was part of the "standard process". But Maint Cleanup
> Task isn't limited to deletion of backup files. Did you try to add one
> more such task for deletion of the .txt files?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...
>|||I'm a bit confused here. When I open the "Maintenance Cleanup Dialog", there
's an option to delete
"Maintenance Plan text reports". Perhaps this was introduced with sp2? Or di
d you try it and it
didn't work (of so, you should file a bug on http://connect.microsoft.com/sql[/u...ver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eCfoO8ysHHA.4548@.TK2MSFTNGP04.phx.gbl...seagreen">
> Yes, I tried but it didn't work. I also tried to fool the manit plan to pu
rge regular text files
> that were renamed just like the backup files. It's smart enough to know wh
at files are real backup
> files and what are not, and only delete REAL backup files. interesting! Fo
rtunately those txt log
> files are tiny (1 or 2 kbs each) so leaving them uncleaned really isn't a
big deal.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
>|||Tibor, that's a good catch. I overlooked it.
However, i still was unable to get it to work. I have tried it on one
default instance and two clustered instances, with a separate cleanup task
and proper length of days /weeks to purge - log files are not deleted.
A similar bug was logged in the Feedback list earlier this month and MS
marked it as resolved. The ticket wished to build both purging backups and
log files into one interface. So from the wording, it seems someone has
successfully gotten it worked.
I'll try more instances in case it's just a permission issue. Since I've
already had my purge routine in place, it won't be an issue any more even if
it doesn't work. but I'll try to send them a comment on this.
Thanks for your time on helping this.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:EB5BC91A-5A5A-4204-99EA-E6743554D034@.microsoft.com...
> I'm a bit confused here. When I open the "Maintenance Cleanup Dialog",
> there's an option to delete "Maintenance Plan text reports". Perhaps this
> was introduced with sp2? Or did you try it and it didn't work (of so, you
> should file a bug on http://connect.microsoft.com/sql)?.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:eCfoO8ysHHA.4548@.TK2MSFTNGP04.phx.gbl...
>|||> I'll try more instances in case it's just a permission issue. Since I've
> already had my purge routine in place, it won't be an issue any more even
if
> it doesn't work. but I'll try to send them a comment on this.
This is what I also tend to do. When Maint plans don't do what you want, do
it yourself... :-)
Let us know if you find out anything more about this... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eOtl7aDuHHA.1204@.TK2MSFTNGP03.phx.gbl...seagreen">
> Tibor, that's a good catch. I overlooked it.
> However, i still was unable to get it to work. I have tried it on one
> default instance and two clustered instances, with a separate cleanup task
> and proper length of days /weeks to purge - log files are not deleted.
> A similar bug was logged in the Feedback list earlier this month and MS
> marked it as resolved. The ticket wished to build both purging backups and
> log files into one interface. So from the wording, it seems someone has
> successfully gotten it worked.
> I'll try more instances in case it's just a permission issue. Since I've
> already had my purge routine in place, it won't be an issue any more even
if
> it doesn't work. but I'll try to send them a comment on this.
> Thanks for your time on helping this.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:EB5BC91A-5A5A-4204-99EA-E6743554D034@.microsoft.com...
>sql

purge .txt log files

SS2005, SP2
Anyone has a quick way of deleting log files for db maint. plans? By default
they are text files created under the LOG directory. Tired of googling for
it 'cause there arn't many posts...
I believe this is in one of the maint tasks.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...
> SS2005, SP2
> Anyone has a quick way of deleting log files for db maint. plans? By default
> they are text files created under the LOG directory. Tired of googling for
> it 'cause there arn't many posts...
>
|||Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the
job. They simply cleanup the actual backup files, or the backup/restore
history tables in msdb. I want something to clean up the log files otherwise
they keep accumulating...
I can write a homegrown process to handle this. But I'd be amazed that
there isn't anything out of the SSIS box that can do this.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...[vbcol=seagreen]
>I believe this is in one of the maint tasks.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:eA$PGNqsHHA.4968@.TK2MSFTNGP06.phx.gbl...
|||> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the job.
I see, I though this was part of the "standard process". But Maint Cleanup Task isn't limited to
deletion of backup files. Did you try to add one more such task for deletion of the .txt files?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...
> Have tried the History Cleanup Task and Maint Cleanup Task. Neither does the job. They simply
> cleanup the actual backup files, or the backup/restore history tables in msdb. I want something to
> clean up the log files otherwise they keep accumulating...
> I can write a homegrown process to handle this. But I'd be amazed that there isn't anything out
> of the SSIS box that can do this.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:8F12D2C7-FA8E-4CFD-A9A4-B273084C46C9@.microsoft.com...
>
|||Yes, I tried but it didn't work. I also tried to fool the manit plan to
purge regular text files that were renamed just like the backup files. It's
smart enough to know what files are real backup files and what are not, and
only delete REAL backup files. interesting! Fortunately those txt log files
are tiny (1 or 2 kbs each) so leaving them uncleaned really isn't a big
deal.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
> I see, I though this was part of the "standard process". But Maint Cleanup
> Task isn't limited to deletion of backup files. Did you try to add one
> more such task for deletion of the .txt files?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:%23dWriGrsHHA.1728@.TK2MSFTNGP06.phx.gbl...
>
|||I'm a bit confused here. When I open the "Maintenance Cleanup Dialog", there's an option to delete
"Maintenance Plan text reports". Perhaps this was introduced with sp2? Or did you try it and it
didn't work (of so, you should file a bug on http://connect.microsoft.com/sql)?.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eCfoO8ysHHA.4548@.TK2MSFTNGP04.phx.gbl...
> Yes, I tried but it didn't work. I also tried to fool the manit plan to purge regular text files
> that were renamed just like the backup files. It's smart enough to know what files are real backup
> files and what are not, and only delete REAL backup files. interesting! Fortunately those txt log
> files are tiny (1 or 2 kbs each) so leaving them uncleaned really isn't a big deal.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:078461FC-C310-454D-BEE9-721958C7E312@.microsoft.com...
>
|||Tibor, that's a good catch. I overlooked it.
However, i still was unable to get it to work. I have tried it on one
default instance and two clustered instances, with a separate cleanup task
and proper length of days /weeks to purge - log files are not deleted.
A similar bug was logged in the Feedback list earlier this month and MS
marked it as resolved. The ticket wished to build both purging backups and
log files into one interface. So from the wording, it seems someone has
successfully gotten it worked.
I'll try more instances in case it's just a permission issue. Since I've
already had my purge routine in place, it won't be an issue any more even if
it doesn't work. but I'll try to send them a comment on this.
Thanks for your time on helping this.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:EB5BC91A-5A5A-4204-99EA-E6743554D034@.microsoft.com...
> I'm a bit confused here. When I open the "Maintenance Cleanup Dialog",
> there's an option to delete "Maintenance Plan text reports". Perhaps this
> was introduced with sp2? Or did you try it and it didn't work (of so, you
> should file a bug on http://connect.microsoft.com/sql)?.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "YPD" <y.ding@.neu.edu> wrote in message
> news:eCfoO8ysHHA.4548@.TK2MSFTNGP04.phx.gbl...
>
|||> I'll try more instances in case it's just a permission issue. Since I've
> already had my purge routine in place, it won't be an issue any more even if
> it doesn't work. but I'll try to send them a comment on this.
This is what I also tend to do. When Maint plans don't do what you want, do it yourself... :-)
Let us know if you find out anything more about this... :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"YPD" <y.ding@.neu.edu> wrote in message news:eOtl7aDuHHA.1204@.TK2MSFTNGP03.phx.gbl...
> Tibor, that's a good catch. I overlooked it.
> However, i still was unable to get it to work. I have tried it on one
> default instance and two clustered instances, with a separate cleanup task
> and proper length of days /weeks to purge - log files are not deleted.
> A similar bug was logged in the Feedback list earlier this month and MS
> marked it as resolved. The ticket wished to build both purging backups and
> log files into one interface. So from the wording, it seems someone has
> successfully gotten it worked.
> I'll try more instances in case it's just a permission issue. Since I've
> already had my purge routine in place, it won't be an issue any more even if
> it doesn't work. but I'll try to send them a comment on this.
> Thanks for your time on helping this.
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:EB5BC91A-5A5A-4204-99EA-E6743554D034@.microsoft.com...
>

Monday, March 12, 2012

Pull only numeric values

I have a varchar field that contains both numeric and text data. I need to pull only numeric, non-null values.

I am fairly new to SQL, so I applogise if this is a really basic question.

Thanks.

hi

try:

SELECT col1, col2
FROM table
WHERE (ISNUMERIC(col1) AND col1 IS NOT NULL)

where col1 is your varchar column

Pull if matches 2nd to end of text field

I have 2 tables in a database. Table 1 has a field (1a) that contains a
customer part number. It also has a field (1b) that contains just a
manufacturer part number.
Table 2 contains 2 fields. Field (2a) has the description that might have a
word or many words then the manufacturer part number and then a
manufacturer. Field (2b) would have only have an internal number.
I am trying to match up the customer part number from table 1 to the
internal part number of table 2. Is there any way to do this?
The other task that I will need to do is pull the manufactuer and the
manufacturer part number out into seperate fields.
Thanks for your help in advance
DanOn Thu, 16 Feb 2006 21:35:38 -0500, "Dan" <danrev99@.yahoo.com> wrote:

>I have 2 tables in a database. Table 1 has a field (1a) that contains a
>customer part number. It also has a field (1b) that contains just a
>manufacturer part number.
>Table 2 contains 2 fields. Field (2a) has the description that might have a
>word or many words then the manufacturer part number and then a
>manufacturer. Field (2b) would have only have an internal number.
>I am trying to match up the customer part number from table 1 to the
>internal part number of table 2. Is there any way to do this?
>The other task that I will need to do is pull the manufactuer and the
>manufacturer part number out into seperate fields.
>Thanks for your help in advance
>Dan

>I am trying to match up the customer part number from table 1 to the
>internal part number of table 2. Is there any way to do this?
Are you familiar with SQL at all? This would be done with a JOIN:
SELECT *
FROM Tbl1 as T1
JOIN Tbl2 as T2
ON T1.CustPartNbr = T2.InternalNumber

>The other task that I will need to do is pull the manufactuer and the
>manufacturer part number out into seperate fields.
Look up the SUBSTRING and CHARINDEX.
Roy|||Why yes Roy I do know some about SQL. I understand that if the fields were
equal then this would work great. My problem is that table 1 field (1a)
manufacturer part number will match the just a part of table 2 field (2a)
part description. the "=" will not work
"Roy Harvey" <roy_harvey@.snet.net> wrote in message
news:kfgav1dde8i0e2imndpmssg95n04lbavvj@.
4ax.com...
> On Thu, 16 Feb 2006 21:35:38 -0500, "Dan" <danrev99@.yahoo.com> wrote:
>
>
> Are you familiar with SQL at all? This would be done with a JOIN:
> SELECT *
> FROM Tbl1 as T1
> JOIN Tbl2 as T2
> ON T1.CustPartNbr = T2.InternalNumber
>
> Look up the SUBSTRING and CHARINDEX.
> Roy|||I guess I misunderstood the question the first time around. When you
said that "I am trying to match up the customer part number from table
1 to the internal part number of table 2" thought that meant they were
matching values. Looking again, I think that you meant to match them
up by way of the manufacturer part number.
If that is the case, the first thing is to isolate the manufacturer's
part number in description field of the second table. Can you post
some examples of what this column looks like? It sounds like there
isn't much predictability to the position of the manufacturer's part
number, so this could get "interesting". Without seeing the data I
can only speculate, but I would guess it will require a few passes and
some temorary columns or perhaps a work table before we are through.
Roy
On Thu, 16 Feb 2006 21:35:38 -0500, "Dan" <danrev99@.yahoo.com> wrote:

>I have 2 tables in a database. Table 1 has a field (1a) that contains a
>customer part number. It also has a field (1b) that contains just a
>manufacturer part number.
>Table 2 contains 2 fields. Field (2a) has the description that might have a
>word or many words then the manufacturer part number and then a
>manufacturer. Field (2b) would have only have an internal number.
>I am trying to match up the customer part number from table 1 to the
>internal part number of table 2. Is there any way to do this?
>The other task that I will need to do is pull the manufactuer and the
>manufacturer part number out into seperate fields.
>Thanks for your help in advance
>Dan