Showing posts with label app. Show all posts
Showing posts with label app. Show all posts

Thursday, March 22, 2012

Change default to named instance?

I have an app that connects to the default instance of msde. After some
conflicts with other app's msdes, I now want to use a named instance. This
is no problem from within the app, but can I change the default msde
instance to a named instance without losing the any data, and without
reinstalling msde?
Hi,
No you cant do directly.
1. Take a backup of all databases (Including system databases)
2. Stop SQL Server and copy the MDF and LDF to a safe place
3. Un Install the MSDE
4. Install MSDE and same service pack as old with same folder structure
5. Stop sql server
6. COpy the MDF and LDF (taken in step 2) to the same folder as old
7. Restart SQL server service
8. Execute the below comamnds in OSQL to change the server name
sp_dropserver <oldserver>
go
sp_addserver <new named server>,local
Note:
If these steps fail (Step 6 and 7) then use the database backup taken in
step-1 to restore all the databases.
Thanks
Hari
MCDBA
"Robbs" <rms14can@.hotmail.com> wrote in message
news:e1kT4FGOEHA.3312@.tk2msftngp13.phx.gbl...
> I have an app that connects to the default instance of msde. After some
> conflicts with other app's msdes, I now want to use a named instance. This
> is no problem from within the app, but can I change the default msde
> instance to a named instance without losing the any data, and without
> reinstalling msde?
>
|||Hi Robbs,
You can not change a default installation to a named instance.
You will have to reinstall MSDE as a named instance.
You will not loose data. Just make sure that you backup the database.
HTH
Ashish
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Thanks everyone!! Thats what I figured I would have to do; just wnated to
make sure there was no easier way.
Thnx Robb
"Ashish Ruparel [MSFT]" <v-ashrup@.online.microsoft.com> wrote in message
news:9k5UMmJOEHA.2692@.cpmsftngxa10.phx.gbl...
> Hi Robbs,
> You can not change a default installation to a named instance.
> You will have to reinstall MSDE as a named instance.
> You will not loose data. Just make sure that you backup the database.
> HTH
> Ashish
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>

Tuesday, March 20, 2012

Change DataSource between Development and Production

I have some existing .NET app, and so I'd like to integrate the RS w/
them.
Reports created by RS is very impressive, now I need to think about
integration. Two choices for me:
1. URL Access
2. Web Services
Option 1 is the fastest and efficient way, has the followings:
1) DataSource in dev and prod are different, doesn't seem like easy to
change them w/ modifying in the project.
2) SessionID, UserName and Password and other parameters are exposed in
URL unless using SSL, otherwise not secure.
Option 2 needs more coding just like a normal .NET projects but w/o
security concerns, still have to worry about changing DataSource stuff.
For example for .rdl
<DataSourceID>413d324e-1ddf-4c4d-8f2e-2dd50bd8d4ac</DataSourceID>
Our existing .NET has its own web.config file works like a .ini, we put
in all data source connection there, when move to production,
Production Release team needs to change SQL box name, UserID and
password inside of the web.config. Now, how do they change them in
.rdl?
Thanks in advance.Couple of things to consider. First, datasource should be a non-problem if
you use shared datasources (which I recommend). The shared datasource has to
have the same name in both production and dev but that is it. The default
when you deploy is to not overwrite the datasource so once you set it up in
production it will be undisturbed. Second, I suggest using a specific
username and password for retrieving the data from wherever you are getting
it. I create a special readonly user that is used by RS only. This is great
for security since it is readonly and you benefit from connection polling
which you would not if the user account of the user requesting the report is
used. If you report needs to include the user in the where clause (or you
need to use a filter with the username) then user the global variable
User!UserID.
As I said, rdl does not change at all for the datasource.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
<hifchan@.yahoo.com> wrote in message
news:1108586517.346073.261520@.c13g2000cwb.googlegroups.com...
> I have some existing .NET app, and so I'd like to integrate the RS w/
> them.
> Reports created by RS is very impressive, now I need to think about
> integration. Two choices for me:
> 1. URL Access
> 2. Web Services
> Option 1 is the fastest and efficient way, has the followings:
> 1) DataSource in dev and prod are different, doesn't seem like easy to
> change them w/ modifying in the project.
> 2) SessionID, UserName and Password and other parameters are exposed in
> URL unless using SSL, otherwise not secure.
> Option 2 needs more coding just like a normal .NET projects but w/o
> security concerns, still have to worry about changing DataSource stuff.
> For example for .rdl
> <DataSourceID>413d324e-1ddf-4c4d-8f2e-2dd50bd8d4ac</DataSourceID>
> Our existing .NET has its own web.config file works like a .ini, we put
> in all data source connection there, when move to production,
> Production Release team needs to change SQL box name, UserID and
> password inside of the web.config. Now, how do they change them in
> .rdl?
> Thanks in advance.
>|||Bruce,
You meant
<DataSourceID>413d324e-1ddf-4c4d-8f2e-2dd50bd8d4ac</DataSourceID> will
not matter as long as the .rdl reference the same <Name> only?|||Yes this is correct. The data source ID is just an internal id used by
report designer only. That is also the reason why the DataSourceID element
is in the report designer namespace: <rd:DataSourceID>. The report server
ignores these ids.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
<hifchan@.yahoo.com> wrote in message
news:1108657866.193950.180150@.g14g2000cwa.googlegroups.com...
> Bruce,
> You meant
> <DataSourceID>413d324e-1ddf-4c4d-8f2e-2dd50bd8d4ac</DataSourceID> will
> not matter as long as the .rdl reference the same <Name> only?
>

Change Datasource abuout url access

Hallo,
We have a ASP.Net app and need a way to manage the datasource.
We have one report for 5 Customer. Every customer has his own DB on our
Server. And Every customer has his own Datasource in the Reportmanager.
Now i call my report with url and will tell the reportservices to take
Connecton 1 or Connection 2 usw.
can i do this with a URL ACCESS ?
UweAbout the only way you could do that now, is with a parameter you pass into
the report...
Still there is a problem... Connections are not dynamic... So you would have
to put Stored procedures or dynamic queries which referred to linked servers
or used openquery, openrowset to move between servers...
SQL 2005 has a dynamic connection capability that will help make this
easier.
--
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
"Uwe Mielisch" <uwe@.mielisch.de> wrote in message
news:%23UE$dvUiFHA.2916@.TK2MSFTNGP14.phx.gbl...
> Hallo,
> We have a ASP.Net app and need a way to manage the datasource.
> We have one report for 5 Customer. Every customer has his own DB on our
> Server. And Every customer has his own Datasource in the Reportmanager.
> Now i call my report with url and will tell the reportservices to take
> Connecton 1 or Connection 2 usw.
> can i do this with a URL ACCESS ?
> Uwe
>|||Hallo Wayne,
Thank you. What do youn mean with
<parameter you pass into the report...>
Uwe
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> schrieb im Newsbeitrag
news:u1K2jlhiFHA.1412@.TK2MSFTNGP09.phx.gbl...
> About the only way you could do that now, is with a parameter you pass
> into the report...
> Still there is a problem... Connections are not dynamic... So you would
> have to put Stored procedures or dynamic queries which referred to linked
> servers or used openquery, openrowset to move between servers...
> SQL 2005 has a dynamic connection capability that will help make this
> easier.
> --
> 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
> "Uwe Mielisch" <uwe@.mielisch.de> wrote in message
> news:%23UE$dvUiFHA.2916@.TK2MSFTNGP14.phx.gbl...
>> Hallo,
>> We have a ASP.Net app and need a way to manage the datasource.
>> We have one report for 5 Customer. Every customer has his own DB on our
>> Server. And Every customer has his own Datasource in the Reportmanager.
>> Now i call my report with url and will tell the reportservices to take
>> Connecton 1 or Connection 2 usw.
>> can i do this with a URL ACCESS ?
>> Uwe
>

Monday, March 19, 2012

Change data type during INSERT INTO ?

I'm doing a data conversion project, moving data from one SQL app to
another.
I'm using INSERT INTO with Select and have the syntax correct. But when
executing the script I get:

Server: Msg 8114, Level 16, State 5, Line 1
Error converting data type varchar to float.

Is it possible to change the data type during the INSERT INTO statement?

ThanksThe destination table should be compatible with the data type of select
table

Madhivanan|||"rdraider" <rdraider@.sbcglobal.net> wrote in message
news:eRu_d.11608$C47.6368@.newssvr14.news.prodigy.c om...
> I'm doing a data conversion project, moving data from one SQL app to
> another.
> I'm using INSERT INTO with Select and have the syntax correct. But when
> executing the script I get:
> Server: Msg 8114, Level 16, State 5, Line 1
> Error converting data type varchar to float.
> Is it possible to change the data type during the INSERT INTO statement?
> Thanks

As the insert into has to guess about the datatypes of the table to create,
the safest way is to specifically create the table prior to the select into.

You can use cast or convert to gain a little more control over the way the
table is created.
but since you didn't post and example I can't help you more than this.|||On Fri, 18 Mar 2005 06:48:42 GMT, rdraider wrote:

>I'm doing a data conversion project, moving data from one SQL app to
>another.
>I'm using INSERT INTO with Select and have the syntax correct. But when
>executing the script I get:
>Server: Msg 8114, Level 16, State 5, Line 1
>Error converting data type varchar to float.
>Is it possible to change the data type during the INSERT INTO statement?

Hi rdraider,

If you use
INSERT INTO tablename (col1, col2, ..., colN)
SELECT expr1, expr2, ..., exprN
FROM ...
WHERE ...

Then the result of each expression will implicitly be converted to the
datatype of the corresponding column before it's stored in the table.

Your message indicates that one of your expressions is of datetype
varchar, but the corresponding column is of datatype float, and the
implicit conversion failed. E.g. because the varchar value to be
converted happened to be 'xxhasiu'.

If you use INSERT without column list, or SELECT *, then the first thing
should be to add a column list - changes to the table structure might
change the number and order of columns in the INSERT or in the SELECT *,
inducing a mismatch; explicitly naming the columns ensures that this
won't happen.

If that doesn't fix it, then find out which column(s) in the destination
table are of datatype float; run the SELECT (without the INSERT INTO) to
see the results and inspect the output to find the offending value. If
the output has too many rows for visual inspection, you might try adding
AND ISNUMERIC(exprN) = 0
This will return only the rows where exprN can't be converted to int,
float, money or decimal.

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)

Saturday, February 25, 2012

Chaching Sqldatasource datasets... can it be done? and a performance question.

I'm using visual basic coded datasets right now, and caching them, so as all of my web app users access the cache once the first person's gone to my site and initiallized the page.

If Cache("ds_cache")IsNothingThenDim dsAsNew DataSet

blah blah code blah blah blah

Cache.Insert("ds_cache", ds)EndIf

What I was wondering is, if it's possible to cache the datasets that get created and are used by Sqldatasources. Or if by chance caching is automatically done and controlled for these datasets, as it's the server that makes and handles them.

The reason I wonder about this because I'm not sure how you go about referencing one of those datasets, because you can't give them a name/id. And I've not found mention anywhere of you being able to do so.

The real point or question I'm trying to get at is to see which performs better , or uses less requests back to the server for the data as a lot of my data will be repeatedly used by all of my users and so I'd like to save myself from using as many repeated connections as possibles in regards to using a typed dataset versus filling my controls from a sqldatasource?

Thank you in advance for your response.

You know what, I pretty much found my answer:

http://msdn2.microsoft.com/en-us/library/z56y8ksb.aspx

The question still remains of if a sqldatasource would outperform a typed dataset?

It makes you wonder, as a typed dataset you don't have to worry about time spent on conversions, etc. but you would think that server built and controlled dataset might perform better, or atleast it would probably build faster when it's first created... please do reply if you have insight.

Chaching Sqldatasource datasets... can it be done? and a performance question.

I'm using visual basic coded datasets right now, and caching them, so as all of my web app users access the cache once the first person's gone to my site and initiallized the page.

If Cache("ds_cache") Is Nothing Then

Dim ds As New DataSet

blah blah code blah blah blah

Cache.Insert("ds_cache", ds)

End If

What I was wondering is, if it's possible to cache the datasets that get created and are used by Sqldatasources. Or if by chance caching is automatically done and controlled for these datasets, as it's the server that makes and handles them.

The reason I wonder about this because I'm not sure how you go about referencing one of those datasets, because you can't give them a name/id. And I've not found mention anywhere of you being able to do so.

The real point or question I'm trying to get at is to see which performs better , or uses less requests back to the server for the data as a lot of my data will be repeatedly used by all of my users and so I'd like to save myself from using as many repeated connections as possibles in regards to using a typed dataset versus filling my controls from a sqldatasource?

Thank you in advance for your response.

You know what, I pretty much found my answer:

http://msdn2.microsoft.com/en-us/library/z56y8ksb.aspx

The question still remains of if a sqldatasource would outperform a typed dataset?

It makes you wonder, as a typed dataset you don't have to worry about time spent on conversions, etc. but you would think that server built and controlled dataset might perform better, or atleast it would probably build faster when it's first created... please do reply if you have insight.

Friday, February 24, 2012

Celeron Processor

All the documentation says that a Celeron processor will not run MSDE 2000.
Just loaded a small enterprise app that is based on MSDE2000. Now the PC in
question is just out of the box Celeron PC (1.5G M370). Now would this just
be a freak occurance that does not portend fo the the futre?
hi,
CWells wrote:
> All the documentation says that a Celeron processor will not run MSDE
> 2000. Just loaded a small enterprise app that is based on MSDE2000.
> Now the PC in question is just out of the box Celeron PC (1.5G M370).
> Now would this just be a freak occurance that does not portend fo the
> the futre?
AFAIK, there's not such a constraint for MSDE not running on celeron
processors... (http://www.google.it/search?hl=it&q=...+celeron&meta=)
can you please post a link about that?
thank you
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

CE support from ASP.Net 2.0

MS states that CE does not work with ASP.Net applications 'by default'. What is needed to change this default?

Bascially, my desktop app. is configured from a browser app. (ASP.Net 2.0) and I want to use CE as the datastore for the application.

Thanks.

I don't think this is such a good idea. SQLCe is not designed for this type of application and while it can be adapted for use with ASP.NET, I don't recommend it and (frankly) don't want to encourage you to do so. The information on how to use it on ASP.NET has been published...|||

Please explain. What does "SQLCe is not designed for this type of application " mean? No. of connections? Performance?

In my case the web site is the admin. console of an application, so typically the number of users will be low.

Thanks.

|||Steve Lasker described the pros and cons in detail in his blog

http://blogs.msdn.com/stevelasker/

Basically it can be done - but there are limitations

Brian|||

Thanks for the reference. There still seems to be a gap in the SQL Server lineup. A small embeddable database that supports ODBC. Something like Firebird.

- A

|||Access files (.mdb) can still be used if that is what is needed ...|||

Yes, but Access/JET is also not designed for the way that data must be accessed in ASP. Consider that when you're running a site, many "clients" (pages) try to access the database at the same time. While JET is a "multiuser" engine, its file-share architecture funnels all operations on to a single operational thread. This means it works fine in testing and under a light load, but when you site is sucessful, it locks out all but one user at a time. In the case of SQLCe, again only one user is supported at a time but since it's not designed as a multiuser DBMS engine it's not a good choice for a webhosted database. I discuss this in my book. See www.hitchhikerguides.net

|||On a hosted website often one doesn't have a choice over the database. .mdb works fine for me on my relatively low access site.

As OLEDB and SQL Server were not possible then there are few choices.

Perhaps MySQL is another option.

What programming language are you using to access the database? Perl/python/Php?|||Right. The ISPs are often hesitant to install/support a high-maintenance DBMS engine--which is another reason I hesitate to endorse JET.|||

Access is now officially unsupported. That is part of the problem.

- A

|||Strange - just installed Access 2007 ... have you the reference for the non support?

No maintenance for Access under 2003 server with .NET2. Correct levels of MDAC come installed. That is why the ISP's let you create a file dsn for ODBC. - not using JET.

From Steve Lasker's blog 27 Nov 2006:

"For many of you, this may sound like the Jet comparison, and it is.

Developers started with Jet, and on their box, everything was fine.

They ran their app, all the commands executed, but they didn’t really

test with different concurrent users. They were able to easily post

the database to their hosting site, and all seemed good. Only after

their app went into production, did they realize they were using a

product that just wasn’t intended for that type of usage. Sure, Jet is

fine for small sites, but did all developers know that when they

started? When they do hit the limitation, what do they do? Re-write

or “upgrade”. "

I have found that for small site usage .mdb is fine. Not every can have a dedictated server or pay the extortionate fees for SQL Server. In my case the upgrade path would be to MySQL - not one I want (or need) to take.|||Hi Bill,

I just bought your ebook on SQL CE, it looks good -- just haven't had time to dig into it yet, but i love the ebook format. I just wanted to point out that we added Connection Pooling and APTC (Allow Partially Trusted Caller) support to VistaDB 3.0 RC1. These are very important features to ASP.NET developers and helps make VistaDB 3.0 an excellent database solution for building small to mid-size ASP.NET applications. So, if you like what SQL CE offers in terms of size and features etc. but want to use it in an ASP.NET application, check out VistaDB 3.0 RC1.

Anthony Carrabino
http://www.vistadb.net/

CE support from ASP.Net 2.0

MS states that CE does not work with ASP.Net applications 'by default'. What is needed to change this default?

Bascially, my desktop app. is configured from a browser app. (ASP.Net 2.0) and I want to use CE as the datastore for the application.

Thanks.

I don't think this is such a good idea. SQLCe is not designed for this type of application and while it can be adapted for use with ASP.NET, I don't recommend it and (frankly) don't want to encourage you to do so. The information on how to use it on ASP.NET has been published...|||

Please explain. What does "SQLCe is not designed for this type of application " mean? No. of connections? Performance?

In my case the web site is the admin. console of an application, so typically the number of users will be low.

Thanks.

|||Steve Lasker described the pros and cons in detail in his blog

http://blogs.msdn.com/stevelasker/

Basically it can be done - but there are limitations

Brian|||

Thanks for the reference. There still seems to be a gap in the SQL Server lineup. A small embeddable database that supports ODBC. Something like Firebird.

- A

|||Access files (.mdb) can still be used if that is what is needed ...|||

Yes, but Access/JET is also not designed for the way that data must be accessed in ASP. Consider that when you're running a site, many "clients" (pages) try to access the database at the same time. While JET is a "multiuser" engine, its file-share architecture funnels all operations on to a single operational thread. This means it works fine in testing and under a light load, but when you site is sucessful, it locks out all but one user at a time. In the case of SQLCe, again only one user is supported at a time but since it's not designed as a multiuser DBMS engine it's not a good choice for a webhosted database. I discuss this in my book. See www.hitchhikerguides.net

|||On a hosted website often one doesn't have a choice over the database. .mdb works fine for me on my relatively low access site.

As OLEDB and SQL Server were not possible then there are few choices.

Perhaps MySQL is another option.

What programming language are you using to access the database? Perl/python/Php?|||Right. The ISPs are often hesitant to install/support a high-maintenance DBMS engine--which is another reason I hesitate to endorse JET.|||

Access is now officially unsupported. That is part of the problem.

- A

|||Strange - just installed Access 2007 ... have you the reference for the non support?

No maintenance for Access under 2003 server with .NET2. Correct levels of MDAC come installed. That is why the ISP's let you create a file dsn for ODBC. - not using JET.

From Steve Lasker's blog 27 Nov 2006:

"For many of you, this may sound like the Jet comparison, and it is.

Developers started with Jet, and on their box, everything was fine.

They ran their app, all the commands executed, but they didn’t really

test with different concurrent users. They were able to easily post

the database to their hosting site, and all seemed good. Only after

their app went into production, did they realize they were using a

product that just wasn’t intended for that type of usage. Sure, Jet is

fine for small sites, but did all developers know that when they

started? When they do hit the limitation, what do they do? Re-write

or “upgrade”. "

I have found that for small site usage .mdb is fine. Not every can have a dedictated server or pay the extortionate fees for SQL Server. In my case the upgrade path would be to MySQL - not one I want (or need) to take.|||Hi Bill,

I just bought your ebook on SQL CE, it looks good -- just haven't had time to dig into it yet, but i love the ebook format. I just wanted to point out that we added Connection Pooling and APTC (Allow Partially Trusted Caller) support to VistaDB 3.0 RC1. These are very important features to ASP.NET developers and helps make VistaDB 3.0 an excellent database solution for building small to mid-size ASP.NET applications. So, if you like what SQL CE offers in terms of size and features etc. but want to use it in an ASP.NET application, check out VistaDB 3.0 RC1.

Anthony Carrabino
http://www.vistadb.net/

CE DB requires SQL Express install on client machines?

I'm working on a C# 2008 project, when i add a CE Database to it, then publish the app, the installer wants to download and install the entire SQL Server Express product on the client machines. My understanding is that I should be able to embed this database right into the app, but it defeats the purpose to have the installer download and install the entire express product (the actual project is 1 meg).

Is this expected behavior? or am I doing something wrong?

SQL Express is NOT required for SQL Compact projects. You must have a reference to a .mdf file or similar in your project that triggers this requirement.|||

I checked the prerequisite tab and sql express isnt even checked, i'll investigate further