Showing posts with label original. Show all posts
Showing posts with label original. Show all posts

Friday, March 23, 2012

MS SQL Server 2005 - "Copy Database" from v8 to v9

Hi dear devs, admins or users!

Two weeks ago I had a problem with transfering databases from v8 to v9, I placed the question here (original message attached), but I received not the answer which I need. I try to transfer databases with the CDW ("Copy Database Wizard"), which should run through 5 action steps. The process stops after the 'action 2', the step "Create Package" failed allways. The error message which I receive is "Library not registered". I was very surprised, because two weeks ago the process stoped after the action 4 (4/5) while the step "Execute SQL Server Agent Job". I changed nothing on my system or databases. The only thing I can remember is the "Microsoft Update" downloaded and installed a new patch, but it wasn't a SQL Server 2005 update or something with databases.

I have now two questions. What means the error "Library not registered" while the CDW process and what could be the reason for the error in 'action 5' "Execute SQL Server Agent Job" while the CDW process? **(CDW = "Copy Database Wizard")

[original message from 2006-10-17]

I have following problem with the "SQL Server 2005 Developer Edition". I am in a small network and try to copy a database from a version 8.0 to a version 9.0 "SQL Server" (2 computers). I use the "Copy Database Wizard" and the process did 4 from 5 actions correctly, the last action with the name "Execute SQL Server Agent Job" fails allways. My "SQL Server Agent" process is started and runs well. In real I don't need the "SQL Server Agent" in any way in my database, so I don't understand why this process generates this error. I try to copy this old "Portal" "ASP.NET 1.1" database to my new "SQL Server 2005". Can someone help me?

Thanks

Arzu Bazman · ?US DEV United Systems?

Here is the thread we know SQL Server so we gave you two ways that works, Copy database wizard is one of those wizards it is there but most experienced people don't use it. I think it is failing because it cannot convert TDS(tabular data stream) 80 to 90 2000 to 2005, the problem is you don't need TDS to move a database. Detach and Attach and Backup and Restore wizard don't have the problem.

http://forums.asp.net/thread/1436904.aspx

|||

Hi!

Thank you very much for the answer(s). I remember very well that you answered my first answer yet, but I am someone who wants know things very exactly and when something doesn't work, I want allways know the reason. I thought my SQL Server 2005 is not configured well or something is missing, and thats why I asked a second time about the "Copy Database Wizard". Now that you told me that some problems exist with the CDW, I will try the Backup solution for the transfer from v8 to v9 of course. I am sorry, that I didn't that immediately after your first answer (2 weeks ago), but like I said I thought I configured something wrong and wanted know it very exactly.

Thanks

Arzu Bazman · ?US DEV United Systems?

Monday, February 20, 2012

MS SQL (min function To min2ndlowest)

Hi,
Below stated is my original query from my database but for the sake ofsimplicity , I have used the pubs database to convey my thoughts.

select p.pub_name,min(t.price),max(t.price) from publishers p,titles t
where
p.pub_id=t.pub_id
group by p.pub_name

Instead of the min(Price), I would like to get the min2ndLowest(Price).
Is there away to manipulate the Min function so as to change it . Or is itsomehow possible to rewrite another function like Min2ndLowest() toeasily solve this situation.I will be more happy to solve via thisroute as I later have to solve other queries like Max2ndHighest() andso forth.
Or is it only possible thru some serious query design

Thanks for help guys..

My Original Query

select b.batchid,b.batcharchname,b.realpagecnt,b.queueid,q.queuename,b.isexported,min(t.begintime),max(t.begintime)
from
batches b, queues q,tasks t
where
b.queueid=q.queueid
and
b.batchid = t.batchid
group by b.batchid,b.batcharchname,b.realpagecnt,b.queueid,q.queuename,b.isexported

--SELECT MIN(b.PRICE1) AS Max2ndHighest FROM (SELECT TOP (2) a.PRICE1 FROM my_x a WHERE a.PRICE1 is not NULL order by a.PRICE1 DESC) AS b

--SELECT MAX(b.PRICE1) As MIN2ndLowest FROM (SELECT TOP (2) a.PRICE1 FROM my_x a WHERE a.PRICE1 is not NULL order by a.PRICE1) AS b

--table is from this thread with more data:http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=619492&SiteID=1

create

table #x

(

ProductID

int,

MarketID

int,

Date

datetime,

PRICE1

decimal(9,2),

PRICE2

decimal(9,2),

PRICE3

decimal(9,2)

)

insert

#x

select

1, 2,'1/01/2006', 2.78, 3.4, 2.97unionall

select

1, 2,'2/01/2006', 2.51, 3.5,NULLunionall

select

1, 2,'3/01/2006',NULL, 3.6,NULLunionall

select

1, 2,'4/01/2006',NULL, 3.55,NULLunionall

select

2, 4,'1/01/2006', 3.44, 1.23, 4.33unionall

select

2, 4,'2/01/2006', 3.55, 1.22, 4.22unionall

select

2, 4,'3/01/2006', 3.13, 1.51, 4.54unionall

select

2, 4,'4/01/2006',NULL, 1.50, 4.25

SELECT b.ProductID, b.MarketID,

(

SELECTMIN(c.PRICE2)FROM(SELECTTOP(2) a.PRICE2FROM #x aWHERE a.PRICE2isnotNULLAND b.ProductID=a.ProductIDAND b.MarketID=a.MarketIDORDERBY a.PRICE2DESC)AS c)AS Max2ndHighest,

(

SELECTMAX(c.PRICE2)FROM(SELECTTOP(2) a.PRICE2FROM #x aWHERE a.PRICE2isnotNULLAND b.ProductID=a.ProductIDAND b.MarketID=a.MarketIDorderby a.PRICE2)AS c)AS MIN2ndLowest

FROM

#xAS b

GROUP

BY b.ProductID, b.MarketID

drop

table #x|||

Insert this into the joins area of your original query:

LEFT JOIN ({a complete copy of your original query}) t1 ON ({field1 from original query}=t1.{field1 from original query} AND {field2}=t1.{field2} ... AND {field to be min-ed from original query}={min-ed field result from subquery})

Then add

WHERE t1.{field1} IS NULL to the where clause of your original query.

For example:

SELECT field1,MIN(field2) AS MinField2
FROM table1
WHERE field3='something'
GROUP BY field1

becomes

SELECT field1,MIN(field2) AS MinField2
FROM table1
LEFT JOIN (
SELECT field1,MIN(field2) AS MinField2
FROM table1
WHERE field3='something'
GROUP BY field1) t1 ON (table1.field1=t1.field1 AND table1.field2=t1.MinField2)
WHERE field3='something'AND t1.field1 IS NULL
GROUP BY field1

MS Shell Dlg

Hi
This is probably not that important, but I changed the font, and now I can't
set it back to the original font?
Not urgent, just a nice to have.
Kind Regards
Rikesh
Rikesh,
Changed the font where exactly? In Query Analyzer? Go here:
Tools->Options->Fonts.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Rikesh wrote:
> Hi
> This is probably not that important, but I changed the font, and now I can't
> set it back to the original font?
> Not urgent, just a nice to have.
> Kind Regards
> Rikesh
>
|||Apologies, should have explained better, I meant in Enterprise Manager, when
you view an objects such as a View , SP or Trigger...
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:O0ON4dOlEHA.1652@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Rikesh,
> Changed the font where exactly? In Query Analyzer? Go here:
> Tools->Options->Fonts.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Rikesh wrote:
can't[vbcol=seagreen]

MS Shell Dlg

Hi
This is probably not that important, but I changed the font, and now I can't
set it back to the original font?
Not urgent, just a nice to have.
Kind Regards
RikeshRikesh,
Changed the font where exactly? In Query Analyzer? Go here:
Tools->Options->Fonts.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Rikesh wrote:
> Hi
> This is probably not that important, but I changed the font, and now I can't
> set it back to the original font?
> Not urgent, just a nice to have.
> Kind Regards
> Rikesh
>|||Apologies, should have explained better, I meant in Enterprise Manager, when
you view an objects such as a View , SP or Trigger...
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:O0ON4dOlEHA.1652@.TK2MSFTNGP09.phx.gbl...
> Rikesh,
> Changed the font where exactly? In Query Analyzer? Go here:
> Tools->Options->Fonts.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Rikesh wrote:
> > Hi
> >
> > This is probably not that important, but I changed the font, and now I
can't
> > set it back to the original font?
> >
> > Not urgent, just a nice to have.
> >
> > Kind Regards
> >
> > Rikesh
> >
> >

MS Search

We have problem on our 2 original sql instances in a 4-node cluster.
Both the 2 old instances get one warning and one error message in the
event log.
This is the warning message for one of the instances:
****
Source:Microsoft Search
Category:Gatherer
Event ID:3055
Description:
The Gatherer property mapping file cannot be opened. Error: 80070002.
The default values are being used. You may have to copy the property
mapping file from the setup CD, or reinstall the application.
****
Here comes the error message for the same instance:
****
Source:Microsoft Search
Category:Gatherer
Event ID:10006
Description:
An error occured during the online operation for instance <SQL Server
Fulltext (Inst2)>: 80070002 - The system cannot find the file
specified
****
The service Microsoft Search is running, it's the cluster resource
that freak out. Since the full text is not used we removed the
resources from the clustergroups. without them it all works as it
should.
We have 2 new sql instances and they run the SQL Server Fulltext in
the cluster on whatewer node of the 4 witch the group is moved to. The
account used for sql is the same in all 4 instances and it's in the
administators group on all 4 nodes. The same goes fore the account
that runs the cluster.
What I would like to know is what file is the event message pointing
to? We can't se anything odd.
What is the default values?
If I copy it from the install CD, what directory?
If I reinstall, what will I have to reinstall?
In both cases. what about servicepack and hotfixes after?
/Peter
Hello Peter,
Please refer to the following Knowledge Base article concerning this issue:
304282 PRB: Full Text Resource Fails to Come Online on a Cluster with
"Event ID
http://support.microsoft.com/?id=304282
Regards,
Farooq Mahmud [MS SQL Support]
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
|||Hi there Farooq!
I have checked out that article already.
Since we have 2 instances that work we compare them with each other.
We found no differenses. That's why I ask the questions about
reinstalling from the CD.
I.E how to do the part I quote, what about the reinstall from CD or
rebuild. Where can I find the steps, and if I take it from the CD what
about SP and hotfixes? I hope you can help me.
"
From Knowledge Base-artikel - 304282
MORE INFORMATION
If the files in the FTDATA folder are replaced, corrupted, or deleted,
or if the FTDATA folder itself is deleted, the SQL Server Fulltext
cluster resource may have to be rebuilt to be restored to a stable
state.
"
/Peter
On Tue, 11 May 2004 13:08:15 GMT, farooqm@.online.microsoft.com (Farooq
Mahmud [MS]) wrotc:

>Hello Peter,
>Please refer to the following Knowledge Base article concerning this issue:
>304282 PRB: Full Text Resource Fails to Come Online on a Cluster with
>"Event ID
>http://support.microsoft.com/?id=304282
>Regards,
>Farooq Mahmud [MS SQL Support]
>This posting is provided "AS IS" with no warranties, and confers no rights.
>Are you secure? For information about the Strategic Technology Protection
>Program and to order your FREE Security Tool Kit, please visit
>http://www.microsoft.com/security.