Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Thursday, March 29, 2012

drastic change in response time

All processes have slowed to a crawl - 1 user running a
simple query in ARC brings all app's residing on this
machine to a crawl. Machine resourses are abundant and
available. I know these are VERY sparse details... I'll
provide whatever info I can if someone can let us know
something. ThanxThis is a multi-part message in MIME format.
--=_NextPart_000_04C0_01C3CE1E.3D63B070
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Some suggestions:
1. Run DBCC OPENTRAN for your database. See what SPID has the longest
running txn. Run DBCC INPUTBUFFER on the SPID.
2. Run sp_lock and see who is putting up the most locks.
3. Based on the above, consider killing the offending SPID.
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"David" <anonymous@.discussions.microsoft.com> wrote in message
news:07aa01c3ce47$4cc7aca0$a001280a@.phx.gbl...
All processes have slowed to a crawl - 1 user running a
simple query in ARC brings all app's residing on this
machine to a crawl. Machine resourses are abundant and
available. I know these are VERY sparse details... I'll
provide whatever info I can if someone can let us know
something. Thanx
--=_NextPart_000_04C0_01C3CE1E.3D63B070
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Some suggestions:
1. Run DBCC OPENTRAN =for your database. See what SPID has the longest running txn. Run =DBCC INPUTBUFFER on the SPID.
2. Run sp_lock and =see who is putting up the most locks.
3. Based on =the above, consider killing the offending SPID.
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"David" wrote in message news:07aa01c3ce47$4c=c7aca0$a001280a@.phx.gbl...All processes have slowed to a crawl - 1 user running a simple query in =ARC brings all app's residing on this machine to a crawl. Machine resourses are abundant and available. I know these are VERY =sparse details... I'll provide whatever info I can if someone can let us =know something. Thanx

--=_NextPart_000_04C0_01C3CE1E.3D63B070--|||What are your server specs? Can you run other operations on the server
quickly(ie. is it SQL or the whole box)?
Other things to list --
mem usage
Free pages
IO
CPU usage
Cost of the query in question
We have had random slow and stoppage of performance on SQL2K.
"David" <anonymous@.discussions.microsoft.com> wrote in message
news:07aa01c3ce47$4cc7aca0$a001280a@.phx.gbl...
> All processes have slowed to a crawl - 1 user running a
> simple query in ARC brings all app's residing on this
> machine to a crawl. Machine resourses are abundant and
> available. I know these are VERY sparse details... I'll
> provide whatever info I can if someone can let us know
> something. Thanx|||1gb RAM
4gb harddrive available (about 40%)
2 - 933 processors
ALL application are affected. Task Mgr show both 933
processors at 100 capacity. All seem fine until we run a
simple SQL query on an ARC database. THAT qry soaks up
100% RAM.
>--Original Message--
>What are your server specs? Can you run other operations
on the server
>quickly(ie. is it SQL or the whole box)?
>Other things to list --
>mem usage
>Free pages
>IO
>CPU usage
>Cost of the query in question
>We have had random slow and stoppage of performance on
SQL2K.
>"David" <anonymous@.discussions.microsoft.com> wrote in
message
>news:07aa01c3ce47$4cc7aca0$a001280a@.phx.gbl...
>> All processes have slowed to a crawl - 1 user running a
>> simple query in ARC brings all app's residing on this
>> machine to a crawl. Machine resourses are abundant and
>> available. I know these are VERY sparse details... I'll
>> provide whatever info I can if someone can let us know
>> something. Thanx
>
>.
>|||What is the cost of the query? Can you run --
SET SHOWPLAN_ALL ON
GO
<QUERY IN QUESTION>
and post the output.
Also there is a SQL bug on SQL2K that will create mem leaks when jumping
between DBs in a query, is that happening? What version of SQL and SP are
you on?
"DAvid" <anonymous@.discussions.microsoft.com> wrote in message
news:02f501c3ce4c$25d52d70$a301280a@.phx.gbl...
> 1gb RAM
> 4gb harddrive available (about 40%)
> 2 - 933 processors
> ALL application are affected. Task Mgr show both 933
> processors at 100 capacity. All seem fine until we run a
> simple SQL query on an ARC database. THAT qry soaks up
> 100% RAM.
>
> >--Original Message--
> >What are your server specs? Can you run other operations
> on the server
> >quickly(ie. is it SQL or the whole box)?
> >
> >Other things to list --
> >mem usage
> >Free pages
> >IO
> >CPU usage
> >Cost of the query in question
> >
> >We have had random slow and stoppage of performance on
> SQL2K.
> >
> >"David" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:07aa01c3ce47$4cc7aca0$a001280a@.phx.gbl...
> >> All processes have slowed to a crawl - 1 user running a
> >> simple query in ARC brings all app's residing on this
> >> machine to a crawl. Machine resourses are abundant and
> >> available. I know these are VERY sparse details... I'll
> >> provide whatever info I can if someone can let us know
> >> something. Thanx
> >
> >
> >.
> >|||Please elaborate on this "bug"., KB articles, PSS cases, thanks.
--
Kevin Connell, MCDBA
----
The views expressed here are my own
and not of my employer.
----
"Kevin Brooks" <jeepnreb@.yahoo.com> wrote in message
news:uL9#ZMlzDHA.2456@.TK2MSFTNGP10.phx.gbl...
> What is the cost of the query? Can you run --
> SET SHOWPLAN_ALL ON
> GO
> <QUERY IN QUESTION>
> and post the output.
> Also there is a SQL bug on SQL2K that will create mem leaks when jumping
> between DBs in a query, is that happening? What version of SQL and SP are
> you on?
>
> "DAvid" <anonymous@.discussions.microsoft.com> wrote in message
> news:02f501c3ce4c$25d52d70$a301280a@.phx.gbl...
> > 1gb RAM
> > 4gb harddrive available (about 40%)
> > 2 - 933 processors
> >
> > ALL application are affected. Task Mgr show both 933
> > processors at 100 capacity. All seem fine until we run a
> > simple SQL query on an ARC database. THAT qry soaks up
> > 100% RAM.
> >
> >
> > >--Original Message--
> > >What are your server specs? Can you run other operations
> > on the server
> > >quickly(ie. is it SQL or the whole box)?
> > >
> > >Other things to list --
> > >mem usage
> > >Free pages
> > >IO
> > >CPU usage
> > >Cost of the query in question
> > >
> > >We have had random slow and stoppage of performance on
> > SQL2K.
> > >
> > >"David" <anonymous@.discussions.microsoft.com> wrote in
> > message
> > >news:07aa01c3ce47$4cc7aca0$a001280a@.phx.gbl...
> > >> All processes have slowed to a crawl - 1 user running a
> > >> simple query in ARC brings all app's residing on this
> > >> machine to a crawl. Machine resourses are abundant and
> > >> available. I know these are VERY sparse details... I'll
> > >> provide whatever info I can if someone can let us know
> > >> something. Thanx
> > >
> > >
> > >.
> > >
>|||Will have to respond tomorrow - office is closed for the
day
>--Original Message--
>What is the cost of the query? Can you run --
>SET SHOWPLAN_ALL ON
>GO
><QUERY IN QUESTION>
>and post the output.
>Also there is a SQL bug on SQL2K that will create mem
leaks when jumping
>between DBs in a query, is that happening? What version
of SQL and SP are
>you on?
>
>"DAvid" <anonymous@.discussions.microsoft.com> wrote in
message
>news:02f501c3ce4c$25d52d70$a301280a@.phx.gbl...
>> 1gb RAM
>> 4gb harddrive available (about 40%)
>> 2 - 933 processors
>> ALL application are affected. Task Mgr show both 933
>> processors at 100 capacity. All seem fine until we run
a
>> simple SQL query on an ARC database. THAT qry soaks up
>> 100% RAM.
>>
>> >--Original Message--
>> >What are your server specs? Can you run other
operations
>> on the server
>> >quickly(ie. is it SQL or the whole box)?
>> >
>> >Other things to list --
>> >mem usage
>> >Free pages
>> >IO
>> >CPU usage
>> >Cost of the query in question
>> >
>> >We have had random slow and stoppage of performance on
>> SQL2K.
>> >
>> >"David" <anonymous@.discussions.microsoft.com> wrote in
>> message
>> >news:07aa01c3ce47$4cc7aca0$a001280a@.phx.gbl...
>> >> All processes have slowed to a crawl - 1 user
running a
>> >> simple query in ARC brings all app's residing on this
>> >> machine to a crawl. Machine resourses are abundant
and
>> >> available. I know these are VERY sparse details...
I'll
>> >> provide whatever info I can if someone can let us
know
>> >> something. Thanx
>> >
>> >
>> >.
>> >
>
>.
>|||It was a bug that hit us a few years back. We did not open a PSS case, but
you can search KB for it(if they acknowledge it). The client apps where
made in PB and a SQL2K(Compaq) server gold release. We no longer see this
problem and are on SP3a/SP2. It was a sporatic and not a serious outage at
the time, it sounded familar to is problem though.
"Kevin" <ReplyTo@.Newsgroups.only> wrote in message
news:uKFCBJmzDHA.1760@.TK2MSFTNGP10.phx.gbl...
> Please elaborate on this "bug"., KB articles, PSS cases, thanks.
> --
> Kevin Connell, MCDBA
> ----
> The views expressed here are my own
> and not of my employer.
> ----
> "Kevin Brooks" <jeepnreb@.yahoo.com> wrote in message
> news:uL9#ZMlzDHA.2456@.TK2MSFTNGP10.phx.gbl...
> > What is the cost of the query? Can you run --
> >
> > SET SHOWPLAN_ALL ON
> > GO
> > <QUERY IN QUESTION>
> >
> > and post the output.
> >
> > Also there is a SQL bug on SQL2K that will create mem leaks when jumping
> > between DBs in a query, is that happening? What version of SQL and SP
are
> > you on?
> >
> >
> > "DAvid" <anonymous@.discussions.microsoft.com> wrote in message
> > news:02f501c3ce4c$25d52d70$a301280a@.phx.gbl...
> > > 1gb RAM
> > > 4gb harddrive available (about 40%)
> > > 2 - 933 processors
> > >
> > > ALL application are affected. Task Mgr show both 933
> > > processors at 100 capacity. All seem fine until we run a
> > > simple SQL query on an ARC database. THAT qry soaks up
> > > 100% RAM.
> > >
> > >
> > > >--Original Message--
> > > >What are your server specs? Can you run other operations
> > > on the server
> > > >quickly(ie. is it SQL or the whole box)?
> > > >
> > > >Other things to list --
> > > >mem usage
> > > >Free pages
> > > >IO
> > > >CPU usage
> > > >Cost of the query in question
> > > >
> > > >We have had random slow and stoppage of performance on
> > > SQL2K.
> > > >
> > > >"David" <anonymous@.discussions.microsoft.com> wrote in
> > > message
> > > >news:07aa01c3ce47$4cc7aca0$a001280a@.phx.gbl...
> > > >> All processes have slowed to a crawl - 1 user running a
> > > >> simple query in ARC brings all app's residing on this
> > > >> machine to a crawl. Machine resourses are abundant and
> > > >> available. I know these are VERY sparse details... I'll
> > > >> provide whatever info I can if someone can let us know
> > > >> something. Thanx
> > > >
> > > >
> > > >.
> > > >
> >
> >
>|||Problem turned out not to be SQL Server generated. Was
instead a problem with SDE reconciliation...sorry!
david
>--Original Message--
>All processes have slowed to a crawl - 1 user running a
>simple query in ARC brings all app's residing on this
>machine to a crawl. Machine resourses are abundant and
>available. I know these are VERY sparse details... I'll
>provide whatever info I can if someone can let us know
>something. Thanx
>.
>

Tuesday, March 27, 2012

DR - Restore Master

I am doing a DR test and I am running the command sqlservr.exe -c -m to put
the server in single user mode before I restore the Master database. My ques
tion - How long does this command normally run?
Thanks,
JessThe command prompt window will sit there, it is running the sql server =
process, so it stays until you shut it down (either by CTRL + C, or a =
shutdown command from osql or Query analyser)
Mike John
"Jess" <anonymous@.discussions.microsoft.com> wrote in message =
news:65EAAC26-7D01-4B7A-8357-A88735A63000@.microsoft.com...
> I am doing a DR test and I am running the command sqlservr.exe -c -m =
to put the server in single user mode before I restore the Master =
database. My question - How long does this command normally run?=20
>=20
> Thanks,
> Jess|||sqlservr.exe is the service. When you run it with a switch in a command
window it will keep running as long as SQL Server is running in single user
mode.
Christian Smith
"Jess" <anonymous@.discussions.microsoft.com> wrote in message
news:65EAAC26-7D01-4B7A-8357-A88735A63000@.microsoft.com...
> I am doing a DR test and I am running the command sqlservr.exe -c -m to
put the server in single user mode before I restore the Master database. My
question - How long does this command normally run?
> Thanks,
> Jess|||Great, thanks guys! I logged into QA to see if it was in single user mode an
d it was but not sure if there was any way the command prompt would give any
notification that it was in single user mode. My sits there for awhile afte
r Starting up database 'msd
b'.

DR - Master db restore

I am doing a DR test and running the command sqlservr.exe -c -m to get the s
erver in single user mode. How long does this command normally run?
Thanks,
JessI am assuming you are running this in a command window. If so, it will run
until you hit Ctrl-C and answer yes to the prompt. When you start SQL
server this way it is starting as an application.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||Hi,
As soon you run sqlservr.exe -c -m from command prompt the sql server starts
in Single user mode. One user can login to SQL server and perform all the
activities. After that you can close the sqlservr.exe which is running from
command prompt using CNTL and C key.
Alternately,
You can start the SQL server in Single user mode using
COntrol panel -- Admin tools -- Services , Select SQL server Services and in
parameters you can put -m and click the start button. This will also start
the SQL server in single user mode. Once the actitivty is completed you can
just restart the service to make it Multiuser.
Thanks
Hari
MCDBA
"Jess" <anonymous@.discussions.microsoft.com> wrote in message
news:3FAD59F2-DA04-490D-B131-EE5D92F6AB9C@.microsoft.com...
> I am doing a DR test and running the command sqlservr.exe -c -m to get the
server in single user mode. How long does this command normally run?
> Thanks,
> Jess|||When you run this from the command prompt, it should take a few seconds to
come up and while it is coming up, it will be writing things to the console
( command prompt), the last message shoujld be 'recovery complete' I think,
and then it stops writing...
The system is not hung.. the server is simply up and running. The server is
running as long as the command window is open... Go ahead and use Query
Analyzer or whatever to do your work, Then Ctrl-C on the command prompt
window to bring SQL back down.
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.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
"Jess" <anonymous@.discussions.microsoft.com> wrote in message
news:3FAD59F2-DA04-490D-B131-EE5D92F6AB9C@.microsoft.com...
> I am doing a DR test and running the command sqlservr.exe -c -m to get the
server in single user mode. How long does this command normally run?
> Thanks,
> Jess|||Thanks everyone!sql

DR - Master db restore

I am doing a DR test and running the command sqlservr.exe -c -m to get the server in single user mode. How long does this command normally run
Thanks
JessI am assuming you are running this in a command window. If so, it will run
until you hit Ctrl-C and answer yes to the prompt. When you start SQL
server this way it is starting as an application.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||Hi,
As soon you run sqlservr.exe -c -m from command prompt the sql server starts
in Single user mode. One user can login to SQL server and perform all the
activities. After that you can close the sqlservr.exe which is running from
command prompt using CNTL and C key.
Alternately,
You can start the SQL server in Single user mode using
COntrol panel -- Admin tools -- Services , Select SQL server Services and in
parameters you can put -m and click the start button. This will also start
the SQL server in single user mode. Once the actitivty is completed you can
just restart the service to make it Multiuser.
Thanks
Hari
MCDBA
"Jess" <anonymous@.discussions.microsoft.com> wrote in message
news:3FAD59F2-DA04-490D-B131-EE5D92F6AB9C@.microsoft.com...
> I am doing a DR test and running the command sqlservr.exe -c -m to get the
server in single user mode. How long does this command normally run?
> Thanks,
> Jess|||When you run this from the command prompt, it should take a few seconds to
come up and while it is coming up, it will be writing things to the console
( command prompt), the last message shoujld be 'recovery complete' I think,
and then it stops writing...
The system is not hung.. the server is simply up and running. The server is
running as long as the command window is open... Go ahead and use Query
Analyzer or whatever to do your work, Then Ctrl-C on the command prompt
window to bring SQL back down.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.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
"Jess" <anonymous@.discussions.microsoft.com> wrote in message
news:3FAD59F2-DA04-490D-B131-EE5D92F6AB9C@.microsoft.com...
> I am doing a DR test and running the command sqlservr.exe -c -m to get the
server in single user mode. How long does this command normally run?
> Thanks,
> Jess|||Thanks everyone!

DPE Error running on report Server

We created a DPE to pull data off a Web Service to be used as a datasource in
the reports we create. We created and added the code group to the
rssrvpolicy.config and rsmgrpolicy.config files. Also added the extension
name to the Data section of the RSReportServer.config file. The report works
correctly in debug designer mode but we receive the following error when
trying to run the report through the report manager or report server.
An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Query execution failed for data set 'NewDataset'. (rsErrorExecutingCommand)
Get Online Help
Request for the permission of type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.Check the documentation about how to deploy a similar DPE.
[WebService Data Processing Extension]
http://www.rdlcomponents.com/DTE/default.aspx
Thanks
Jerry
"Deb Taylor" wrote:
> We created a DPE to pull data off a Web Service to be used as a datasource in
> the reports we create. We created and added the code group to the
> rssrvpolicy.config and rsmgrpolicy.config files. Also added the extension
> name to the Data section of the RSReportServer.config file. The report works
> correctly in debug designer mode but we receive the following error when
> trying to run the report through the report manager or report server.
> An error has occurred during report processing. (rsProcessingAborted) Get
> Online Help
> Query execution failed for data set 'NewDataset'. (rsErrorExecutingCommand)
> Get Online Help
> Request for the permission of type
> System.Security.Permissions.EnvironmentPermission, mscorlib,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
>

Sunday, March 25, 2012

Downloading data into a txt file

Dear All,

I have an application running on my mobile device and the data is stored in the mobile database. So now i am trying to build any application on my pc which upon click should download the data from my mobile database into a local text file. Is there any idea or reference where I can stary working on this ?

DataSet ds = new DataSet();

...

DataAdapter da = new DataAdapter(...);

da.Fill(ds, "table1");

...

da.Fill(ds, "tableN");

ds.WriteXml("LocalTextFile.xml");

If XML is not what you want then write data row by row in the format you want using System.IO namespace.

|||

Dear Ilya,

I would prefer it to be in text file format. The problem what project shall I develop I mean in the visual studio 2005. Should it be windows form or device application ? Because if it is device application it cant run in my desktop rite ? So it should be windows form rite ? Thanks.

|||

Dear Ilya,

I have now build a new console application. So then I add a reference to

System.Data.SqlServerCe; to enable me to connect to the mobile database found in the pda. So when I try to run I get an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". The problem is that on the same machine I can compile my device application which is also using the same reference'System.Data.SqlServerCe. Please correct me if I am doing something wrong here. Another thing is that how must I reference the path to my mobile database in the pda ? I am trying like this I dont know if this is right

Mobile Device/MiniSD Card/MiniSD Card/test1/db1.sdf. Thanks.

|||

Dear All,

I have a problem here. What i exactly want to do it that build a console application where when I connect my pda to my desktop and run the exe file it should be able to transfer the .sdf data into a text file of my local desktop ? Is there any code or reference where can guide me ?

|||Some of the components from www.primeworks-mobile.com should be able to help you.|||

Dear ErikEJ,

I would prefer to write on my own as I cant afford third party software. Hope you can show me some light into it. Thanks.

|||What you are going to want to probably do is copy the database from the device to your desktop, then use the sql ce for the desktop libs (remember you can use sql ce on devices and full blown windows) to read through the database and output . You can accomplish copying the database over through code using the Windows CE RAPI. The full framework as far as I know does not have built-in support for it. So what you would need to do is P/Invoke some functions in the rapi.dll. Luckily somebody has essentially done this, look for the opennetcf's (www.opennetcf.org) desktop communication library. So once you use this to get a copy of the database over to your desktop you can use the sql ce for windows (not wm or ce) libs to connect to your now local copy of the database. Then using a SqlCeDataReader you can just iterate through every record in the database, while reading a record in you can format it however you like then push that into a file using a StreamWriter object.
|||

Dear Steve,

Thank you very much for your kind information. So now I have downloaded the OpenNETCF.Desktop.Communication Library . Now how shall I start ? Shall I start by building a console application ? So must I first manually download the database or the system can do it for me ? I am really at lost can your pls guide me further on this. Thanks once again.

|||If you want to do it as a console application then start there. Then my next step would be to use the Desktop Communication library to programmatically get the database from your device to local computer. The communication library should have came with an example application that you can probably look at to find out how they copy files back and forth. You can look their and do the same thing.
|||

Dear Steve,

Ok I have followed and done accordingly and sucessfully download the sdf file into my desktop. My next problem is that i am not able to connect to downloaded .sdf in the desktop. I am using the same code as I build the windows device application. Can your please tell me wat can be my mistake ? For example I use this

SqlCeConnection conn1 = new SqlCeConnection("Data Source = c:/test1.sdf");

First I got an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Then I manage to solve "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". So wat is the possible error on my side ?

So what can be possible error on my side ? Thanks.

|||

Dear Steve,

I am ok with Desktop Communication library. I have already managed to download the database from the device to my local computer. My next step is that how can I from my console application link to the database which I have already downloaded using the said library. Thanks once again.

|||Once you have the sdf file over to you desktop you can use the desktop version of the sqlce data object. I think you need to download the Microsoft SQL Server Mobile 2005 Mobile Edition SDK. Once you have that downloaded and installed it you should be able to add the proper references to the desktop x86 version of the libraries that you need. Then you should be able to connect to the database and use it just like you did on the handheld with the .NET CF. You should be able to just use a SqlCeDataReader object to query the database then read through the returned records and output them using a StreamWriter object to put them into a text file which you can then control the format of.
|||

Dear Steve,

I have already downloaded the microsoft sql server mobile 2005 mobile edition sdk. So I tried to use the SqlCeDataReader and below is the errors I got. Can you please guide me on this ?

SqlCeConnection conn1 = new SqlCeConnection("Data Source = c:/test1.sdf");

First I got an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Then I manage to solve that problem but got another one "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". So wat is the possible error on my side ?Thanks.

Downloading data into a txt file

Dear All,

I have an application running on my mobile device and the data is stored in the mobile database. So now i am trying to build any application on my pc which upon click should download the data from my mobile database into a local text file. Is there any idea or reference where I can stary working on this ?

DataSet ds = new DataSet();

...

DataAdapter da = new DataAdapter(...);

da.Fill(ds, "table1");

...

da.Fill(ds, "tableN");

ds.WriteXml("LocalTextFile.xml");

If XML is not what you want then write data row by row in the format you want using System.IO namespace.

|||

Dear Ilya,

I would prefer it to be in text file format. The problem what project shall I develop I mean in the visual studio 2005. Should it be windows form or device application ? Because if it is device application it cant run in my desktop rite ? So it should be windows form rite ? Thanks.

|||

Dear Ilya,

I have now build a new console application. So then I add a reference to

System.Data.SqlServerCe; to enable me to connect to the mobile database found in the pda. So when I try to run I get an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". The problem is that on the same machine I can compile my device application which is also using the same reference'System.Data.SqlServerCe. Please correct me if I am doing something wrong here. Another thing is that how must I reference the path to my mobile database in the pda ? I am trying like this I dont know if this is right

Mobile Device/MiniSD Card/MiniSD Card/test1/db1.sdf. Thanks.

|||

Dear All,

I have a problem here. What i exactly want to do it that build a console application where when I connect my pda to my desktop and run the exe file it should be able to transfer the .sdf data into a text file of my local desktop ? Is there any code or reference where can guide me ?

|||Some of the components from www.primeworks-mobile.com should be able to help you.|||

Dear ErikEJ,

I would prefer to write on my own as I cant afford third party software. Hope you can show me some light into it. Thanks.

|||What you are going to want to probably do is copy the database from the device to your desktop, then use the sql ce for the desktop libs (remember you can use sql ce on devices and full blown windows) to read through the database and output . You can accomplish copying the database over through code using the Windows CE RAPI. The full framework as far as I know does not have built-in support for it. So what you would need to do is P/Invoke some functions in the rapi.dll. Luckily somebody has essentially done this, look for the opennetcf's (www.opennetcf.org) desktop communication library. So once you use this to get a copy of the database over to your desktop you can use the sql ce for windows (not wm or ce) libs to connect to your now local copy of the database. Then using a SqlCeDataReader you can just iterate through every record in the database, while reading a record in you can format it however you like then push that into a file using a StreamWriter object.
|||

Dear Steve,

Thank you very much for your kind information. So now I have downloaded the OpenNETCF.Desktop.Communication Library . Now how shall I start ? Shall I start by building a console application ? So must I first manually download the database or the system can do it for me ? I am really at lost can your pls guide me further on this. Thanks once again.

|||If you want to do it as a console application then start there. Then my next step would be to use the Desktop Communication library to programmatically get the database from your device to local computer. The communication library should have came with an example application that you can probably look at to find out how they copy files back and forth. You can look their and do the same thing.
|||

Dear Steve,

Ok I have followed and done accordingly and sucessfully download the sdf file into my desktop. My next problem is that i am not able to connect to downloaded .sdf in the desktop. I am using the same code as I build the windows device application. Can your please tell me wat can be my mistake ? For example I use this

SqlCeConnection conn1 = new SqlCeConnection("Data Source = c:/test1.sdf");

First I got an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Then I manage to solve "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". So wat is the possible error on my side ?

So what can be possible error on my side ? Thanks.

|||

Dear Steve,

I am ok with Desktop Communication library. I have already managed to download the database from the device to my local computer. My next step is that how can I from my console application link to the database which I have already downloaded using the said library. Thanks once again.

|||Once you have the sdf file over to you desktop you can use the desktop version of the sqlce data object. I think you need to download the Microsoft SQL Server Mobile 2005 Mobile Edition SDK. Once you have that downloaded and installed it you should be able to add the proper references to the desktop x86 version of the libraries that you need. Then you should be able to connect to the database and use it just like you did on the handheld with the .NET CF. You should be able to just use a SqlCeDataReader object to query the database then read through the returned records and output them using a StreamWriter object to put them into a text file which you can then control the format of.
|||

Dear Steve,

I have already downloaded the microsoft sql server mobile 2005 mobile edition sdk. So I tried to use the SqlCeDataReader and below is the errors I got. Can you please guide me on this ?

SqlCeConnection conn1 = new SqlCeConnection("Data Source = c:/test1.sdf");

First I got an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Then I manage to solve that problem but got another one "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". So wat is the possible error on my side ?Thanks.

Download: SQL Server Management Studio Express

I have an instance of SQL Server 2005 running on a server. I know that Management Studio is available to me on the server through Programs.

What do I need on my client computer used for development to access the instance on the server? Is it as simple as a shortcut to the server Management Studio exe? Do I access it through Internet Explorer? Or what do I have to install on the client to be able to manager the server DB's?

Apparently this must be very easy because I've looked all over and can't find the answer. Thank you in advance.

Use the SQL Server installation CD, and choose the "Install Client Tools" options. At least you'll need to install client connectivity, and if you want the query editor, and other development tools, then you'll need the Management Studio.

I don't think it's just as simple as creating a shortcut link to the management studio EXE file on your server, you're best off installing it properly.|||

installed client components, as per description, client connectivity but there is no management studio only 2 tools: 'Surface Area Configuration' and '...Configueation Manager' - it doesn't realy help!

I'd like to have the management studio on client ... how can I get it?

|||Have a look at the following thread on MSDN's Channel 9. Others were having a similar issue.
http://channel9.msdn.com/ShowPost.aspx?PostID=142941

It appears that you may need to launch it separately from the Tools directory on your installation media.|||the reason: IE6SP1 was absent! after installation I could choose management studio from DVD/TOOLS. Thanks!|||Are the management tools available for Download?|||For the Express edition, you can download it here:
http://msdn.microsoft.com/vstudio/express/sql/download/

If you're using the Standard/Enterprise/Developer edition, it should be on your installation media (DVD > TOOLS directory)

Wednesday, March 21, 2012

'downgrade' to server 2000 from 2005

Hi,

I'm looking into how i can revert back to running my db on sql server 2000, it's currently running on 2005 and having problems. Any help/pointers would be much appreciated

Refer : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=186526&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1273824&SiteID=1

Madhu

|||Cheers for that Madhu

Downgrade SQL Server edition

Hi all,
I was running an MSDN version of SQL 2000 Developer Edition on a server
until I accidentally upgraded it to Enterprise Edition while attempting
to install some Management Tools. Is it possible to downgrade it back
to Dev Edition?

Thanks,
JoshAs far as I know, there's no way to downgrade other than
uninstall/reinstall (after backing up and/or detaching your user
databases, of course).

Simon|||downgrading feature is not available. u have to uninstall and install
afresh

best Regards,
Chandra
http://www.SQLResource.com/
http://chanduas.blogspot.com/
------------

*** Sent via Developersdex http://www.developersdex.com ***|||Thanks to both of you for the information.

Joshsql

Sunday, March 11, 2012

double lines with osql

Does anyone know how to eliminate the double lines that osql puts in your
output?
The help file says: "When running stored procedures, osql prints a blank
line between each set of results in a batch."
This may or may not be my problem. A very simple example:
osql -S[server_name] -U[logon_id] -P[pwd] -d[database] -w100 -otest.txt -Q"s
p_helptext tu_patient_insert" /h-1
The results gives an extra hard return after every line.
Any ideas would be appreciated!
TorryI don't see any way to circumvent it. If this is a single user process, you
could run 2 osql, one to dump the result from the sp into a global temp
table, the other to select from the global temp.
-oj
"Torry Slaton" <tslaton@.tcshealthcare.com> wrote in message
news:MdKdncmHg_DoWJ7fRVn-oQ@.megapath.net...
> Does anyone know how to eliminate the double lines that osql puts in your
> output?
> The help file says: "When running stored procedures, osql prints a blank
> line between each set of results in a batch."
> This may or may not be my problem. A very simple example:
> osql -S[server_name] -U[logon_id] -P[pwd] -d[database] -w100 -otest.txt -Q"s
> p_helptext tu_patient_insert" /h-1
> The results gives an extra hard return after every line.
> Any ideas would be appreciated!
> Torry
>

Friday, March 9, 2012

Don't want to show (0) when running =Sum(iif

The totaling is working fine but I am getting (0) if there is no "First".
How can I substitute the (0) for "".
=Sum(iif(Fields!Shift_Worked.Value="First",1,0))
Thank you for any suggestions offered
FrankI got a similar problem lately. Try using a report function like :
Public Function IsFirst(tehtext as String) as Integer
If((tehtext ="First")
Return 1
Else
Return 0
End If
End Function
Then use it in your expression like this :
=IIf(Sum(Code.IsFirst(Fields!Shift_Worked.Value) > 0),
Sum(Code.IsFirst(Fields!Shift_Worked.Value), "")
I hope that helps...
"Frank" wrote:
> The totaling is working fine but I am getting (0) if there is no "First".
> How can I substitute the (0) for "".
> =Sum(iif(Fields!Shift_Worked.Value="First",1,0))
> Thank you for any suggestions offered
> Frank

Wednesday, March 7, 2012

Don't Run Script If Database Exists

Hi there
I want to add a bit to my SQL script which will check whether the
database exists before running the script. I am aware of the syntax for
checking for the database and dropping the database if necessary, but I
want to keep the database if it exists. The trouble is that because I
need GO statements in the script, I cannot put an IF EXISTS around the
whole thing?
Would anyone be able to help?
Thanks
DaveIf you run the script using ISQL or OSQL, you can issue a RAISERROR with *st
ate* of 127, which will
terminate the script (not only the batch). If you run from somewhere else, y
ou can use the technique
that instpubs.sql does, i.e., issue an error with a high *severity* level so
that *SQL Server*
terminates the connection.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Bungle" <dave@.court-technologies.com> wrote in message
news:1106556674.118686.293460@.f14g2000cwb.googlegroups.com...
> Hi there
> I want to add a bit to my SQL script which will check whether the
> database exists before running the script. I am aware of the syntax for
> checking for the database and dropping the database if necessary, but I
> want to keep the database if it exists. The trouble is that because I
> need GO statements in the script, I cannot put an IF EXISTS around the
> whole thing?
> Would anyone be able to help?
> Thanks
> Dave
>

Don't run report straight away

When accessing a report via a url, is it possible to wait until the user
clicks the 'View Report' button, rather than running the report straight away
with whatever default parameters have been set?
FredNo. If all the parameters have defaults then the report will run. The only
thing you can do is to leave one parameter without a default.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Fred" <Fred@.discussions.microsoft.com> wrote in message
news:1333BECB-C529-4F38-8DF7-AEEBC57842FE@.microsoft.com...
> When accessing a report via a url, is it possible to wait until the user
> clicks the 'View Report' button, rather than running the report straight
away
> with whatever default parameters have been set?
>
> Fred

Don't print anything on screen

Hello, All!
I have read in somewhere that I can disable the print information and error
message on the screen when I am running a script or transact-sql. Sorry, but
I reaaly don't remember if I read it in the Internet or in the SQL SErver
books on-line.
I don't remeber too, if i read it about osql command prompt ou about SQL
Query Analyzer.
Thanks
Juliano Horta
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200601/1You can disable the display of the rowcount via SET NOCOUNT ON.
HTH, Jens Suessmeyer.|||QA: Only option would be to suppress *all* results. You find the option for
that in Tools, Options,
Results tab (Discard results).
OSQL: Use the -m switch. For instance -m25
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Juliano H via droptable.com" <u13014@.uwe> wrote in message news:5accb064068ae@.uwe...[vbcol
=seagreen]
> Hello, All!
> I have read in somewhere that I can disable the print information and erro
r
> message on the screen when I am running a script or transact-sql. Sorry, b
ut
> I reaaly don't remember if I read it in the Internet or in the SQL SErver
> books on-line.
> I don't remeber too, if i read it about osql command prompt ou about SQL
> Query Analyzer.
> Thanks
> Juliano Horta
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200601/1[/vbcol]

Don't print anything on screen

Hello, All!
I have read in somewhere that I can disable the print information and error
message on the screen when I am running a script or transact-sql. Sorry, but
I reaaly don't remember if I read it in the Internet or in the SQL SErver
books on-line.
I don't remeber too, if i read it about osql command prompt ou about SQL
Query Analyzer.
Thanks
Juliano Horta
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200601/1
You can disable the display of the rowcount via SET NOCOUNT ON.
HTH, Jens Suessmeyer.
|||QA: Only option would be to suppress *all* results. You find the option for that in Tools, Options,
Results tab (Discard results).
OSQL: Use the -m switch. For instance -m25
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Juliano H via droptable.com" <u13014@.uwe> wrote in message news:5accb064068ae@.uwe...
> Hello, All!
> I have read in somewhere that I can disable the print information and error
> message on the screen when I am running a script or transact-sql. Sorry, but
> I reaaly don't remember if I read it in the Internet or in the SQL SErver
> books on-line.
> I don't remeber too, if i read it about osql command prompt ou about SQL
> Query Analyzer.
> Thanks
> Juliano Horta
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200601/1

Don't print anything on screen

Hello, All!
I have read in somewhere that I can disable the print information and error
message on the screen when I am running a script or transact-sql. Sorry, but
I reaaly don't remember if I read it in the Internet or in the SQL SErver
books on-line.
I don't remeber too, if i read it about osql command prompt ou about SQL
Query Analyzer.
Thanks
Juliano Horta
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200601/1You can disable the display of the rowcount via SET NOCOUNT ON.
HTH, Jens Suessmeyer.|||QA: Only option would be to suppress *all* results. You find the option for that in Tools, Options,
Results tab (Discard results).
OSQL: Use the -m switch. For instance -m25
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Juliano H via SQLMonster.com" <u13014@.uwe> wrote in message news:5accb064068ae@.uwe...
> Hello, All!
> I have read in somewhere that I can disable the print information and error
> message on the screen when I am running a script or transact-sql. Sorry, but
> I reaaly don't remember if I read it in the Internet or in the SQL SErver
> books on-line.
> I don't remeber too, if i read it about osql command prompt ou about SQL
> Query Analyzer.
> Thanks
> Juliano Horta
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server/200601/1

Sunday, February 26, 2012

DOMAIN\REMOTE_MACHINE_NAME$ account

does anyone know under what circumstances a SQL Server login from
code/services running on a remote server would be attempted using an account
named DOMAIN\REMOTE_MACHINE_NAME$ where REMOTE_MACHINE_NAME is the machine
where the code is running (and of course failing) ...
specifically i am talking about a call to a WebStore web service that then
makes the call to SQL Server, where the service has been configured to use a
specific domain account (that usually is utilized and works)When the code on the remote machine is running under a local security
context (like LocalSystem, Network Service, Local Service etc) would be the
most common scenario.
Cheers
Ken
Blog: www.adopenstatic.com/cs/blogs/ken/
Web: www.adopenstatic.com
"John Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:uKiQujSRFHA.3544@.TK2MSFTNGP12.phx.gbl...
: does anyone know under what circumstances a SQL Server login from
: code/services running on a remote server would be attempted using an
account
: named DOMAIN\REMOTE_MACHINE_NAME$ where REMOTE_MACHINE_NAME is the machine
: where the code is running (and of course failing) ...
:
: specifically i am talking about a call to a WebStore web service that then
: makes the call to SQL Server, where the service has been configured to use
a
: specific domain account (that usually is utilized and works)
:
:

Domain user can't hit SQL Server

Hello,
I have a user on Windows 2000 running an application written in VB.net
that uses a config file with a connection string to hit a SQL 2000 DB
running on a Windows 2000 Server box. The connection string looks
something like this:
Provider=SQLOLEDB;Server=MyServer;Databa
se=MYDB;Persist Security
Info=False;User Id=shipio;
When the user tries to perform a task that requires a DB connection, a
message pops up saying that Domain\UserAccount does not have permissions
to access the SQL server. However, there is a sql server username and
password in the connection string. Why doesn't it user it?
The application works fine when it's installed on Win XP PCs, but it
doesn't work on a win 2000 PC. Does Win2000 have a different need for
connection strings? Or does it by default send the domain account to
the sql server?
Any thoughts are greatly appreciated.
Thanks
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!Connection strings that pass a username are for Standard SQL
Authentication. Not Windows Authentication.
Check the Authentication Mode of SQL. It appears to be set to Windows Auth
only. I you intend on using Standard SQL Security, then your
Server settings for SQL need to be changed to allow both.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||This is actually only a problem on the Windows 2000 pc. The sql server
is set up for windows and sql server authentication. We have 20 other
users on Windows XP where this works fine. It's just the 2000 box that
gets the error.
Does the connection string maybe need some additional properties for it
to work on 2000?
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!|||Try connecting from the Windows 2000 client using Query Analyser or OSQL
with a Trusted Connection.
OSQL -SserverNameHere -E -Q"Select @.@.version"
Do you receive the same error?
Try using Standard Security.
OSQL -SserverNameHere -Uuserid -Ppassword -Q"Select @.@.version"
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Friday, February 24, 2012

Domain Rename - effect on SQL

Hi everyone,
I'm planning an Active Directory Domain Rename shortly - however we have a
number of SQL Servers (2000) on the domain running integrated security.
If I rename the domain, will it cause a problem with Intrgrated security or
not? (the domain is technically the same, but a different name - e.g. users
SID's should be the same I think...!)
Cheers,
SteveHi Steve
I believe that you are correct, as the SIDS are not changing you should be
OK, but just in case you may want to run the script on
http://support.microsoft.com/kb/246133/
John
"SteveHoot" wrote:

> Hi everyone,
> I'm planning an Active Directory Domain Rename shortly - however we have a
> number of SQL Servers (2000) on the domain running integrated security.
> If I rename the domain, will it cause a problem with Intrgrated security o
r
> not? (the domain is technically the same, but a different name - e.g. user
s
> SID's should be the same I think...!)
> Cheers,
>
> Steve|||Thanks for that John - we're a development company, so if things do go
wrong then I'm for the chop. Guess the best thing to do is fire up a test
forest, domain and SQL server and give the rename a go there...!
Anyone got experience in this please let me know!
Thanks again for the help John - appreciated.
Steve.
examnotes <jbellnewsposts@.hotmail.com> wrote in
news:7B62A81D-748F-438F-B00C-B715F0D43F9D@.microsoft.com:
[vbcol=seagreen]
> Hi Steve
> I believe that you are correct, as the SIDS are not changing you
> should be OK, but just in case you may want to run the script on
> http://support.microsoft.com/kb/246133/
> John
> "SteveHoot" wrote:
>|||Hi Steve
I have done migrations but not a rename, if you rename the actual
machine then you will need to drop the server as in
http://msdn.microsoft.com/library/d...nstall_5r8f.asp
Plan your migration and make sure that you have contingencies for
failure at each step, backup the databases, script the jobs, users
etc..
Having a test domain is a very good idea.
John
Steve Hewitt wrote:[vbcol=seagreen]
> Thanks for that John - we're a development company, so if things do go
> wrong then I'm for the chop. Guess the best thing to do is fire up a test
> forest, domain and SQL server and give the rename a go there...!
> Anyone got experience in this please let me know!
> Thanks again for the help John - appreciated.
>
> Steve.
>
> examnotes <jbellnewsposts@.hotmail.com> wrote in
> news:7B62A81D-748F-438F-B00C-B715F0D43F9D@.microsoft.com:
>