Hi
We have a problem whereby a particular application is writing certain ascii
characters to our table which is causing an issue in another application.
Obviously the solution is to fix the application, but it's taking some time.
In the meantime I'm trying to develop a trigger to fix the data. I have a
table which contains a row for every ascii character which we do not want to
allow, I'm trying to develop a very efficient trigger to remove these bad
ascii characters (on around 7 string columns in 1 table)
Any hints on how to do this?
ThanksUse an INSTEAD OF trigger rather than an AFTER (the default), the INSTEAD OF
will do it before the insert/update occurrs thereby making it more
efficient, if you did it in the AFTER trigger (the default) then you'll be
doing an insert and then a further delete.
Use nested REPLACE to remove the characters, do you have a list of the
characters - are there a lot?
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"..." <...@.nowhere.com> wrote in message
news:O2Joviu5FHA.472@.TK2MSFTNGP15.phx.gbl...
> Hi
> We have a problem whereby a particular application is writing certain
> ascii characters to our table which is causing an issue in another
> application.
> Obviously the solution is to fix the application, but it's taking some
> time. In the meantime I'm trying to develop a trigger to fix the data. I
> have a table which contains a row for every ascii character which we do
> not want to allow, I'm trying to develop a very efficient trigger to
> remove these bad ascii characters (on around 7 string columns in 1 table)
> Any hints on how to do this?
> Thanks
>
>
Showing posts with label certain. Show all posts
Showing posts with label certain. Show all posts
Sunday, March 11, 2012
Bad characters in strings
Labels:
application,
asciicharacters,
causing,
certain,
characters,
database,
hiwe,
microsoft,
mysql,
oracle,
particular,
server,
sql,
strings,
table,
whereby,
writing
Monday, February 13, 2012
Backup via Maintenance Plan
Hi all,
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IMAs in all backups, the database is available to all users.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
Hi all,
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IM|||Many thanks Tom. That's what I thought but it's good to know for sure.
Cheers,
IM
"Tom Moreau" wrote:
> As in all backups, the database is available to all users.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
> news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
> Hi all,
> Just a quick question. I've searched through the docs for this but am sti
ll
> not certain. Can you tell me if, during a Maintenance Plan's backup
> procedure, the database is still available or does the MP put it into
> Single-User Mode / Offline?
> Cheers,
> IM
>|||This is true but there are a few file management type operations that
cannot run while a backup is in progress:
* ALTER DATABASE (with ADD FILE or REMOVE FILE)
* DBCC SHRINKDATABASE
* DBCC SHRINKFILE
A backup won't start while these are in progress and you can't start one
of these operations while a backup is in progress.
*mike hodgson*
/ mallesons stephen jaques/
blog: http://sqlnerd.blogspot.com
Tom Moreau wrote:
>As in all backups, the database is available to all users.
>
>
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IMAs in all backups, the database is available to all users.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
Hi all,
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IM|||Many thanks Tom. That's what I thought but it's good to know for sure.
Cheers,
IM
"Tom Moreau" wrote:
> As in all backups, the database is available to all users.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
> news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
> Hi all,
> Just a quick question. I've searched through the docs for this but am sti
ll
> not certain. Can you tell me if, during a Maintenance Plan's backup
> procedure, the database is still available or does the MP put it into
> Single-User Mode / Offline?
> Cheers,
> IM
>|||This is true but there are a few file management type operations that
cannot run while a backup is in progress:
* ALTER DATABASE (with ADD FILE or REMOVE FILE)
* DBCC SHRINKDATABASE
* DBCC SHRINKFILE
A backup won't start while these are in progress and you can't start one
of these operations while a backup is in progress.
*mike hodgson*
/ mallesons stephen jaques/
blog: http://sqlnerd.blogspot.com
Tom Moreau wrote:
>As in all backups, the database is available to all users.
>
>
Backup via Maintenance Plan
Hi all,
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IMAs in all backups, the database is available to all users.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
Hi all,
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IM|||Many thanks Tom. That's what I thought but it's good to know for sure.
Cheers,
IM
"Tom Moreau" wrote:
> As in all backups, the database is available to all users.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
> news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
> Hi all,
> Just a quick question. I've searched through the docs for this but am still
> not certain. Can you tell me if, during a Maintenance Plan's backup
> procedure, the database is still available or does the MP put it into
> Single-User Mode / Offline?
> Cheers,
> IM
>|||This is a multi-part message in MIME format.
--010201060107060106030405
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
This is true but there are a few file management type operations that
cannot run while a backup is in progress:
* ALTER DATABASE (with ADD FILE or REMOVE FILE)
* DBCC SHRINKDATABASE
* DBCC SHRINKFILE
A backup won't start while these are in progress and you can't start one
of these operations while a backup is in progress.
--
*mike hodgson*
/ mallesons stephen jaques/
blog: http://sqlnerd.blogspot.com
Tom Moreau wrote:
>As in all backups, the database is available to all users.
>
>
--010201060107060106030405
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>This is true but there are a few file management type operations
that cannot run while a backup is in progress:<br>
</tt>
<ul>
<li><tt>ALTER DATABASE (with ADD FILE or REMOVE FILE)</tt></li>
<li><tt>DBCC SHRINKDATABASE</tt></li>
<li><tt>DBCC SHRINKFILE</tt></li>
</ul>
<tt>A backup won't start while these are in progress and you can't
start one of these operations while a backup is in progress.<br>
</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font> </span><b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<em><font face="Tahoma" size="2"> mallesons</font><font face="Tahoma"> </font><font
face="Tahoma" size="2">stephen</font><font face="Tahoma"> </font><font
face="Tahoma" size="2"> jaques</font></em><font face="Tahoma"><br>
</font><font face="Tahoma" size="2">blog:</font><font face="Tahoma"
size="2"> <a href="http://links.10026.com/?link=/">http://sqlnerd.blogspot.com">
http://sqlnerd.blogspot.com</a></font></span> </p>
</div>
<br>
<br>
Tom Moreau wrote:
<blockquote cite="miduOjdsJ%23dFHA.1136@.TK2MSFTNGP12.phx.gbl"
type="cite">
<pre wrap="">As in all backups, the database is available to all users.
</pre>
</blockquote>
</body>
</html>
--010201060107060106030405--
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IMAs in all backups, the database is available to all users.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
Hi all,
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IM|||Many thanks Tom. That's what I thought but it's good to know for sure.
Cheers,
IM
"Tom Moreau" wrote:
> As in all backups, the database is available to all users.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
> news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
> Hi all,
> Just a quick question. I've searched through the docs for this but am still
> not certain. Can you tell me if, during a Maintenance Plan's backup
> procedure, the database is still available or does the MP put it into
> Single-User Mode / Offline?
> Cheers,
> IM
>|||This is a multi-part message in MIME format.
--010201060107060106030405
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
This is true but there are a few file management type operations that
cannot run while a backup is in progress:
* ALTER DATABASE (with ADD FILE or REMOVE FILE)
* DBCC SHRINKDATABASE
* DBCC SHRINKFILE
A backup won't start while these are in progress and you can't start one
of these operations while a backup is in progress.
--
*mike hodgson*
/ mallesons stephen jaques/
blog: http://sqlnerd.blogspot.com
Tom Moreau wrote:
>As in all backups, the database is available to all users.
>
>
--010201060107060106030405
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>This is true but there are a few file management type operations
that cannot run while a backup is in progress:<br>
</tt>
<ul>
<li><tt>ALTER DATABASE (with ADD FILE or REMOVE FILE)</tt></li>
<li><tt>DBCC SHRINKDATABASE</tt></li>
<li><tt>DBCC SHRINKFILE</tt></li>
</ul>
<tt>A backup won't start while these are in progress and you can't
start one of these operations while a backup is in progress.<br>
</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font> </span><b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<em><font face="Tahoma" size="2"> mallesons</font><font face="Tahoma"> </font><font
face="Tahoma" size="2">stephen</font><font face="Tahoma"> </font><font
face="Tahoma" size="2"> jaques</font></em><font face="Tahoma"><br>
</font><font face="Tahoma" size="2">blog:</font><font face="Tahoma"
size="2"> <a href="http://links.10026.com/?link=/">http://sqlnerd.blogspot.com">
http://sqlnerd.blogspot.com</a></font></span> </p>
</div>
<br>
<br>
Tom Moreau wrote:
<blockquote cite="miduOjdsJ%23dFHA.1136@.TK2MSFTNGP12.phx.gbl"
type="cite">
<pre wrap="">As in all backups, the database is available to all users.
</pre>
</blockquote>
</body>
</html>
--010201060107060106030405--
Backup via Maintenance Plan
Hi all,
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IM
As in all backups, the database is available to all users.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
Hi all,
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IM
|||Many thanks Tom. That's what I thought but it's good to know for sure.
Cheers,
IM
"Tom Moreau" wrote:
> As in all backups, the database is available to all users.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
> news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
> Hi all,
> Just a quick question. I've searched through the docs for this but am still
> not certain. Can you tell me if, during a Maintenance Plan's backup
> procedure, the database is still available or does the MP put it into
> Single-User Mode / Offline?
> Cheers,
> IM
>
|||This is true but there are a few file management type operations that
cannot run while a backup is in progress:
* ALTER DATABASE (with ADD FILE or REMOVE FILE)
* DBCC SHRINKDATABASE
* DBCC SHRINKFILE
A backup won't start while these are in progress and you can't start one
of these operations while a backup is in progress.
*mike hodgson*
/ mallesons stephen jaques/
blog: http://sqlnerd.blogspot.com
Tom Moreau wrote:
>As in all backups, the database is available to all users.
>
>
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IM
As in all backups, the database is available to all users.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
Hi all,
Just a quick question. I've searched through the docs for this but am still
not certain. Can you tell me if, during a Maintenance Plan's backup
procedure, the database is still available or does the MP put it into
Single-User Mode / Offline?
Cheers,
IM
|||Many thanks Tom. That's what I thought but it's good to know for sure.
Cheers,
IM
"Tom Moreau" wrote:
> As in all backups, the database is available to all users.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> ..
> "Ian Murphy" <IanMurphy@.discussions.microsoft.com> wrote in message
> news:E1C32915-5794-45BF-BE2F-513937DBCD1A@.microsoft.com...
> Hi all,
> Just a quick question. I've searched through the docs for this but am still
> not certain. Can you tell me if, during a Maintenance Plan's backup
> procedure, the database is still available or does the MP put it into
> Single-User Mode / Offline?
> Cheers,
> IM
>
|||This is true but there are a few file management type operations that
cannot run while a backup is in progress:
* ALTER DATABASE (with ADD FILE or REMOVE FILE)
* DBCC SHRINKDATABASE
* DBCC SHRINKFILE
A backup won't start while these are in progress and you can't start one
of these operations while a backup is in progress.
*mike hodgson*
/ mallesons stephen jaques/
blog: http://sqlnerd.blogspot.com
Tom Moreau wrote:
>As in all backups, the database is available to all users.
>
>
Subscribe to:
Posts (Atom)