Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Friday, March 30, 2012

No Item showed

Hi gurus

I have sql server 2000 that was working fine until today(figures), today I opened EM and under sql server group where used to be all my information now there is NO ITEM, nothing shows(database,Nothing) The server is working as I had no complaints from my user on data not been saved or getting data from but its strange that I can not see all my info like I used to.- If I go into sql query analizer, it ask me to connect to local which I do and I can see all my databases from there but once I close that window ,on my EM nothing shows.

I checked all services andevery one of them seems to be up and runnig

Thanks forall the help I can get

Hello,

Sounds like you just need to re-register your server(s).

On the top-level group (sounds like the only group in your case) called "Microsoft SQL Server" right-click and select "New SQL Server Group" Call the group whatever you want. Then, on the newly created group, right-click again and select "New SQL Server Registration". Then enter your server and authentication details. Once done, you'll then be able to expand the server and see all the objects etc.

Cheers,
Rob

|||

R

Thanks for the prompt reply.- I have tried to do that but I get the message the sql group already exist, what I did to resolve the problem was restart the sql service and everything came up, I dont know if it was the right thing to do but it helped

Thank a bunch for the reply.-

No Item showed

Hi gurus

I have sql server 2000 that was working fine until today(figures), today I opened EM and under sql server group where used to be all my information now there is NO ITEM, nothing shows(database,Nothing) The server is working as I had no complaints from my user on data not been saved or getting data from but its strange that I can not see all my info like I used to.- If I go into sql query analizer, it ask me to connect to local which I do and I can see all my databases from there but once I close that window ,on my EM nothing shows.

I checked all services andevery one of them seems to be up and runnig

Thanks forall the help I can get

Hello,

Sounds like you just need to re-register your server(s).

On the top-level group (sounds like the only group in your case) called "Microsoft SQL Server" right-click and select "New SQL Server Group" Call the group whatever you want. Then, on the newly created group, right-click again and select "New SQL Server Registration". Then enter your server and authentication details. Once done, you'll then be able to expand the server and see all the objects etc.

Cheers,
Rob

|||

R

Thanks for the prompt reply.- I have tried to do that but I get the message the sql group already exist, what I did to resolve the problem was restart the sql service and everything came up, I dont know if it was the right thing to do but it helped

Thank a bunch for the reply.-

Wednesday, March 28, 2012

No instance of SQL Server under MSDE installation

Hi all,
after successfully completing the installation of a
downloaded copy of MSDE for VS.Net things are
not working at all.
I was having trouble with my VS.Net installation so I
uninstalled VS.Net and MSDE.
I have installed MSDE several times today and each
time I can not see the instance name of the installation.
I have removed any existing directories, cleared the
obvious things from the registry, changed the instance
name and even chosen different target and data
directories to try and solve the problem. The service
seems to have started correctly, but I do not get
a green play icon in the system tray at the bottom of
the screen. When i open the server manager I
can not see the server running at all.
I do not know what to do next. Does anyone have any
ideas as to what what be causing this problem?
Many thanks for your assistance in helping me to
solve this problem.
Regards,
Jason.
Please ignore this post. I was just to impatient to wait
for all the services, etc to start.
All appears to be OK now.
Thanks.
On Thu, 29 Apr 2004 18:40:13 +0100, JJ <jason@.nospam.divemaster.org>
wrote:

>Hi all,
>after successfully completing the installation of a
>downloaded copy of MSDE for VS.Net things are
>not working at all.
>I was having trouble with my VS.Net installation so I
>uninstalled VS.Net and MSDE.
>I have installed MSDE several times today and each
>time I can not see the instance name of the installation.
>I have removed any existing directories, cleared the
>obvious things from the registry, changed the instance
>name and even chosen different target and data
>directories to try and solve the problem. The service
>seems to have started correctly, but I do not get
>a green play icon in the system tray at the bottom of
>the screen. When i open the server manager I
>can not see the server running at all.
>I do not know what to do next. Does anyone have any
>ideas as to what what be causing this problem?
>Many thanks for your assistance in helping me to
>solve this problem.
>Regards,
>Jason.

Monday, March 26, 2012

No Data-Driven Subscription button

I have created a report and published it on the reporting server. My connection is working, and I have followed the steps in the BOL tutorial for "Defining a Data-Driven Subscription" i.e. Credentials stored securely on report server, using windows credentials when connecting to the data source. When I click on "Subscriptions", I only see "New Subscriptions". However, when I look at other reports (not even created by me), I see the option to create data driven subscriptions. Can somebody tell me what I need to do to see this?I got it; the report cannot be in the "My Reports" folder.

Tuesday, March 20, 2012

no .trn files

I have two sql servers, one is replicating to the other using log shipping.
The backup directory got deleted.
Now replication says it is working, but I don't know how because the .trn
files are not being generated.
What do I have to do to get that started again?
Scott EmickScott,
Repliction is not the same as log shipping. If you are replicating, the
process can continue without transaction logs, but your publisher db will
increase in size if it is not in SIMPLE recovery model and you are not
taking transaction log backups.
Hope this helps,
Ron
--
Ron Talmage
SQL Server MVP
"Scott Emick" <semick@.ham.phoenix-sys.com> wrote in message
news:OolQXwu$DHA.1212@.TK2MSFTNGP12.phx.gbl...
> I have two sql servers, one is replicating to the other using log
shipping.
> The backup directory got deleted.
> Now replication says it is working, but I don't know how because the .trn
> files are not being generated.
> What do I have to do to get that started again?
> Scott Emick
>|||I did flip all the db's from FULL to simple, and back again, but I
still get no .trn files. I was trying to read about backups and maint
plans yesterday, but I haven't gotten anywhere yet. Yes, the
replication is still working, and I am glad of that, but I would like
to get things back to the way they were.
Scott
"Ron Talmage" <rtalmage@.prospice.com> wrote in message news:<#qyZTf1$DHA.1844@.TK2MSFTNGP11.
phx.gbl>...
> Scott,
> Repliction is not the same as log shipping. If you are replicating, the
> process can continue without transaction logs, but your publisher db will
> increase in size if it is not in SIMPLE recovery model and you are not
> taking transaction log backups.
> Hope this helps,
> Ron
> --
> Ron Talmage
> SQL Server MVP
> "Scott Emick" <semick@.ham.phoenix-sys.com> wrote in message
> news:OolQXwu$DHA.1212@.TK2MSFTNGP12.phx.gbl...
> shipping.|||Also, restarted sql server agent and the maint plans...Apparently one was
hung and I did not know it...
Scott
"Scott Emick" <semick@.msn.com> wrote in message
news:a2794831.0403020315.1c3ad442@.posting.google.com...
> I did flip all the db's from FULL to simple, and back again, but I
> still get no .trn files. I was trying to read about backups and maint
> plans yesterday, but I haven't gotten anywhere yet. Yes, the
> replication is still working, and I am glad of that, but I would like
> to get things back to the way they were.
> Scott
> "Ron Talmage" <rtalmage@.prospice.com> wrote in message
news:<#qyZTf1$DHA.1844@.TK2MSFTNGP11.phx.gbl>...
will

no .trn files

I have two sql servers, one is replicating to the other using log shipping.
The backup directory got deleted.
Now replication says it is working, but I don't know how because the .trn
files are not being generated.
What do I have to do to get that started again?
Scott EmickScott,
Repliction is not the same as log shipping. If you are replicating, the
process can continue without transaction logs, but your publisher db will
increase in size if it is not in SIMPLE recovery model and you are not
taking transaction log backups.
Hope this helps,
Ron
--
Ron Talmage
SQL Server MVP
"Scott Emick" <semick@.ham.phoenix-sys.com> wrote in message
news:OolQXwu$DHA.1212@.TK2MSFTNGP12.phx.gbl...
> I have two sql servers, one is replicating to the other using log
shipping.
> The backup directory got deleted.
> Now replication says it is working, but I don't know how because the .trn
> files are not being generated.
> What do I have to do to get that started again?
> Scott Emick
>|||I did flip all the db's from FULL to simple, and back again, but I
still get no .trn files. I was trying to read about backups and maint
plans yesterday, but I haven't gotten anywhere yet. Yes, the
replication is still working, and I am glad of that, but I would like
to get things back to the way they were.
Scott
"Ron Talmage" <rtalmage@.prospice.com> wrote in message news:<#qyZTf1$DHA.1844@.TK2MSFTNGP11.phx.gbl>...
> Scott,
> Repliction is not the same as log shipping. If you are replicating, the
> process can continue without transaction logs, but your publisher db will
> increase in size if it is not in SIMPLE recovery model and you are not
> taking transaction log backups.
> Hope this helps,
> Ron
> --
> Ron Talmage
> SQL Server MVP
> "Scott Emick" <semick@.ham.phoenix-sys.com> wrote in message
> news:OolQXwu$DHA.1212@.TK2MSFTNGP12.phx.gbl...
> > I have two sql servers, one is replicating to the other using log
> shipping.
> >
> > The backup directory got deleted.
> >
> > Now replication says it is working, but I don't know how because the .trn
> > files are not being generated.
> >
> > What do I have to do to get that started again?
> >
> > Scott Emick
> >
> >|||Also, restarted sql server agent and the maint plans...Apparently one was
hung and I did not know it...
Scott
"Scott Emick" <semick@.msn.com> wrote in message
news:a2794831.0403020315.1c3ad442@.posting.google.com...
> I did flip all the db's from FULL to simple, and back again, but I
> still get no .trn files. I was trying to read about backups and maint
> plans yesterday, but I haven't gotten anywhere yet. Yes, the
> replication is still working, and I am glad of that, but I would like
> to get things back to the way they were.
> Scott
> "Ron Talmage" <rtalmage@.prospice.com> wrote in message
news:<#qyZTf1$DHA.1844@.TK2MSFTNGP11.phx.gbl>...
> > Scott,
> >
> > Repliction is not the same as log shipping. If you are replicating, the
> > process can continue without transaction logs, but your publisher db
will
> > increase in size if it is not in SIMPLE recovery model and you are not
> > taking transaction log backups.

Wednesday, March 7, 2012

Newly created witness server only connects to one of the partners?

We've been running a mirrored database (using certificates since we don't have a domain) and it's all working well. Last week we decided to add a witness for automatic failovers, but for some reason I just can not get the witness to connect to the Partner2 server.

See screenshot here

Please help me troubleshoot this - I re-created the endpoints / users / certificates but it's still not working. Where can I get more information on what exactly the problem is? Can I test the endpoints somehow?

Hello. I started from scratch on a test environment and I get the exact same problem. On the mirror I get that Witness Connection status as Disconnected.

I don't use certificates and also no encrypton as in this tutorial: http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

The direct result is that automatic failover does not work.

Some help will be great!

|||

I have the exact problem. I don't use certificates and encryption is off as suggested in this article: http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

I get status disconnected and the automatic failover does not work.

|||

I have the exact problem. I don't use certificates and encryption is off as suggested in this article: http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

I get status disconnected and the automatic failover does not work.

|||

I managed to make it work, but my solution is really convoluted and made me feel really uneasy:

- Setup a HOSTS file entry on Partner1 and Partner2 to point the witness IP address to the name WITNESS:

10.1.0.123 WITNESS

- Add the witness to the DB using the HOSTS entry (in TSQL)

alter database MyDatabase set witness = 'tcp://WITNESS:5022'

- Check mirroring monitor. Monitor confirms that the winess is only connected to Partner1

- Change the HOSTS entry on Partner1 to the wrong IP address for WITNESS:

0.0.0.0 WITNESS

- Restart the SQL Service on the Witness server. After the restart, mirroring monitor shows that the witness is now connected to Partner2, and not to Partner1

- Fix the HOSTS entry on Partner1 to the correct IP address again

- Wait 10 mins

- Check mirroring monitor - it now shows the witness connected to both servers! (if it's still not connected to Partner1, restart the witness again)

What? This makes no sense, but it worked for me.

|||

You know what. I followed your instructions step by step and indeed it works. But this is not a way I declare myself satisfied either...

It makes no sense... I wonder how anyone was able to make this work as it seems that this is a clear bug.

|||If someone wants the step by step to reproduce this I can tell it. It's a fairly basic process, following the instructions and still it doesn't work...|||

Anyway just to let you know I downloaded from Microsoft their SQL2005 in VHD (virtual hard drive) format and ran it under virtual server. And I tried step by step and it's giving the exact problem... there is something wrong there for sure.

No one willing to comment on this so far?

|||

I found that simply restarting SQL Server on the witness server solves this issue.

-dta

|||how exactlly do you do that? add entry to the hosts file? be exact please, i'm new and not very good with t-sql

Newly created witness server only connects to one of the partners?

We've been running a mirrored database (using certificates since we don't have a domain) and it's all working well. Last week we decided to add a witness for automatic failovers, but for some reason I just can not get the witness to connect to the Partner2 server.

See screenshot here

Please help me troubleshoot this - I re-created the endpoints / users / certificates but it's still not working. Where can I get more information on what exactly the problem is? Can I test the endpoints somehow?

Hello. I started from scratch on a test environment and I get the exact same problem. On the mirror I get that Witness Connection status as Disconnected.

I don't use certificates and also no encrypton as in this tutorial: http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

The direct result is that automatic failover does not work.

Some help will be great!

|||

I have the exact problem. I don't use certificates and encryption is off as suggested in this article: http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

I get status disconnected and the automatic failover does not work.

|||

I have the exact problem. I don't use certificates and encryption is off as suggested in this article: http://wiki.cdyne.com/index.php/Mirroring_SQL_Server_2005

I get status disconnected and the automatic failover does not work.

|||

I managed to make it work, but my solution is really convoluted and made me feel really uneasy:

- Setup a HOSTS file entry on Partner1 and Partner2 to point the witness IP address to the name WITNESS:

10.1.0.123 WITNESS

- Add the witness to the DB using the HOSTS entry (in TSQL)

alter database MyDatabase set witness = 'tcp://WITNESS:5022'

- Check mirroring monitor. Monitor confirms that the winess is only connected to Partner1

- Change the HOSTS entry on Partner1 to the wrong IP address for WITNESS:

0.0.0.0 WITNESS

- Restart the SQL Service on the Witness server. After the restart, mirroring monitor shows that the witness is now connected to Partner2, and not to Partner1

- Fix the HOSTS entry on Partner1 to the correct IP address again

- Wait 10 mins

- Check mirroring monitor - it now shows the witness connected to both servers! (if it's still not connected to Partner1, restart the witness again)

What? This makes no sense, but it worked for me.

|||

You know what. I followed your instructions step by step and indeed it works. But this is not a way I declare myself satisfied either...

It makes no sense... I wonder how anyone was able to make this work as it seems that this is a clear bug.

|||If someone wants the step by step to reproduce this I can tell it. It's a fairly basic process, following the instructions and still it doesn't work...|||

Anyway just to let you know I downloaded from Microsoft their SQL2005 in VHD (virtual hard drive) format and ran it under virtual server. And I tried step by step and it's giving the exact problem... there is something wrong there for sure.

No one willing to comment on this so far?

|||

I found that simply restarting SQL Server on the witness server solves this issue.

-dta

|||how exactlly do you do that? add entry to the hosts file? be exact please, i'm new and not very good with t-sql

Newby: Administer a database remotely?

I'm working on a website remotely through a VPN and my client uses SQL
Server. There's a requirement for a database and my client uses SQL
Server 2000.

Is it possible to administer this database remotely, just like I do
with MySQL/PHP MyAdmin?

Please elaborate.

Thanks,

Marjorie"marjorie" <marjorie@.popkit.com> wrote in message
news:71f66b4d.0407271230.4c220eb1@.posting.google.c om...
> I'm working on a website remotely through a VPN and my client uses SQL
> Server. There's a requirement for a database and my client uses SQL
> Server 2000.
> Is it possible to administer this database remotely, just like I do
> with MySQL/PHP MyAdmin?
> Please elaborate.
> Thanks,
> Marjorie

I don't know how much administration you need, but if you're developing a
website and need to create / modify a database for it, you can install the
SQL Server client and use the osql command-line utility:

e.g.
c:\> osql -S<server address> -U<user name> -P<password
So I use
osql -Ssqlserver -Usa -Pmypassword.

The flags are case sensitive.
I don't know if this makes sense in the context of virtual private networks
though, as I've never played about with them...

Rowland.|||marjorie@.popkit.com (marjorie) wrote in message news:<71f66b4d.0407271230.4c220eb1@.posting.google.com>...
> I'm working on a website remotely through a VPN and my client uses SQL
> Server. There's a requirement for a database and my client uses SQL
> Server 2000.
> Is it possible to administer this database remotely, just like I do
> with MySQL/PHP MyAdmin?
> Please elaborate.
> Thanks,
> Marjorie

Yes, just install the client tools on your workstation, and make sure
the VPN is configured to allow you to connect to the server. This
article may help:

http://support.microsoft.com/defaul...2&Product=sql2k

Simon

Newbie?: Can This Be Done?- If so please direct

Hello NG
I have been working with Access for a Long Time - Am just now starting
to get my feet wet with SQL Server 2000 - We have a production database that
we have moved the tables to SQLServer and I have been creating stored
procedures to replicate some of the processes done on the access side - the
server does process extremely faster than access - Here is my problem I am
currently pulling info from SQL SERVER to Access once a w for wly
stats I want to create a stored procedure to process the wly stats and
push them to an access table upon request - we have multiple warehouses and
i would like to have the process coded once in sql and dump to the access
table based off a warehouse variable passed to the stored procedure - Can
SQLServer from a stored procedure export a recordset into a varible defined
Access Table?
TIAFAH
RandyIt sounds like DTS is what you're looking for. I don't know that I
would recommend this approach to an experienced SQL Server developer
because of its limitations, but in what you're asking for, it seems
ideal. Open Enterprise Manager, right-click your database, select
"Export Data" (it might be under a submenu), follow the wizard. I'm
pretty sure you can specify a stored procedure for the source. If I
remember correctly, you may also schedule the package to run at
intervals.
-Alan
Randy wrote:
> Hello NG
> I have been working with Access for a Long Time - Am just now starting
> to get my feet wet with SQL Server 2000 - We have a production database th
at
> we have moved the tables to SQLServer and I have been creating stored
> procedures to replicate some of the processes done on the access side - th
e
> server does process extremely faster than access - Here is my problem I am
> currently pulling info from SQL SERVER to Access once a w for wly
> stats I want to create a stored procedure to process the wly stats and
> push them to an access table upon request - we have multiple warehouses an
d
> i would like to have the process coded once in sql and dump to the access
> table based off a warehouse variable passed to the stored procedure - Can
> SQLServer from a stored procedure export a recordset into a varible define
d
> Access Table?
> TIAFAH
> Randy

Saturday, February 25, 2012

Newbie: working with expressions on tables

I was reading the help, but I don't know if this is possible.
Dataset
first | last | Id
a | b | 1
c | d | 2
e | f | 3
For 1 cell I want to put:
Fields!ID.Value where Fields!First.Value="c" and Fields!Last.Value="d"
I just want to put specific fields in different spots. I didn't see this in
the help and looked around a bit. Is there a section in the help that
covers expressions like this?I think you want this:
=iif(Trim(Fields!First.Value) = "c" AND Trim(Fields!Last.Value) = "d",
Fields!ID.Value, Nothing)
Details on the IIF function are available on MSDN:
http://msdn.microsoft.com/library/en-us/vblr7/html/vafctiif.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Cindy Lee" <dangreece@.hotmail.com> wrote in message
news:eBnL6uYVEHA.1928@.TK2MSFTNGP11.phx.gbl...
> I was reading the help, but I don't know if this is possible.
> Dataset
> first | last | Id
> a | b | 1
> c | d | 2
> e | f | 3
>
> For 1 cell I want to put:
> Fields!ID.Value where Fields!First.Value="c" and Fields!Last.Value="d"
> I just want to put specific fields in different spots. I didn't see this
in
> the help and looked around a bit. Is there a section in the help that
> covers expressions like this?
>|||That works, but it only takes the 1st value. It doesn't loop through all
the rows if I do it cell by cell.
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:u4AUaamVEHA.2716@.tk2msftngp13.phx.gbl...
> I think you want this:
> =iif(Trim(Fields!First.Value) = "c" AND Trim(Fields!Last.Value) = "d",
> Fields!ID.Value, Nothing)
> Details on the IIF function are available on MSDN:
> http://msdn.microsoft.com/library/en-us/vblr7/html/vafctiif.asp
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Cindy Lee" <dangreece@.hotmail.com> wrote in message
> news:eBnL6uYVEHA.1928@.TK2MSFTNGP11.phx.gbl...
> > I was reading the help, but I don't know if this is possible.
> >
> > Dataset
> >
> > first | last | Id
> > a | b | 1
> > c | d | 2
> > e | f | 3
> >
> >
> > For 1 cell I want to put:
> > Fields!ID.Value where Fields!First.Value="c" and Fields!Last.Value="d"
> >
> > I just want to put specific fields in different spots. I didn't see
this
> in
> > the help and looked around a bit. Is there a section in the help that
> > covers expressions like this?
> >
> >
>

Newbie: which replication strategy should I use?

Hi all Smile
My company is going to open new working centers on different locations of my region. One of the problems we are suffering is that at some locations, the network communications infrastructure is very very very poor. So, in that locations we work with low bandwidths, and connections usually break down.

Because of this, we are thinking in distributing our database. I have been doing some tests on replication, reading the docs, etc... But I am still not sure which replication strategy should we use, and how to organize our database tables to allow replication work properly.

Our offices are going to share some data (a product catalogue, for example) which could be updated an queried from any of the offices. But there is also data which is not going to be shared, as product stocks for each location.

We were thinking on using transactional peer-to-peer replication. But now we are having serious doubts about this since in a previous post (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1525643&SiteID=1) we were told we can't store non-shared data (stock) in the same table as the shared data (products) due to how database behaves when a publication is restarted. We know it would not be usual to republish, but we were thinking on crash recovery.

It would be fantastic if somebody could help us to decide what should we do to organize our database to allow the use of a proper replication scheme.

Thanks in advance,

Rubn D. M.

Considering your low bandwidths, have you looked at merge replication? It works best in a disconnected environment and over unreliable links as it has retry capabilities built in. you can also run agents at scheduled intervals. This would work provide you don't have low-latency requirement.

As far as your scenario goes where you want to replicate a table but not track changes in certain columns at both ends, this really won't work. In its simplest form you can do vertical partitioning at the publisher side, but that means any columns you choose to not replicate will not exist at the subscriber.

|||Hi Greg,
thank you very much for your help.

I thought transactional replication has also retry capabilities... So, what happens in a "transactional replication environment with updatable queued subscriptions" if the connection between publisher and subscriber is lost? Would it be needed to "restart" the subscription, or it will continue working correctly when connection is stablished again?

Thanks again ;-)

Regards

|||It does, but it's not as robust as merge replication, which is designed for the scenario you described.

newbie: value expression... uses an aggregate expression w/o a sco

simply added a report parameter for a working report (which went fine and w/o
issue..)
next thing, went to build the report in VS.NET and got 100 Build Errors
telling me that every TextBox on my summary page has the error:
'The value expression for the textbox '...' uses an aggregate expression
with a scope...'
Newbie (I know), but what on earth did I do that would have screwed up
everything like this?
( Scope for what? The report and parameters already have everything they
need as far as data goes.)
Rob(this is a frickin nightmare...)
So it looks like every time I try to add a new report parameter, after
deleting the original (simply the report parameter became a different report
item), about half of the textboxes which are sums and counts threw this error
(which is nutty as heck, since about 2/3, which have the same thing are OK).
Is this some kind of bug? (Deleted all Report Parameters and I can compile
w/o errors.)
What's going on with this and what does it take to 'set the scope'.
Rob
"RobKaratzas" wrote:
> simply added a report parameter for a working report (which went fine and w/o
> issue..)
> next thing, went to build the report in VS.NET and got 100 Build Errors
> telling me that every TextBox on my summary page has the error:
> 'The value expression for the textbox '...' uses an aggregate expression
> with a scope...'
> Newbie (I know), but what on earth did I do that would have screwed up
> everything like this?
> ( Scope for what? The report and parameters already have everything they
> need as far as data goes.)
> Rob
>

Monday, February 20, 2012

NEWBIE: Not an Updatable Query

Hello NG,
SQLServer 2000
Background:
I have been working with an Access2K FE with Access2K BE Tables - I have
just moved all the BE tables to the SQLServer database - I have set up full
permissions to Add,Delete,Modify and Read all the records in all the tables.
All of my code is in the FE database.
2 Questions
1. I try to run the following query:
db.Execute ("UPDATE [Stats Daily Table - Temp] INNER JOIN [Production] ON
([Stats Daily Table - Temp].[Employee Number] = [Production].[Employee
Number]) AND ([Stats Daily Table - Temp].[Daily Date] = [Production].[Stats
Date]) " & _
"SET [Stats Daily Table - Temp].[LB Pulling Orders] = [Stats
Daily Table - Temp]![LB Pulling Orders] + ([Production]![Orders] +
[Production]![WPL Orders]), [Stats Daily Table - Temp].[LB Pulling Lines] =
[Stats Daily Table - Temp]![LB Pulling Lines] + ([Production]![Lines] +
[Production]![WPL Lines]) " & _
"WHERE (([Production].[Department Number]=1) AND
([Production].[Area Number]=102) AND (([Production].[Portion]='LL Lower
Portion') Or ([Production].[Portion]='LU Upper Portion') Or
([Production].[Portion]='LE Leather Portion') Or ([Production].[Portion]='LC
Closeout Portion')));")
It gives me an error that this is not an Updatable Query - It did work
Access to Access.
How can I make this query work - do I have to put the query into the
SQLServer database as a function I need to call for? Do I just need to have
it worded differently for the BE to understand.
2. If this needs to be in the BE - How do I call the query from the FE?
Please Help - I am trying to upgrade to SQLServer - I See its benefits - but
if I cannot understand how to use it I guess I'll be stuck with Access2K's
limitations.
TIAFAH
RandyFor one thing get rid of those !'s in your query between the table and
column names. Try running the query in QA (you can copy n paste it from
here):
UPDATE [Stats Daily Table - Temp]
INNER JOIN [Production]
ON ([Stats Daily Table - Temp].[Employee Number] = [Production].[Employee
Number])
AND ([Stats Daily Table - Temp].[Daily Date] = [Production].[Stats Date])
SET [Stats Daily Table - Temp].[LB Pulling Orders] = [Stats Daily Table -
Temp].[LB Pulling Orders] + ([Production].[Orders] + [Production].[WPL
Orders]),
[Stats Daily Table - Temp].[LB Pulling Lines] = [Stats Daily Table -
Temp].[LB Pulling Lines] + ([Production].[Lines] + [Production].[WPL Lines])
WHERE (([Production].[Department Number]=1)
AND ([Production].[Area Number]=102)
AND (([Production].[Portion]='LL Lower Portion')
OR ([Production].[Portion]='LU Upper Portion')
OR ([Production].[Portion]='LE Leather Portion')
OR ([Production].[Portion]='LC Closeout Portion')));
Also, are you running this using ASP.NET as a front end?
Thanks
"Randy Fritz" <Randyfritz@.sbcglobal.net> wrote in message
news:eD0BclsRFHA.3716@.TK2MSFTNGP14.phx.gbl...
> Hello NG,
> SQLServer 2000
> Background:
> I have been working with an Access2K FE with Access2K BE Tables - I
> have
> just moved all the BE tables to the SQLServer database - I have set up
> full
> permissions to Add,Delete,Modify and Read all the records in all the
> tables.
> All of my code is in the FE database.
> 2 Questions
> 1. I try to run the following query:
> db.Execute ("UPDATE [Stats Daily Table - Temp] INNER JOIN [Production] ON
> ([Stats Daily Table - Temp].[Employee Number] = [Production].[Employee
> Number]) AND ([Stats Daily Table - Temp].[Daily Date] =
> [Production].[Stats
> Date]) " & _
> "SET [Stats Daily Table - Temp].[LB Pulling Orders] = [Stats
> Daily Table - Temp]![LB Pulling Orders] + ([Production]![Orders] +
> [Production]![WPL Orders]), [Stats Daily Table - Temp].[LB Pulling Lines]
> =
> [Stats Daily Table - Temp]![LB Pulling Lines] + ([Production]![Lines] +
> [Production]![WPL Lines]) " & _
> "WHERE (([Production].[Department Number]=1) AND
> ([Production].[Area Number]=102) AND (([Production].[Portion]='LL Lower
> Portion') Or ([Production].[Portion]='LU Upper Portion') Or
> ([Production].[Portion]='LE Leather Portion') Or
> ([Production].[Portion]='LC
> Closeout Portion')));")
> It gives me an error that this is not an Updatable Query - It did work
> Access to Access.
> How can I make this query work - do I have to put the query into the
> SQLServer database as a function I need to call for? Do I just need to
> have
> it worded differently for the BE to understand.
> 2. If this needs to be in the BE - How do I call the query from the FE?
> Please Help - I am trying to upgrade to SQLServer - I See its benefits -
> but
> if I cannot understand how to use it I guess I'll be stuck with Access2K's
> limitations.
> TIAFAH
> Randy
>|||You might want to learn standard SQL syntax and good programming
practices. Never embed blanks in a data element name unless you want to
destroy portability. If you must use reserved words for a data element
name because you do not know ISO-11179 rules then at least do not use
square brackets. I think this is what you were trying to do:
UPDATE DailyStats
SET lb_pull_orders
= DailyStats.lb_pull_orders
+ (SELECT P1.orders + P1.wpl_orders
FROM Production AS P1
WHERE P1.dept_nbr = 1
AND P1.area_nbr = 102
AND DailyStats.emp_nbr = P1.emp_nbr
AND DailyStats.daily_date = P1.stat_date
AND P1.Portion
IN (LL Lower Portion', 'LU Upper Portion',
'LE Leather Portion''LC Closeout Portion'));|||The typo in the IN predicate notwithstanding, Joe is right about your table
naming convention. But you'll get used to that, Joe is always right :)
Even if porting your Database over to another DBMS isn't a priority, those
extra spaces and hyphens in the names could cause you problems down the road
when you try to access the database via other tools and methods. Consider
using underscore characters instead of spaces in identifiers, or just
eliminate spaces altogether and go with the AlternateCAPSLook, which happens
to be "in" this season thanks to a new reality TV show :)
Here's your IN Clause with the correct number of commas and single quotes:
IN ('LL Lower Portion', 'LU Upper Portion',
'LE Leather Portion','LC Closeout Portion'));
"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1114129809.103356.5010@.l41g2000cwc.googlegroups.com...
> You might want to learn standard SQL syntax and good programming
> practices. Never embed blanks in a data element name unless you want to
> destroy portability. If you must use reserved words for a data element
> name because you do not know ISO-11179 rules then at least do not use
> square brackets. I think this is what you were trying to do:
>
> UPDATE DailyStats
> SET lb_pull_orders
> = DailyStats.lb_pull_orders
> + (SELECT P1.orders + P1.wpl_orders
> FROM Production AS P1
> WHERE P1.dept_nbr = 1
> AND P1.area_nbr = 102
> AND DailyStats.emp_nbr = P1.emp_nbr
> AND DailyStats.daily_date = P1.stat_date
> AND P1.Portion
> IN (LL Lower Portion', 'LU Upper Portion',
> 'LE Leather Portion''LC Closeout Portion'));
>|||Hi Randy,
When moving over to SQL a load of those update/select queries stop
becomming updatable, the most probable reason is the joins, see if you
can send updates to single tables first. I totally agree with the other
guys, NEVER use blanks in table names/field names use the _ instead for
readablity. Take the time to rename your tables and fields as this will
make your coding easer and more readable.
Good luck
Regards
Alex|||TY Everyone involved,
I Still Have my same problem- First I will work on transferring
everything over to the naming conventions you guys have suggested - I more
than likely will use the underscores in place of spaces as sometimes when
things go wrong others are in here that just do not understand so my naming
of the tables and fields where to make it as simple to understand as
possible for those who do not know how to read code normally.
Second - your queries I am assuming are to be set in the user defined
functions of SQLServer - We use an Access2K FE - How do I call this function
from the front end - The front end is where I have run all of my queries and
the query I gave and the ones you have given still give me the error. what
do I have to do to run the query from an Access FE?.
Again
TIAFAH
Randy
"Michael C#" <xyz@.abcdef.com> wrote in message
news:e4_9e.134$eR1.12@.fe12.lga...
> The typo in the IN predicate notwithstanding, Joe is right about your
table
> naming convention. But you'll get used to that, Joe is always right :)
> Even if porting your Database over to another DBMS isn't a priority, those
> extra spaces and hyphens in the names could cause you problems down the
road
> when you try to access the database via other tools and methods. Consider
> using underscore characters instead of spaces in identifiers, or just
> eliminate spaces altogether and go with the AlternateCAPSLook, which
happens
> to be "in" this season thanks to a new reality TV show :)
> Here's your IN Clause with the correct number of commas and single quotes:
> IN ('LL Lower Portion', 'LU Upper Portion',
> 'LE Leather Portion','LC Closeout Portion'));
> "--CELKO--" <jcelko212@.earthlink.net> wrote in message
> news:1114129809.103356.5010@.l41g2000cwc.googlegroups.com...
>|||Try pass-thru queries. Tends to be more efficient than relying on Jet as
well. And as far as naming, name your tables for *your* ease of use, not
ours :) The main point about removing spaces is that not all tools deal
equally well with spaces in identifier names, and it could cause you
problems down the road. If you're willing to take that chance though, no
one can force you to rename anything.
"Randy Fritz" <Randyfritz@.sbcglobal.net> wrote in message
news:uSL0Bm1RFHA.1096@.tk2msftngp13.phx.gbl...
> TY Everyone involved,
> I Still Have my same problem- First I will work on transferring
> everything over to the naming conventions you guys have suggested - I more
> than likely will use the underscores in place of spaces as sometimes when
> things go wrong others are in here that just do not understand so my
> naming
> of the tables and fields where to make it as simple to understand as
> possible for those who do not know how to read code normally.
> Second - your queries I am assuming are to be set in the user defined
> functions of SQLServer - We use an Access2K FE - How do I call this
> function
> from the front end - The front end is where I have run all of my queries
> and
> the query I gave and the ones you have given still give me the error. what
> do I have to do to run the query from an Access FE?.
> Again
> TIAFAH
> Randy
> "Michael C#" <xyz@.abcdef.com> wrote in message
> news:e4_9e.134$eR1.12@.fe12.lga...
> table
> road
> happens
>|||On Thu, 21 Apr 2005 16:22:21 -0700, Randy Fritz wrote:

>Hello NG,
>SQLServer 2000
>Background:
> I have been working with an Access2K FE with Access2K BE Tables - I hav
e
>just moved all the BE tables to the SQLServer database - I have set up full
>permissions to Add,Delete,Modify and Read all the records in all the tables
.
>All of my code is in the FE database.
(snip)
Hi Randy,
A few points to keep in mind:
1. The UPDATE you posted uses a syntax that only Access understands. The
ANSI standard form of the UPDATE syntax is
UPDATE TableName
SET Column = expression
[ ,Column = expression ] ...
[ WHERE logical-expression ]
SQL Server also supports an alternative UPDATE syntax, much like (but
not the same as!) the special Access syntax you used - simplified:
UPDATE [ TableName | alias ]
SET Column = expression
[ ,Column = expression ] ...
FROM TableName [ [AS] alias ]
[ (jointype) JOIN TableName [ [AS] alias ] ON logical-expression ] ...
[ WHERE logical-expression ]
The SQL Server UPDATE ... FROM syntax has some gotchas that you should
be aware of. The most important is that the end result is inpredictable
when one row in the table to be updated can be joined to more than one
row from the tables in the FROM clause.
2. If you run regular queries on linked tables in Access, then the query
will be completely executed by Access. It will get the data it needs
from SQL Server, combine the data to get the end result, then (if it's
an update query) send the modifications back to SQL Server. This means
that regular queries in Access should still use Access' version of SQL
(Jet SQL), not SQL Server's (Transact-SQL). It also means that things
might get slow, especially if a lot of data has to be fetched from the
server before the end result is generated.
3. If you define a query as a pass-through query, Access will simply
pass the exact SQL code on to SQL Server and SQL Server will execute it.
For these queries to work, you'll have to write your code in Transact
SQL, and you can't use the nice visual drag and drop tools offered by
Access. In most cases, pass-through queries perform faster than "normal"
queries.
(snip)
> 2. If this needs to be in the BE - How do I call the query from the FE?
if you create a pass-thorugh query, then the code will be sent to the BE
for execution. But the recommended best practice is to start writing
stored procedures that perform the tasks that typically need to be done,
then call the stored procedures from the FE.
Check out CREATE PROCEDURE in Books Online for the syntax you need to
create stored procedures.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Newbie: Merge Replication

I have setup merge replication and it appears to be working fine
multiple publishers to a single subscriber. with continuous push
subscription
If the subscribing SQL Server is unavailable for a period of time the
replication monitor shows an error
"could not connect to SERVERNAME"
Ok so fairly easy to understand.
Now when the subscribing server is available again it does not seem to
connect again. I can click the "start synchronizing" option from the
replication monitor, however I would have thought continuous updating would
reconnect when available.
If this is the case,
1. How can I make it connect/start sycnronising again sooner automatically,
without user invervention?
2. Am I able to call the start synchronising feature through commands so
that I can have a force update type feature through code.
Thanks in advance.
Cheers,
Tim
Timmeah,
you could schedule the merge agent to run once a minute rather than
continuously. Alternatively you could force the job steps to run in a loop.
To start the merge agent in TSQL you can use sp_start_job.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)