Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Friday, March 23, 2012

Related Tables in Model Files

I want to create a model file that relates two tables. However, these tables do not have a foreign key relationship in the database. Is there any way to do this? I'm hoping to programmatically generate the XML for the smdl file. Here's the XML that is generated when there is a foreign key:

<Role ID="G958db767-3d65-4445-9ccb-5f76c41720fb">

<Name>Linked Problem</Name>

<RelatedRoleID>Gf5496c9e-13b8-4c66-965d-c3a3c9a78cc8</RelatedRoleID>

<Cardinality>OptionalOne</Cardinality>

<Relation Name="dbo_Incident_FK_Incident_Problem" RelationEnd="Target" />

</Role>

Is there any way to change this to XML reference a table and join fields instead of a FK?

The Role in the report model must be bound to a Relation in the Data Source View (DSV), but the Relation does not need to have any corresponding FK constraint in the underlying database. The solution is to define the Relation you want in the DSV section of the file, then create the Role pair and bind them to it.

|||Hi Bob,

To form the relation, I assume you mean that I make a key/keyref pair in the schema. Is this correct?

As for the role pair, I don't understand exactly where these items go. I looked at the ones generated when there was a FK in the database. It looks like one goes at the end of the first table's attribute (field) list and the second one replaces the attribute in the second table. Is this correct?

If you have any XML samples I would really appreciate it. I tried everything I could think of today and got nothing but errors when I tried to upload the model files.

Thanks!|||Never mind. I've since discovered that you can set up a foreign key with the "NO CHECK" option. I think I can do that and save myself from having to programmatically generate SMDL. Thanks!

Wednesday, March 21, 2012

Reinstall SQL Sever 2000

Hi all,

I have a server that is missing some important files, and instead of doing process of elimination, I feel it is best just to reinstall 2000.

Now is there a way to reinstall 2000 and just getting the files that the server is missing?

Is there any guidelines or steps for reinstalling 2000 out there?

Thanking you in advance.

LystraDoes anyone have any answers?

Thanks

Lystra|||I have look everywhere in order to get detail for reinstalling 2000, and have come up with anything.

Will I need to uninstall SQL and then install it all over again to get the missing files?

Thanks

Lystra|||You can try to re-install the service pack. That will replace some files, but not necessarily all of them. And if you are missing enough files that SQL Server will not start up in the first place, you may end up having to just uninstall and re-install SQL Server, altogether.

And, of course, you may want to look into restricting the permissions so folks can not accidentally delete these files.|||Thanks for responding.

As for the data files once I uninstall will the files be remove?

Do I need to move the data files of the server??

Lystra|||I have not uninstalled SQL Server many times, so I do not know if the data files are left on the disk. It is best to save off backups of all of your databases (master and msdb included), before you start this sort of thing. Once you are certain you can get all of your data back from any mishap, then you can start trying to get SQL Server off the box.|||True, its always better to keep the upto date backup of the databases and store them in other location until the resinstallation process is completed.

There aren't any defined steps to reinstall just install the CD and continue as specified in the screen. Its better to do it from scracth by uninstalling current version , remot registery referenced keys, reboot the box and then reinstall SQL.|||Hi

I have found a MS Knowledge base article on How to manually remove SQL server 2000 Default, named, or virtual instance.

I help you with the reinstall process.

Article # 290991

Thanks for all your help

Lystra

Monday, February 20, 2012

register database

I have installed an application made with VB6 on a computer, and have
installed MSDE 2000. I've copied the .ldf and .mdf files in the appropriate
folder. However, the login information that is contained in the application
doesn't allow me to access the database. I was able to access the database
when I was designing the application. I used a dataenvironment. When I ran
the application on the user's computer, it asked for the password for the sa
account and also for the name of the instance of SQL Server to connect to.
I was able to give that information correctly. What is the problem? Was I
supposed to do more than copy the .ldf and .mdf files onto the hard drive.
Was I supposed to somehow register those files with SQL Server? MSDE
doesn't come with the same tools as SQL Server. Can someone help?To be honest I do not know MSDE 2000 as well as I should
but with Server 2000 you need to perform a sp_attach_db.
J
>--Original Message--
>I have installed an application made with VB6 on a
computer, and have
>installed MSDE 2000. I've copied the .ldf and .mdf
files in the appropriate
>folder. However, the login information that is
contained in the application
>doesn't allow me to access the database. I was able to
access the database
>when I was designing the application. I used a
dataenvironment. When I ran
>the application on the user's computer, it asked for the
password for the sa
>account and also for the name of the instance of SQL
Server to connect to.
>I was able to give that information correctly. What is
the problem? Was I
>supposed to do more than copy the .ldf and .mdf files
onto the hard drive.
>Was I supposed to somehow register those files with SQL
Server? MSDE
>doesn't come with the same tools as SQL Server. Can
someone help?
>
>.
>|||Daniel,
Julia's TSQL is right.
Just an extra point though - if you want to do this sort of thing
graphically using SQL Server client tools - Enterprise Manager, query
analyser etc - then you could register the MSDE instance on another
Enterprise Manager on the network. If it is a stand-alone PC then you might
install Developer Edition just to get the tools ($40ish).
HTH,
Paul Ibison|||However, last time I heard, this is violating the license agreements. We have had a discussion about this in
the MVP group, and hopefully MS will make these things much clearer on their web pages (if that haven't
already been done...). :-)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message news:%23vf8$GvSEHA.3968@.TK2MSFTNGP09.phx.gbl...
> Daniel,
> Julia's TSQL is right.
> Just an extra point though - if you want to do this sort of thing
> graphically using SQL Server client tools - Enterprise Manager, query
> analyser etc - then you could register the MSDE instance on another
> Enterprise Manager on the network. If it is a stand-alone PC then you might
> install Developer Edition just to get the tools ($40ish).
> HTH,
> Paul Ibison
>|||Hi,
MSDE will not come up with normal tools graphical tools. Follow the below
steps to attach the database in MSDE
1. From command prompt execute
OSQL -Usa -Ppassword -S servername (Enter Key)
This will go go to a sql prompt, there execute the sp_attach_db to attach
the MDF and LDF file to sql server
1> sp_attach_db
'dbname','c:\mssql\data\dname_data.mdf','c:\mssql\data\dname_log.ldf'
(enter Key)
2>go (enter key)
This will attach the database to sql server. After this you can access the
database. Provide the directory and MDF and LDF file names appropriately.
---
Microsoft is giving a free tool named "SQL Server web data Administrator" to
manager and administrator the SQl server. This will be more useful to
MSDE users.
Download the free tool from below site.
http://www.microsoft.com/downloads/details.aspx?FamilyId=C039A798-C57A-419E-
ACBC-2A332CB7F959&displaylang=en
Thanks
Hari
MCDBA
"Daniel" <dwbnews@.hotmail.com> wrote in message
news:OIsozWpSEHA.3332@.tk2msftngp13.phx.gbl...
> I have installed an application made with VB6 on a computer, and have
> installed MSDE 2000. I've copied the .ldf and .mdf files in the
appropriate
> folder. However, the login information that is contained in the
application
> doesn't allow me to access the database. I was able to access the
database
> when I was designing the application. I used a dataenvironment. When I
ran
> the application on the user's computer, it asked for the password for the
sa
> account and also for the name of the instance of SQL Server to connect to.
> I was able to give that information correctly. What is the problem? Was
I
> supposed to do more than copy the .ldf and .mdf files onto the hard drive.
> Was I supposed to somehow register those files with SQL Server? MSDE
> doesn't come with the same tools as SQL Server. Can someone help?
>|||Thanks fo rthis feedback. I'll hold off from this recommendation (here and
in class) until things are sorted.
Regards,
Paul Ibison|||I was a bit surprised to here that you can't even use your own EM to manage your own MSDE's, but that is the
way I read one of the posts. Hopefully, MS will understand that first step is to document this as clearly as
possible...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message news:uKEI5YGTEHA.3660@.tk2msftngp13.phx.gbl...
> Thanks fo rthis feedback. I'll hold off from this recommendation (here and
> in class) until things are sorted.
> Regards,
> Paul Ibison
>|||Thank you for the comments. You may be interested to learn what I've found
out. It is actually possible to use code (in my case I use Visual Basic 6)
to attach the database to MSDE. Here is a link I found that leads to other
links that give more information:
http://msdn.microsoft.com/vstudio/downloads/addins/msde/deploying.aspx.
Paul Ibison mentioned in his post about a class? I'm curious about what
class that is.
Daniel
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:uKEI5YGTEHA.3660@.tk2msftngp13.phx.gbl...
> Thanks fo rthis feedback. I'll hold off from this recommendation (here and
> in class) until things are sorted.
> Regards,
> Paul Ibison
>

register database

I have installed an application made with VB6 on a computer, and have
installed MSDE 2000. I've copied the .ldf and .mdf files in the appropriate
folder. However, the login information that is contained in the application
doesn't allow me to access the database. I was able to access the database
when I was designing the application. I used a dataenvironment. When I ran
the application on the user's computer, it asked for the password for the sa
account and also for the name of the instance of SQL Server to connect to.
I was able to give that information correctly. What is the problem? Was I
supposed to do more than copy the .ldf and .mdf files onto the hard drive.
Was I supposed to somehow register those files with SQL Server? MSDE
doesn't come with the same tools as SQL Server. Can someone help?
Daniel,
Julia's TSQL is right.
Just an extra point though - if you want to do this sort of thing
graphically using SQL Server client tools - Enterprise Manager, query
analyser etc - then you could register the MSDE instance on another
Enterprise Manager on the network. If it is a stand-alone PC then you might
install Developer Edition just to get the tools ($40ish).
HTH,
Paul Ibison
|||However, last time I heard, this is violating the license agreements. We have had a discussion about this in
the MVP group, and hopefully MS will make these things much clearer on their web pages (if that haven't
already been done...). :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message news:%23vf8$GvSEHA.3968@.TK2MSFTNGP09.phx.gbl...
> Daniel,
> Julia's TSQL is right.
> Just an extra point though - if you want to do this sort of thing
> graphically using SQL Server client tools - Enterprise Manager, query
> analyser etc - then you could register the MSDE instance on another
> Enterprise Manager on the network. If it is a stand-alone PC then you might
> install Developer Edition just to get the tools ($40ish).
> HTH,
> Paul Ibison
>
|||Hi,
MSDE will not come up with normal tools graphical tools. Follow the below
steps to attach the database in MSDE
1. From command prompt execute
OSQL -Usa -Ppassword -S servername (Enter Key)
This will go go to a sql prompt, there execute the sp_attach_db to attach
the MDF and LDF file to sql server
1> sp_attach_db
'dbname','c:\mssql\data\dname_data.mdf','c:\mssql\ data\dname_log.ldf'
(enter Key)
2>go (enter key)
This will attach the database to sql server. After this you can access the
database. Provide the directory and MDF and LDF file names appropriately.
Microsoft is giving a free tool named "SQL Server web data Administrator" to
manager and administrator the SQl server. This will be more useful to
MSDE users.
Download the free tool from below site.
http://www.microsoft.com/downloads/d...798-C57A-419E-
ACBC-2A332CB7F959&displaylang=en
Thanks
Hari
MCDBA
"Daniel" <dwbnews@.hotmail.com> wrote in message
news:OIsozWpSEHA.3332@.tk2msftngp13.phx.gbl...
> I have installed an application made with VB6 on a computer, and have
> installed MSDE 2000. I've copied the .ldf and .mdf files in the
appropriate
> folder. However, the login information that is contained in the
application
> doesn't allow me to access the database. I was able to access the
database
> when I was designing the application. I used a dataenvironment. When I
ran
> the application on the user's computer, it asked for the password for the
sa
> account and also for the name of the instance of SQL Server to connect to.
> I was able to give that information correctly. What is the problem? Was
I
> supposed to do more than copy the .ldf and .mdf files onto the hard drive.
> Was I supposed to somehow register those files with SQL Server? MSDE
> doesn't come with the same tools as SQL Server. Can someone help?
>
|||Thanks fo rthis feedback. I'll hold off from this recommendation (here and
in class) until things are sorted.
Regards,
Paul Ibison
|||I was a bit surprised to here that you can't even use your own EM to manage your own MSDE's, but that is the
way I read one of the posts. Hopefully, MS will understand that first step is to document this as clearly as
possible...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message news:uKEI5YGTEHA.3660@.tk2msftngp13.phx.gbl...
> Thanks fo rthis feedback. I'll hold off from this recommendation (here and
> in class) until things are sorted.
> Regards,
> Paul Ibison
>
|||Thank you for the comments. You may be interested to learn what I've found
out. It is actually possible to use code (in my case I use Visual Basic 6)
to attach the database to MSDE. Here is a link I found that leads to other
links that give more information:
http://msdn.microsoft.com/vstudio/do...eploying.aspx.
Paul Ibison mentioned in his post about a class? I'm curious about what
class that is.
Daniel
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:uKEI5YGTEHA.3660@.tk2msftngp13.phx.gbl...
> Thanks fo rthis feedback. I'll hold off from this recommendation (here and
> in class) until things are sorted.
> Regards,
> Paul Ibison
>
|||Daniel,
I work for a CTEC (like several others on the MS newsgroups, inc Tibor) - www.pygmalion.com.
Regards,
Paul Ibison

register database

I have installed an application made with VB6 on a computer, and have
installed MSDE 2000. I've copied the .ldf and .mdf files in the appropriate
folder. However, the login information that is contained in the application
doesn't allow me to access the database. I was able to access the database
when I was designing the application. I used a dataenvironment. When I ran
the application on the user's computer, it asked for the password for the sa
account and also for the name of the instance of SQL Server to connect to.
I was able to give that information correctly. What is the problem? Was I
supposed to do more than copy the .ldf and .mdf files onto the hard drive.
Was I supposed to somehow register those files with SQL Server? MSDE
doesn't come with the same tools as SQL Server. Can someone help?Daniel,
Julia's TSQL is right.
Just an extra point though - if you want to do this sort of thing
graphically using SQL Server client tools - Enterprise Manager, query
analyser etc - then you could register the MSDE instance on another
Enterprise Manager on the network. If it is a stand-alone PC then you might
install Developer Edition just to get the tools ($40ish).
HTH,
Paul Ibison|||However, last time I heard, this is violating the license agreements. We hav
e had a discussion about this in
the MVP group, and hopefully MS will make these things much clearer on their
web pages (if that haven't
already been done...). :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message news:%23vf8$GvSEHA.3968@.TK2MSFTNG
P09.phx.gbl...
> Daniel,
> Julia's TSQL is right.
> Just an extra point though - if you want to do this sort of thing
> graphically using SQL Server client tools - Enterprise Manager, query
> analyser etc - then you could register the MSDE instance on another
> Enterprise Manager on the network. If it is a stand-alone PC then you migh
t
> install Developer Edition just to get the tools ($40ish).
> HTH,
> Paul Ibison
>|||Hi,
MSDE will not come up with normal tools graphical tools. Follow the below
steps to attach the database in MSDE
1. From command prompt execute
OSQL -Usa -Ppassword -S servername (Enter Key)
This will go go to a sql prompt, there execute the sp_attach_db to attach
the MDF and LDF file to sql server
1> sp_attach_db
'dbname','c:\mssql\data\dname_data.mdf','c:\mssql\data\dname_log.ldf'
(enter Key)
2>go (enter key)
This will attach the database to sql server. After this you can access the
database. Provide the directory and MDF and LDF file names appropriately.
---
Microsoft is giving a free tool named "SQL Server web data Administrator" to
manager and administrator the SQl server. This will be more useful to
MSDE users.
Download the free tool from below site.
http://www.microsoft.com/downloads/...A798-C57A-419E-
ACBC-2A332CB7F959&displaylang=en
Thanks
Hari
MCDBA
"Daniel" <dwbnews@.hotmail.com> wrote in message
news:OIsozWpSEHA.3332@.tk2msftngp13.phx.gbl...
> I have installed an application made with VB6 on a computer, and have
> installed MSDE 2000. I've copied the .ldf and .mdf files in the
appropriate
> folder. However, the login information that is contained in the
application
> doesn't allow me to access the database. I was able to access the
database
> when I was designing the application. I used a dataenvironment. When I
ran
> the application on the user's computer, it asked for the password for the
sa
> account and also for the name of the instance of SQL Server to connect to.
> I was able to give that information correctly. What is the problem? Was
I
> supposed to do more than copy the .ldf and .mdf files onto the hard drive.
> Was I supposed to somehow register those files with SQL Server? MSDE
> doesn't come with the same tools as SQL Server. Can someone help?
>|||Thanks fo rthis feedback. I'll hold off from this recommendation (here and
in class) until things are sorted.
Regards,
Paul Ibison|||I was a bit surprised to here that you can't even use your own EM to manage
your own MSDE's, but that is the
way I read one of the posts. Hopefully, MS will understand that first step i
s to document this as clearly as
possible...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message news:uKEI5YGTEHA.3660@.tk2msftngp1
3.phx.gbl...
> Thanks fo rthis feedback. I'll hold off from this recommendation (here and
> in class) until things are sorted.
> Regards,
> Paul Ibison
>|||Thank you for the comments. You may be interested to learn what I've found
out. It is actually possible to use code (in my case I use Visual Basic 6)
to attach the database to MSDE. Here is a link I found that leads to other
links that give more information:
http://msdn.microsoft.com/vstudio/d...deploying.aspx.
Paul Ibison mentioned in his post about a class? I'm curious about what
class that is.
Daniel
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:uKEI5YGTEHA.3660@.tk2msftngp13.phx.gbl...
> Thanks fo rthis feedback. I'll hold off from this recommendation (here and
> in class) until things are sorted.
> Regards,
> Paul Ibison
>|||Daniel,
I work for a CTEC (like several others on the MS newsgroups, inc Tibor) - alion.com." target="_blank">www.pygm
alion.com.
Regards,
Paul Ibison