Friday, March 30, 2012
How to treat Database Snapshots as if they were one database?
I am considering various methods of creating a reporting database from
our production ERP system, in SQL Server 2005, and one of the solutions
suggested by the technical documentation is to create a database mirror
and a sequence of database snapshots. These snapshots, of course, have
different names.
This would be fine for client applications that we manage, in that we
could intercept client requests and connect them to the most recent
snapshots, and clear out the old snapshots as older connections finish.
However, we use applications such as Business Objects which point to a
named database. Does anyone have any suggestions about how we can get
such an application to always connect to the most up-to-date snapshot?
Thanks for any help in advance,
Rich"Rich B" <rjback@.hotmail.com> wrote in message
news:1138093573.261952.197210@.o13g2000cwo.googlegroups.com...
> Hi,
> I am considering various methods of creating a reporting database from
> our production ERP system, in SQL Server 2005, and one of the solutions
> suggested by the technical documentation is to create a database mirror
> and a sequence of database snapshots. These snapshots, of course, have
> different names.
> This would be fine for client applications that we manage, in that we
> could intercept client requests and connect them to the most recent
> snapshots, and clear out the old snapshots as older connections finish.
> However, we use applications such as Business Objects which point to a
> named database. Does anyone have any suggestions about how we can get
> such an application to always connect to the most up-to-date snapshot?
>
You can have a single database full of synonyms or views which point to the
most current snapshot. When you have a new snapshot you need to drop and
recreate all the synonyms or views. So you would need to ensure that client
applications don't hold schema locks (Sch-S) on the target objects for long
periods of time, preventing the switch. And you should recreate the objects
in a transaction so the client always gets a consitent view of the data.
David|||Thankyou, that seems like a reasonable approach.sql
Monday, March 26, 2012
How to track SQL server and file growth
some help in creating a script that will gather drive data from 3 SQL
servers and record that to a SQL database. The data to be recorded was
originally just (DriveLetter, Size, SpaceUsed, SpaceAvailable). Now it
includes (FileNames, and Sizes) of MDF and LDF files in specific folders. I
started this yesterday and have a VBS script that pulls the original data
and saves it to a CSV file, then I created a VBA macro in an XLS file which
pulls that data in to a spreadsheet and assigns each servers data to a
different tab. But this requires a VBS file on each server and each VBS
file creates their own CSV file (on a central server where the XLS file is
located).. Anyway I would like to change what I have already done so that
there a fewer pieces, more data, and it is saved to an MDF. Can someone
help with this?I don't know how you built VBS file since you have not shown us the source
so , take a look at
http://www.sql-server-performance.c...with_dts_05.asp
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:e2d66s$2GHA.1292@.TK2MSFTNGP03.phx.gbl...
> HI, Forgive me as I try to work through my thoughts here. I am looking
> for some help in creating a script that will gather drive data from 3 SQL
> servers and record that to a SQL database. The data to be recorded was
> originally just (DriveLetter, Size, SpaceUsed, SpaceAvailable). Now it
> includes (FileNames, and Sizes) of MDF and LDF files in specific folders.
> I started this yesterday and have a VBS script that pulls the original
> data and saves it to a CSV file, then I created a VBA macro in an XLS file
> which pulls that data in to a spreadsheet and assigns each servers data to
> a different tab. But this requires a VBS file on each server and each VBS
> file creates their own CSV file (on a central server where the XLS file is
> located).. Anyway I would like to change what I have already done so that
> there a fewer pieces, more data, and it is saved to an MDF. Can someone
> help with this?
>|||Thanks!!!, that looks like it just what I need. May need a little tweaking,
but so far so good..
Thanks again
======================================
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23piXMw$2GHA.1068@.TK2MSFTNGP05.phx.gbl...
>I don't know how you built VBS file since you have not shown us the source
>so , take a look at
> http://www.sql-server-performance.c...with_dts_05.asp
>
> "WANNABE" <breichenbach AT istate DOT com> wrote in message
> news:e2d66s$2GHA.1292@.TK2MSFTNGP03.phx.gbl...
>
How to track SQL server and file growth
some help in creating a script that will gather drive data from 3 SQL
servers and record that to a SQL database. The data to be recorded was
originally just (DriveLetter, Size, SpaceUsed, SpaceAvailable). Now it
includes (FileNames, and Sizes) of MDF and LDF files in specific folders. I
started this yesterday and have a VBS script that pulls the original data
and saves it to a CSV file, then I created a VBA macro in an XLS file which
pulls that data in to a spreadsheet and assigns each servers data to a
different tab. But this requires a VBS file on each server and each VBS
file creates their own CSV file (on a central server where the XLS file is
located).. Anyway I would like to change what I have already done so that
there a fewer pieces, more data, and it is saved to an MDF. Can someone
help with this?
I don't know how you built VBS file since you have not shown us the source
so , take a look at
http://www.sql-server-performance.co...ith_dts_05.asp
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:e2d66s$2GHA.1292@.TK2MSFTNGP03.phx.gbl...
> HI, Forgive me as I try to work through my thoughts here. I am looking
> for some help in creating a script that will gather drive data from 3 SQL
> servers and record that to a SQL database. The data to be recorded was
> originally just (DriveLetter, Size, SpaceUsed, SpaceAvailable). Now it
> includes (FileNames, and Sizes) of MDF and LDF files in specific folders.
> I started this yesterday and have a VBS script that pulls the original
> data and saves it to a CSV file, then I created a VBA macro in an XLS file
> which pulls that data in to a spreadsheet and assigns each servers data to
> a different tab. But this requires a VBS file on each server and each VBS
> file creates their own CSV file (on a central server where the XLS file is
> located).. Anyway I would like to change what I have already done so that
> there a fewer pieces, more data, and it is saved to an MDF. Can someone
> help with this?
>
|||Thanks!!!, that looks like it just what I need. May need a little tweaking,
but so far so good..
Thanks again
======================================
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23piXMw$2GHA.1068@.TK2MSFTNGP05.phx.gbl...
>I don't know how you built VBS file since you have not shown us the source
>so , take a look at
> http://www.sql-server-performance.co...ith_dts_05.asp
>
> "WANNABE" <breichenbach AT istate DOT com> wrote in message
> news:e2d66s$2GHA.1292@.TK2MSFTNGP03.phx.gbl...
>
sql
How to track SQL server and file growth
some help in creating a script that will gather drive data from 3 SQL
servers and record that to a SQL database. The data to be recorded was
originally just (DriveLetter, Size, SpaceUsed, SpaceAvailable). Now it
includes (FileNames, and Sizes) of MDF and LDF files in specific folders. I
started this yesterday and have a VBS script that pulls the original data
and saves it to a CSV file, then I created a VBA macro in an XLS file which
pulls that data in to a spreadsheet and assigns each servers data to a
different tab. But this requires a VBS file on each server and each VBS
file creates their own CSV file (on a central server where the XLS file is
located).. Anyway I would like to change what I have already done so that
there a fewer pieces, more data, and it is saved to an MDF. Can someone
help with this?I don't know how you built VBS file since you have not shown us the source
so , take a look at
http://www.sql-server-performance.com/nn_monitor_with_dts_05.asp
"WANNABE" <breichenbach AT istate DOT com> wrote in message
news:e2d66s$2GHA.1292@.TK2MSFTNGP03.phx.gbl...
> HI, Forgive me as I try to work through my thoughts here. I am looking
> for some help in creating a script that will gather drive data from 3 SQL
> servers and record that to a SQL database. The data to be recorded was
> originally just (DriveLetter, Size, SpaceUsed, SpaceAvailable). Now it
> includes (FileNames, and Sizes) of MDF and LDF files in specific folders.
> I started this yesterday and have a VBS script that pulls the original
> data and saves it to a CSV file, then I created a VBA macro in an XLS file
> which pulls that data in to a spreadsheet and assigns each servers data to
> a different tab. But this requires a VBS file on each server and each VBS
> file creates their own CSV file (on a central server where the XLS file is
> located).. Anyway I would like to change what I have already done so that
> there a fewer pieces, more data, and it is saved to an MDF. Can someone
> help with this?
>|||Thanks!!!, that looks like it just what I need. May need a little tweaking,
but so far so good..
Thanks again
======================================"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%23piXMw$2GHA.1068@.TK2MSFTNGP05.phx.gbl...
>I don't know how you built VBS file since you have not shown us the source
>so , take a look at
> http://www.sql-server-performance.com/nn_monitor_with_dts_05.asp
>
> "WANNABE" <breichenbach AT istate DOT com> wrote in message
> news:e2d66s$2GHA.1292@.TK2MSFTNGP03.phx.gbl...
>> HI, Forgive me as I try to work through my thoughts here. I am looking
>> for some help in creating a script that will gather drive data from 3 SQL
>> servers and record that to a SQL database. The data to be recorded was
>> originally just (DriveLetter, Size, SpaceUsed, SpaceAvailable). Now it
>> includes (FileNames, and Sizes) of MDF and LDF files in specific folders.
>> I started this yesterday and have a VBS script that pulls the original
>> data and saves it to a CSV file, then I created a VBA macro in an XLS
>> file which pulls that data in to a spreadsheet and assigns each servers
>> data to a different tab. But this requires a VBS file on each server and
>> each VBS file creates their own CSV file (on a central server where the
>> XLS file is located).. Anyway I would like to change what I have already
>> done so that there a fewer pieces, more data, and it is saved to an MDF.
>> Can someone help with this?
>
Monday, March 12, 2012
How to sync database latest data with Analysis service
Hi,
I am creating sql server reports using analysis service(using cubes and dimensions).
After creation of cubes and dimensions for existing data I deployed it. Then I created reports on this data. Reports are generated properly for existing data.
But the report is not showing newly inserted data to database (latest data inserted after deploying analysis service). Did I miss anything? Or any new configuration required?
Newly added data is reflected in report when each time I process the cube and dimension and redeploying it. which is a manual process.
How to auto sync newly added data into database with cubes?
Any help would be appreciated.
Thanks
You can use the Synchronize Database Wizard by right-clicking on "Databases" in Object Explorer (SQL Server Management Studio)
See:
http://msdn2.microsoft.com/en-us/library/ms189349.aspx
Hope this helps,
Santi
|||HI,
This option Synchronizes one analysis service database with another.
But in my case analysis server database should be Synchronize with RDBMS database(sql server)
Thanks,
Deepak
|||Try proactive caching. In partition tab in cube builder, click Storage setting, and select enable proactive caching. You can apply this setting to partition, dimension, measure group and cube.Friday, March 9, 2012
How to summarize a text filed ?
I need to perform a SUM on a text field in CR 8.0. I tried creating a formula filed which contained something like this: SUM {textfield.text} but the report said: Unknown filed name. Now, the text field ( crystal reports text object actually ) is not a database field, but a plain text box which contains certain data. Can this be achieved at all ? Summarizing or any other function over a text box ?
Thnx.Hi
It is not possible to use SUM () for a non database field.|||Ok. Well, is there an alternative ? This text box mentioned earlier contains a vital data which I collected from a foreign source (used a text driver in VB to read it from a text delimited file ), and I can display it's value in a details section, but as I said earlier, I cannot SUM it. So .. if there's an alternative approach using crystal, I'd more then appritiate it.
Friday, February 24, 2012
How to store HTML code in SQL server table
I'm creating something like a web site builder in ASP.Net, and I need to
store an HTML code in the SQL server table. If my customer just enters an
HTML code, it is stored in the SQL server table like this: <table
cellSpacing="0" cellPadding="0" width="760"
border="0">, instead of <table cellSpacing="0" cellPadding="0"
width="760" border="0">
This significantly increases the size of the stored code.
Are there any conversion functions or something like this to avoid it? Where
this conversion should be done - in ASP.Net or SQL server? How do I convert
it back to create an HTML page?
Please note that I must use the Unicode data type - ntext, nchar etc, since
I'm using some Cyrillic characters.
I would appreciate your advice very much.
Thank you,
Peter Afonin
Peter,
ntext in SQL Server will store Html markup just fine. You are encoding
your html before storing it in the database. Find out where you are
encoding the markup and change that code. Debug your code and make sure
that you are indeed sending pure html to the database. SQL Server will not
automatically encode html, so your code is doing it somewhere.
Best regards,
Jeffrey Palermo
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I'm creating something like a web site builder in ASP.Net, and I need to
> store an HTML code in the SQL server table. If my customer just enters an
> HTML code, it is stored in the SQL server table like this: <table
> cellSpacing="0" cellPadding="0" width="760"
> border="0">, instead of <table cellSpacing="0"
cellPadding="0"
> width="760" border="0">
> This significantly increases the size of the stored code.
> Are there any conversion functions or something like this to avoid it?
Where
> this conversion should be done - in ASP.Net or SQL server? How do I
convert
> it back to create an HTML page?
> Please note that I must use the Unicode data type - ntext, nchar etc,
since
> I'm using some Cyrillic characters.
> I would appreciate your advice very much.
> Thank you,
> --
> Peter Afonin
>
|||What is the code you use to store the string you get in the SQL database?
"Peter Afonin" <pva@.speakeasy.net> a crit dans le message de
news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I'm creating something like a web site builder in ASP.Net, and I need to
> store an HTML code in the SQL server table. If my customer just enters an
> HTML code, it is stored in the SQL server table like this: <table
> cellSpacing="0" cellPadding="0" width="760"
> border="0">, instead of <table cellSpacing="0"
cellPadding="0"
> width="760" border="0">
> This significantly increases the size of the stored code.
> Are there any conversion functions or something like this to avoid it?
Where
> this conversion should be done - in ASP.Net or SQL server? How do I
convert
> it back to create an HTML page?
> Please note that I must use the Unicode data type - ntext, nchar etc,
since
> I'm using some Cyrillic characters.
> I would appreciate your advice very much.
> Thank you,
> --
> Peter Afonin
>
>
|||As the other poster states, it is not SQL that is doing the encoding, it is
something else...
Also, if the html pages will be less than 4000 unicode characters, you may
prefer to strore the data in a varchar column.
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
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I'm creating something like a web site builder in ASP.Net, and I need to
> store an HTML code in the SQL server table. If my customer just enters an
> HTML code, it is stored in the SQL server table like this: <table
> cellSpacing="0" cellPadding="0" width="760"
> border="0">, instead of <table cellSpacing="0"
cellPadding="0"
> width="760" border="0">
> This significantly increases the size of the stored code.
> Are there any conversion functions or something like this to avoid it?
Where
> this conversion should be done - in ASP.Net or SQL server? How do I
convert
> it back to create an HTML page?
> Please note that I must use the Unicode data type - ntext, nchar etc,
since
> I'm using some Cyrillic characters.
> I would appreciate your advice very much.
> Thank you,
> --
> Peter Afonin
>
|||Thank you everyone for your suggestions.
So far when I use ntext it works OK, then I use the Literal control and
Server.Decode to write the data in ASP.Net.
Peter
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:eL$4fPh1EHA.4004@.tk2msftngp13.phx.gbl...
> As the other poster states, it is not SQL that is doing the encoding, it
is[vbcol=seagreen]
> something else...
> Also, if the html pages will be less than 4000 unicode characters, you may
> prefer to strore the data in a varchar column.
> --
> 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
> "Peter Afonin" <pva@.speakeasy.net> wrote in message
> news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
an[vbcol=seagreen]
width="760"
> cellPadding="0"
> Where
> convert
> since
>
|||Wayne,
Maybe it's just a typo, but varchar cannot be properly used with unicode
and has a maximum length of 8000 characters. nvarchar has a limit of 4000
characters and should be used for all applications for maintenance purposes
(since most applications will have to support unicode in the future).
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:eL$4fPh1EHA.4004@.tk2msftngp13.phx.gbl...
> As the other poster states, it is not SQL that is doing the encoding, it
is[vbcol=seagreen]
> something else...
> Also, if the html pages will be less than 4000 unicode characters, you may
> prefer to strore the data in a varchar column.
> --
> 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
> "Peter Afonin" <pva@.speakeasy.net> wrote in message
> news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
an[vbcol=seagreen]
width="760"
> cellPadding="0"
> Where
> convert
> since
>
|||Peter, I'm glad you have it working now.
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo
"Peter Afonin" <peter@.gudzon.net> wrote in message
news:OAMi7Mk1EHA.1124@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Thank you everyone for your suggestions.
> So far when I use ntext it works OK, then I use the Literal control and
> Server.Decode to write the data in ASP.Net.
> Peter
> "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
> news:eL$4fPh1EHA.4004@.tk2msftngp13.phx.gbl...
> is
may[vbcol=seagreen]
to
> an
> width="760"
>
How to store HTML code in SQL server table
I'm creating something like a web site builder in ASP.Net, and I need to
store an HTML code in the SQL server table. If my customer just enters an
HTML code, it is stored in the SQL server table like this: <table
cellSpacing="0" cellPadding="0" width="760"
border="0">, instead of <table cellSpacing="0" cellPadding="0"
width="760" border="0">
This significantly increases the size of the stored code.
Are there any conversion functions or something like this to avoid it? Where
this conversion should be done - in ASP.Net or SQL server? How do I convert
it back to create an HTML page?
Please note that I must use the Unicode data type - ntext, nchar etc, since
I'm using some Cyrillic characters.
I would appreciate your advice very much.
Thank you,
Peter AfoninPeter,
ntext in SQL Server will store Html markup just fine. You are encoding
your html before storing it in the database. Find out where you are
encoding the markup and change that code. Debug your code and make sure
that you are indeed sending pure html to the database. SQL Server will not
automatically encode html, so your code is doing it somewhere.
Best regards,
Jeffrey Palermo
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I'm creating something like a web site builder in ASP.Net, and I need to
> store an HTML code in the SQL server table. If my customer just enters an
> HTML code, it is stored in the SQL server table like this: <table
> cellSpacing="0" cellPadding="0" width="760"
> border="0">, instead of <table cellSpacing="0"
cellPadding="0"
> width="760" border="0">
> This significantly increases the size of the stored code.
> Are there any conversion functions or something like this to avoid it?
Where
> this conversion should be done - in ASP.Net or SQL server? How do I
convert
> it back to create an HTML page?
> Please note that I must use the Unicode data type - ntext, nchar etc,
since
> I'm using some Cyrillic characters.
> I would appreciate your advice very much.
> Thank you,
> --
> Peter Afonin
>|||What is the code you use to store the string you get in the SQL database?
"Peter Afonin" <pva@.speakeasy.net> a crit dans le message de
news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I'm creating something like a web site builder in ASP.Net, and I need to
> store an HTML code in the SQL server table. If my customer just enters an
> HTML code, it is stored in the SQL server table like this: <table
> cellSpacing="0" cellPadding="0" width="760"
> border="0">, instead of <table cellSpacing="0"
cellPadding="0"
> width="760" border="0">
> This significantly increases the size of the stored code.
> Are there any conversion functions or something like this to avoid it?
Where
> this conversion should be done - in ASP.Net or SQL server? How do I
convert
> it back to create an HTML page?
> Please note that I must use the Unicode data type - ntext, nchar etc,
since
> I'm using some Cyrillic characters.
> I would appreciate your advice very much.
> Thank you,
> --
> Peter Afonin
>
>|||As the other poster states, it is not SQL that is doing the encoding, it is
something else...
Also, if the html pages will be less than 4000 unicode characters, you may
prefer to strore the data in a varchar column.
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
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I'm creating something like a web site builder in ASP.Net, and I need to
> store an HTML code in the SQL server table. If my customer just enters an
> HTML code, it is stored in the SQL server table like this: <table
> cellSpacing="0" cellPadding="0" width="760"
> border="0">, instead of <table cellSpacing="0"
cellPadding="0"
> width="760" border="0">
> This significantly increases the size of the stored code.
> Are there any conversion functions or something like this to avoid it?
Where
> this conversion should be done - in ASP.Net or SQL server? How do I
convert
> it back to create an HTML page?
> Please note that I must use the Unicode data type - ntext, nchar etc,
since
> I'm using some Cyrillic characters.
> I would appreciate your advice very much.
> Thank you,
> --
> Peter Afonin
>|||Thank you everyone for your suggestions.
So far when I use ntext it works OK, then I use the Literal control and
Server.Decode to write the data in ASP.Net.
Peter
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:eL$4fPh1EHA.4004@.tk2msftngp13.phx.gbl...
> As the other poster states, it is not SQL that is doing the encoding, it
is
> something else...
> Also, if the html pages will be less than 4000 unicode characters, you may
> prefer to strore the data in a varchar column.
> --
> 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
> "Peter Afonin" <pva@.speakeasy.net> wrote in message
> news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
an[vbcol=seagreen]
width="760"[vbcol=seagreen]
> cellPadding="0"
> Where
> convert
> since
>|||Wayne,
Maybe it's just a typo, but varchar cannot be properly used with unicode
and has a maximum length of 8000 characters. nvarchar has a limit of 4000
characters and should be used for all applications for maintenance purposes
(since most applications will have to support unicode in the future).
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:eL$4fPh1EHA.4004@.tk2msftngp13.phx.gbl...
> As the other poster states, it is not SQL that is doing the encoding, it
is
> something else...
> Also, if the html pages will be less than 4000 unicode characters, you may
> prefer to strore the data in a varchar column.
> --
> 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
> "Peter Afonin" <pva@.speakeasy.net> wrote in message
> news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
an[vbcol=seagreen]
width="760"[vbcol=seagreen]
> cellPadding="0"
> Where
> convert
> since
>|||Peter, I'm glad you have it working now.
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo
"Peter Afonin" <peter@.gudzon.net> wrote in message
news:OAMi7Mk1EHA.1124@.tk2msftngp13.phx.gbl...
> Thank you everyone for your suggestions.
> So far when I use ntext it works OK, then I use the Literal control and
> Server.Decode to write the data in ASP.Net.
> Peter
> "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
> news:eL$4fPh1EHA.4004@.tk2msftngp13.phx.gbl...
> is
may[vbcol=seagreen]
to[vbcol=seagreen]
> an
> width="760"
>
How to store HTML code in SQL server table
I'm creating something like a web site builder in ASP.Net, and I need to
store an HTML code in the SQL server table. If my customer just enters an
HTML code, it is stored in the SQL server table like this: <table
cellSpacing="0" cellPadding="0" width="760"
border="0">, instead of <table cellSpacing="0" cellPadding="0"
width="760" border="0">
This significantly increases the size of the stored code.
Are there any conversion functions or something like this to avoid it? Where
this conversion should be done - in ASP.Net or SQL server? How do I convert
it back to create an HTML page?
Please note that I must use the Unicode data type - ntext, nchar etc, since
I'm using some Cyrillic characters.
I would appreciate your advice very much.
Thank you,
--
Peter AfoninPeter,
ntext in SQL Server will store Html markup just fine. You are encoding
your html before storing it in the database. Find out where you are
encoding the markup and change that code. Debug your code and make sure
that you are indeed sending pure html to the database. SQL Server will not
automatically encode html, so your code is doing it somewhere.
Best regards,
Jeffrey Palermo
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I'm creating something like a web site builder in ASP.Net, and I need to
> store an HTML code in the SQL server table. If my customer just enters an
> HTML code, it is stored in the SQL server table like this: <table
> cellSpacing="0" cellPadding="0" width="760"
> border="0">, instead of <table cellSpacing="0"
cellPadding="0"
> width="760" border="0">
> This significantly increases the size of the stored code.
> Are there any conversion functions or something like this to avoid it?
Where
> this conversion should be done - in ASP.Net or SQL server? How do I
convert
> it back to create an HTML page?
> Please note that I must use the Unicode data type - ntext, nchar etc,
since
> I'm using some Cyrillic characters.
> I would appreciate your advice very much.
> Thank you,
> --
> Peter Afonin
>|||What is the code you use to store the string you get in the SQL database?
"Peter Afonin" <pva@.speakeasy.net> a écrit dans le message de
news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I'm creating something like a web site builder in ASP.Net, and I need to
> store an HTML code in the SQL server table. If my customer just enters an
> HTML code, it is stored in the SQL server table like this: <table
> cellSpacing="0" cellPadding="0" width="760"
> border="0">, instead of <table cellSpacing="0"
cellPadding="0"
> width="760" border="0">
> This significantly increases the size of the stored code.
> Are there any conversion functions or something like this to avoid it?
Where
> this conversion should be done - in ASP.Net or SQL server? How do I
convert
> it back to create an HTML page?
> Please note that I must use the Unicode data type - ntext, nchar etc,
since
> I'm using some Cyrillic characters.
> I would appreciate your advice very much.
> Thank you,
> --
> Peter Afonin
>
>|||As the other poster states, it is not SQL that is doing the encoding, it is
something else...
Also, if the html pages will be less than 4000 unicode characters, you may
prefer to strore the data in a varchar column.
--
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
"Peter Afonin" <pva@.speakeasy.net> wrote in message
news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> Hello,
> I'm creating something like a web site builder in ASP.Net, and I need to
> store an HTML code in the SQL server table. If my customer just enters an
> HTML code, it is stored in the SQL server table like this: <table
> cellSpacing="0" cellPadding="0" width="760"
> border="0">, instead of <table cellSpacing="0"
cellPadding="0"
> width="760" border="0">
> This significantly increases the size of the stored code.
> Are there any conversion functions or something like this to avoid it?
Where
> this conversion should be done - in ASP.Net or SQL server? How do I
convert
> it back to create an HTML page?
> Please note that I must use the Unicode data type - ntext, nchar etc,
since
> I'm using some Cyrillic characters.
> I would appreciate your advice very much.
> Thank you,
> --
> Peter Afonin
>|||Thank you everyone for your suggestions.
So far when I use ntext it works OK, then I use the Literal control and
Server.Decode to write the data in ASP.Net.
Peter
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:eL$4fPh1EHA.4004@.tk2msftngp13.phx.gbl...
> As the other poster states, it is not SQL that is doing the encoding, it
is
> something else...
> Also, if the html pages will be less than 4000 unicode characters, you may
> prefer to strore the data in a varchar column.
> --
> 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
> "Peter Afonin" <pva@.speakeasy.net> wrote in message
> news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> > Hello,
> >
> > I'm creating something like a web site builder in ASP.Net, and I need to
> > store an HTML code in the SQL server table. If my customer just enters
an
> > HTML code, it is stored in the SQL server table like this: <table
> > cellSpacing="0" cellPadding="0"
width="760"
> > border="0">, instead of <table cellSpacing="0"
> cellPadding="0"
> > width="760" border="0">
> >
> > This significantly increases the size of the stored code.
> >
> > Are there any conversion functions or something like this to avoid it?
> Where
> > this conversion should be done - in ASP.Net or SQL server? How do I
> convert
> > it back to create an HTML page?
> >
> > Please note that I must use the Unicode data type - ntext, nchar etc,
> since
> > I'm using some Cyrillic characters.
> >
> > I would appreciate your advice very much.
> >
> > Thank you,
> >
> > --
> > Peter Afonin
> >
> >
>|||Wayne,
Maybe it's just a typo, but varchar cannot be properly used with unicode
and has a maximum length of 8000 characters. nvarchar has a limit of 4000
characters and should be used for all applications for maintenance purposes
(since most applications will have to support unicode in the future).
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:eL$4fPh1EHA.4004@.tk2msftngp13.phx.gbl...
> As the other poster states, it is not SQL that is doing the encoding, it
is
> something else...
> Also, if the html pages will be less than 4000 unicode characters, you may
> prefer to strore the data in a varchar column.
> --
> 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
> "Peter Afonin" <pva@.speakeasy.net> wrote in message
> news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> > Hello,
> >
> > I'm creating something like a web site builder in ASP.Net, and I need to
> > store an HTML code in the SQL server table. If my customer just enters
an
> > HTML code, it is stored in the SQL server table like this: <table
> > cellSpacing="0" cellPadding="0"
width="760"
> > border="0">, instead of <table cellSpacing="0"
> cellPadding="0"
> > width="760" border="0">
> >
> > This significantly increases the size of the stored code.
> >
> > Are there any conversion functions or something like this to avoid it?
> Where
> > this conversion should be done - in ASP.Net or SQL server? How do I
> convert
> > it back to create an HTML page?
> >
> > Please note that I must use the Unicode data type - ntext, nchar etc,
> since
> > I'm using some Cyrillic characters.
> >
> > I would appreciate your advice very much.
> >
> > Thank you,
> >
> > --
> > Peter Afonin
> >
> >
>|||Peter, I'm glad you have it working now.
--
Best regards,
Jeffrey Palermo
Blog: http://dotnetjunkies.com/weblog/jpalermo
"Peter Afonin" <peter@.gudzon.net> wrote in message
news:OAMi7Mk1EHA.1124@.tk2msftngp13.phx.gbl...
> Thank you everyone for your suggestions.
> So far when I use ntext it works OK, then I use the Literal control and
> Server.Decode to write the data in ASP.Net.
> Peter
> "Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
> news:eL$4fPh1EHA.4004@.tk2msftngp13.phx.gbl...
> > As the other poster states, it is not SQL that is doing the encoding, it
> is
> > something else...
> >
> > Also, if the html pages will be less than 4000 unicode characters, you
may
> > prefer to strore the data in a varchar column.
> >
> > --
> > 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
> >
> > "Peter Afonin" <pva@.speakeasy.net> wrote in message
> > news:eyXuQOa1EHA.3820@.TK2MSFTNGP11.phx.gbl...
> > > Hello,
> > >
> > > I'm creating something like a web site builder in ASP.Net, and I need
to
> > > store an HTML code in the SQL server table. If my customer just enters
> an
> > > HTML code, it is stored in the SQL server table like this: <table
> > > cellSpacing="0" cellPadding="0"
> width="760"
> > > border="0">, instead of <table cellSpacing="0"
> > cellPadding="0"
> > > width="760" border="0">
> > >
> > > This significantly increases the size of the stored code.
> > >
> > > Are there any conversion functions or something like this to avoid it?
> > Where
> > > this conversion should be done - in ASP.Net or SQL server? How do I
> > convert
> > > it back to create an HTML page?
> > >
> > > Please note that I must use the Unicode data type - ntext, nchar etc,
> > since
> > > I'm using some Cyrillic characters.
> > >
> > > I would appreciate your advice very much.
> > >
> > > Thank you,
> > >
> > > --
> > > Peter Afonin
> > >
> > >
> >
> >
>
Sunday, February 19, 2012
How to Stop Logging?
am creating a new db setting the option to simple and loading massive data
but transaction logging is still happening.
Hopefully someone has a suggestion for us.
stoney
"Raj" wrote:
> is it possible to stop logging in sql server?
> if it is how we can do that?
> Regards!
> Rajstoney wrote:[vbcol=seagreen]
> I was about to ask the same question. But I don't think there is a way.
I
> am creating a new db setting the option to simple and loading massive data
> but transaction logging is still happening.
> Hopefully someone has a suggestion for us.
> stoney
> "Raj" wrote:
>
You CANNOT, repeat CANNOT bypass the transaction log. If you don't
understand why, I suggest you read up on how the transaction log is used.
To prevent the log from growing excessively during an import, break the
import into batches. Import new records in groups of 1000, 5000, 10000,
whatever works best for you. The point is the keep the transactions as
small as possible (each import "batch" is a transaction). If you're
importing a million new records, you are creating a single transaction
of one million inserts - the transaction log must grow large enough to
hold that entire transaction.|||Hi
You can not turn off transaction log logging in SQL Server. Logging is an
intrinsic part of the data modification process.
http://msdn.microsoft.com/library/d... />
t_4l83.asp
Regards
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:1986C6DB-F764-4023-BEEF-68C354B10085@.microsoft.com...[vbcol=seagreen]
>I was about to ask the same question. But I don't think there is a way. I
> am creating a new db setting the option to simple and loading massive data
> but transaction logging is still happening.
> Hopefully someone has a suggestion for us.
> stoney
> "Raj" wrote:
>|||What's version of SQL Server are you using?
You cannot prevent from loging if the person has a login in SQL Server ,
however you can DENY VIEW DEFINITION, VIEW ANY DATABASE (SQL Server 2005)
In SQL Server 2000 you can deny access to the specific database/s
"Raj" <Raj@.discussions.microsoft.com> wrote in message
news:BC4D1CB5-F603-4B12-BFBF-E3AE939C8048@.microsoft.com...
> is it possible to stop logging in sql server?
> if it is how we can do that?
> Regards!
> Raj|||is it possible to stop logging in sql server?
if it is how we can do that?
Regards!
Raj|||I was about to ask the same question. But I don't think there is a way. I
am creating a new db setting the option to simple and loading massive data
but transaction logging is still happening.
Hopefully someone has a suggestion for us.
stoney
"Raj" wrote:
> is it possible to stop logging in sql server?
> if it is how we can do that?
> Regards!
> Raj|||stoney wrote:[vbcol=seagreen]
> I was about to ask the same question. But I don't think there is a way.
I
> am creating a new db setting the option to simple and loading massive data
> but transaction logging is still happening.
> Hopefully someone has a suggestion for us.
> stoney
> "Raj" wrote:
>
You CANNOT, repeat CANNOT bypass the transaction log. If you don't
understand why, I suggest you read up on how the transaction log is used.
To prevent the log from growing excessively during an import, break the
import into batches. Import new records in groups of 1000, 5000, 10000,
whatever works best for you. The point is the keep the transactions as
small as possible (each import "batch" is a transaction). If you're
importing a million new records, you are creating a single transaction
of one million inserts - the transaction log must grow large enough to
hold that entire transaction.|||Hi
You can not turn off transaction log logging in SQL Server. Logging is an
intrinsic part of the data modification process.
http://msdn.microsoft.com/library/d... />
t_4l83.asp
Regards
--
Mike
This posting is provided "AS IS" with no warranties, and confers no rights.
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:1986C6DB-F764-4023-BEEF-68C354B10085@.microsoft.com...[vbcol=seagreen]
>I was about to ask the same question. But I don't think there is a way. I
> am creating a new db setting the option to simple and loading massive data
> but transaction logging is still happening.
> Hopefully someone has a suggestion for us.
> stoney
> "Raj" wrote:
>|||What's version of SQL Server are you using?
You cannot prevent from loging if the person has a login in SQL Server ,
however you can DENY VIEW DEFINITION, VIEW ANY DATABASE (SQL Server 2005)
In SQL Server 2000 you can deny access to the specific database/s
"Raj" <Raj@.discussions.microsoft.com> wrote in message
news:BC4D1CB5-F603-4B12-BFBF-E3AE939C8048@.microsoft.com...
> is it possible to stop logging in sql server?
> if it is how we can do that?
> Regards!
> Raj