Showing posts with label process. Show all posts
Showing posts with label process. Show all posts

Friday, March 30, 2012

Relative ConnectionString for SQL Server 2005 Express

I am creating a application in Visual C++ 2005 that has database connections in it. I have gone through the process of setting up the data source and it will work great on my computer. However, the second I move either the project or the created executable to another computer the application keeps crashing. I know that it is crashing due to the database connection string. The string is setup to work only on my computer, I am wondering how do I make, or edit, the string to work on any computer? Thanks for the help.
Have you gone into SQL Server Surface Area Configuration to enable remote connections to the database?

Wednesday, March 28, 2012

Relationship between tables of two database

Hi All'

I'm in process of upgrading our Microsoft Access Database to SQL Server 2000. We have one front end database that links all the backend databases. But there are some databases which shares tables with other databases. Currently the refrential integrity is being done by VBA codes in the forms itself (bad na!).

Example
----
Database: Vehicle
Tables in "Vehicle" database are VechileType (v_type, v_desc) and VehicleInventory (v_RegNo, v_Type, customerID)

Database: Customer
Tables in "Customer" database are CustomerType(c_type, c_desc) and CustomerInventory (customerID, customerName, c_type).

This is just example...there are many (more than 10!) tables in each database. So, I do NOT want to place everything in a single database.

Now I'm looking solution for creating trigger that ensures the Refrential Integrity on "customerID" field in both VehicleInventory and CustomerInventory tables. eg user can not delete customerID from CustomerInventory table if its record exist in VehicleInventory table.

CAN ANY ONE HELP ME..................

Thanks

cheers'

-aviAvinash, why don't you create primary key and foreign key constraints to implement referential integrity. That's a better approach than triggers.

gyan.

Originally posted by avishesh
Hi All'

I'm in process of upgrading our Microsoft Access Database to SQL Server 2000. We have one front end database that links all the backend databases. But there are some databases which shares tables with other databases. Currently the refrential integrity is being done by VBA codes in the forms itself (bad na!).

Example
----
Database: Vehicle
Tables in "Vehicle" database are VechileType (v_type, v_desc) and VehicleInventory (v_RegNo, v_Type, customerID)

Database: Customer
Tables in "Customer" database are CustomerType(c_type, c_desc) and CustomerInventory (customerID, customerName, c_type).

This is just example...there are many (more than 10!) tables in each database. So, I do NOT want to place everything in a single database.

Now I'm looking solution for creating trigger that ensures the Refrential Integrity on "customerID" field in both VehicleInventory and CustomerInventory tables. eg user can not delete customerID from CustomerInventory table if its record exist in VehicleInventory table.

CAN ANY ONE HELP ME..................

Thanks

cheers'

-avi :)

Friday, March 23, 2012

Re-installing SQL Server

A remote user messed up my installation of SQL SP3 and now the SQL Server property shows it has SP3 but in fact it never went though the process. I'm planning to re-isntll the SQL server then apply the SP3.
Is there an article or can someone give me some pointers of preparation prior to removing the current SQL server. Also, currently I only know to back up the database file. Can I backup and restore the Master DB and it will retore all users' login and pa
sswords to a particular database now on the server?
Thanks,
Alpha
Have you tried reinstalling sp3? If it still fails without a good reason, I
highly recommend you starting reinstallation from scratch because the
previous failed sp install may have corrupted the SQL instance, or at least
changed system schemas etc, leaving you in a inconsistent state. You can run
sp_help_revlogin to script out all user logins and save them. Also detach
all user dbs for future attach. You need to script out all jobs, alerts,
etc. also to avoid restoring msdb.
"Alpha" <Alpha@.discussions.microsoft.com> wrote in message
news:3D37FDD1-7C11-4DAE-99A6-E2E12CC11A76@.microsoft.com...
> A remote user messed up my installation of SQL SP3 and now the SQL Server
property shows it has SP3 but in fact it never went though the process. I'm
planning to re-isntll the SQL server then apply the SP3.
> Is there an article or can someone give me some pointers of preparation
prior to removing the current SQL server. Also, currently I only know to
back up the database file. Can I backup and restore the Master DB and it
will retore all users' login and passwords to a particular database now on
the server?
> Thanks,
> Alpha
|||I tried reinstalling sp3 twice and both time it won't go through. The sql server status shows it has SP3 when in fact the installation never went through. It is in a confused state. I will be removing the sql server installation, deleted the folder and
then re-install from scratch. I search the on-line book for more detail of sp_help_revlogin but it is not found. Is there a typo?
Thanks,
Alpha
"Richard Ding" wrote:

> Have you tried reinstalling sp3? If it still fails without a good reason, I
> highly recommend you starting reinstallation from scratch because the
> previous failed sp install may have corrupted the SQL instance, or at least
> changed system schemas etc, leaving you in a inconsistent state. You can run
> sp_help_revlogin to script out all user logins and save them. Also detach
> all user dbs for future attach. You need to script out all jobs, alerts,
> etc. also to avoid restoring msdb.
>
> "Alpha" <Alpha@.discussions.microsoft.com> wrote in message
> news:3D37FDD1-7C11-4DAE-99A6-E2E12CC11A76@.microsoft.com...
> property shows it has SP3 but in fact it never went though the process. I'm
> planning to re-isntll the SQL server then apply the SP3.
> prior to removing the current SQL server. Also, currently I only know to
> back up the database file. Can I backup and restore the Master DB and it
> will retore all users' login and passwords to a particular database now on
> the server?
>
>
|||Yes, you can backup and restore master, model, everything... But I think I
would open a PSS call to get MS support for this... Perhaps they can help
you get through without re-install... The cost is just $249 I think..
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Alpha" <Alpha@.discussions.microsoft.com> wrote in message
news:58D9149D-F7B0-423F-9EE7-CA7E1AC62C13@.microsoft.com...
> I tried reinstalling sp3 twice and both time it won't go through. The sql
server status shows it has SP3 when in fact the installation never went
through. It is in a confused state. I will be removing the sql server
installation, deleted the folder and then re-install from scratch. I search
the on-line book for more detail of sp_help_revlogin but it is not found.
Is there a typo?[vbcol=seagreen]
> Thanks,
> Alpha
>
> "Richard Ding" wrote:
reason, I[vbcol=seagreen]
least[vbcol=seagreen]
run[vbcol=seagreen]
detach[vbcol=seagreen]
Server[vbcol=seagreen]
I'm[vbcol=seagreen]
preparation[vbcol=seagreen]
to[vbcol=seagreen]
it[vbcol=seagreen]
on[vbcol=seagreen]

Re-installing SQL Server

A remote user messed up my installation of SQL SP3 and now the SQL Server pr
operty shows it has SP3 but in fact it never went though the process. I'm p
lanning to re-isntll the SQL server then apply the SP3.
Is there an article or can someone give me some pointers of preparation prio
r to removing the current SQL server. Also, currently I only know to back u
p the database file. Can I backup and restore the Master DB and it will ret
ore all users' login and pa
sswords to a particular database now on the server?
Thanks,
AlphaHave you tried reinstalling sp3? If it still fails without a good reason, I
highly recommend you starting reinstallation from scratch because the
previous failed sp install may have corrupted the SQL instance, or at least
changed system schemas etc, leaving you in a inconsistent state. You can run
sp_help_revlogin to script out all user logins and save them. Also detach
all user dbs for future attach. You need to script out all jobs, alerts,
etc. also to avoid restoring msdb.
"Alpha" <Alpha@.discussions.microsoft.com> wrote in message
news:3D37FDD1-7C11-4DAE-99A6-E2E12CC11A76@.microsoft.com...
> A remote user messed up my installation of SQL SP3 and now the SQL Server
property shows it has SP3 but in fact it never went though the process. I'm
planning to re-isntll the SQL server then apply the SP3.
> Is there an article or can someone give me some pointers of preparation
prior to removing the current SQL server. Also, currently I only know to
back up the database file. Can I backup and restore the Master DB and it
will retore all users' login and passwords to a particular database now on
the server?
> Thanks,
> Alpha|||I tried reinstalling sp3 twice and both time it won't go through. The sql s
erver status shows it has SP3 when in fact the installation never went throu
gh. It is in a confused state. I will be removing the sql server installat
ion, deleted the folder and
then re-install from scratch. I search the on-line book for more detail of
sp_help_revlogin but it is not found. Is there a typo?
Thanks,
Alpha
"Richard Ding" wrote:

> Have you tried reinstalling sp3? If it still fails without a good reason,
I
> highly recommend you starting reinstallation from scratch because the
> previous failed sp install may have corrupted the SQL instance, or at leas
t
> changed system schemas etc, leaving you in a inconsistent state. You can r
un
> sp_help_revlogin to script out all user logins and save them. Also detach
> all user dbs for future attach. You need to script out all jobs, alerts,
> etc. also to avoid restoring msdb.
>
> "Alpha" <Alpha@.discussions.microsoft.com> wrote in message
> news:3D37FDD1-7C11-4DAE-99A6-E2E12CC11A76@.microsoft.com...
> property shows it has SP3 but in fact it never went though the process. I
'm
> planning to re-isntll the SQL server then apply the SP3.
> prior to removing the current SQL server. Also, currently I only know to
> back up the database file. Can I backup and restore the Master DB and it
> will retore all users' login and passwords to a particular database now on
> the server?
>
>|||Yes, you can backup and restore master, model, everything... But I think I
would open a PSS call to get MS support for this... Perhaps they can help
you get through without re-install... The cost is just $249 I think..
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Alpha" <Alpha@.discussions.microsoft.com> wrote in message
news:58D9149D-F7B0-423F-9EE7-CA7E1AC62C13@.microsoft.com...
> I tried reinstalling sp3 twice and both time it won't go through. The sql
server status shows it has SP3 when in fact the installation never went
through. It is in a confused state. I will be removing the sql server
installation, deleted the folder and then re-install from scratch. I search
the on-line book for more detail of sp_help_revlogin but it is not found.
Is there a typo?[vbcol=seagreen]
> Thanks,
> Alpha
>
> "Richard Ding" wrote:
>
reason, I[vbcol=seagreen]
least[vbcol=seagreen]
run[vbcol=seagreen]
detach[vbcol=seagreen]
Server[vbcol=seagreen]
I'm[vbcol=seagreen]
preparation[vbcol=seagreen]
to[vbcol=seagreen]
it[vbcol=seagreen]
on[vbcol=seagreen]

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

Re-install MDAC 2.6

I currently have SQL 2000 SP2 and MDAC 2.6 SP2 on our
database server. I am testing the process to go to
SP3a and MDAC 2.71a.
Once at SP3a and MDAC 2.71a, I tested reverting back to
SQL SP2 and MDAC 2.6 SP2 by uninstalling SQL 2000,
reinstalling SQL 2000 and SP2. However MDAC did not
revert back to 2.6 SP2. It stayed at 2.71a.
What is the proper procedure to get back to MDAC 2.6 SP2?
"Mark Gozick" <mgozick@.diamondtriumph.com> wrote in message
news:0b9401c4ac78$39e7c4c0$a301280a@.phx.gbl...
> I currently have SQL 2000 SP2 and MDAC 2.6 SP2 on our
> database server. I am testing the process to go to
> SP3a and MDAC 2.71a.
> Once at SP3a and MDAC 2.71a, I tested reverting back to
> SQL SP2 and MDAC 2.6 SP2 by uninstalling SQL 2000,
> reinstalling SQL 2000 and SP2. However MDAC did not
> revert back to 2.6 SP2. It stayed at 2.71a.
> What is the proper procedure to get back to MDAC 2.6 SP2?
>
You might need to rebuild your server -- as I recall, there is no clean way
to remove, or down-level MDAC.
Steve

Re-install MDAC 2.6

I currently have SQL 2000 SP2 and MDAC 2.6 SP2 on our
database server. I am testing the process to go to
SP3a and MDAC 2.71a.
Once at SP3a and MDAC 2.71a, I tested reverting back to
SQL SP2 and MDAC 2.6 SP2 by uninstalling SQL 2000,
reinstalling SQL 2000 and SP2. However MDAC did not
revert back to 2.6 SP2. It stayed at 2.71a.
What is the proper procedure to get back to MDAC 2.6 SP2?"Mark Gozick" <mgozick@.diamondtriumph.com> wrote in message
news:0b9401c4ac78$39e7c4c0$a301280a@.phx.gbl...
> I currently have SQL 2000 SP2 and MDAC 2.6 SP2 on our
> database server. I am testing the process to go to
> SP3a and MDAC 2.71a.
> Once at SP3a and MDAC 2.71a, I tested reverting back to
> SQL SP2 and MDAC 2.6 SP2 by uninstalling SQL 2000,
> reinstalling SQL 2000 and SP2. However MDAC did not
> revert back to 2.6 SP2. It stayed at 2.71a.
> What is the proper procedure to get back to MDAC 2.6 SP2?
>
You might need to rebuild your server -- as I recall, there is no clean way
to remove, or down-level MDAC.
Steve