Showing posts with label db1. Show all posts
Showing posts with label db1. Show all posts

Wednesday, March 28, 2012

MS sql server query file

Hi All.

Have a nice day.

I have one file and all tables and fields created in this file, this file name is "db1.sql", i downloaded this file from a internet demo. and programmer give this file to use in the asp.net code. but i cannot open this file.

I want to use this file in my sqlepress, how can i import or bring to my sqlexpress server and use it ?

Please can you help me how can i use it?

Thanks.

Zahyea.

The file you download is a script file that contains the database and table creation, insertion of data, and views and procedures if any.

You need to execute the sql script. You can download SQL Server Management Studio for SQL Express that allows you to execute scripts against a SQL instance/database.

Monday, February 20, 2012

MS SQL 2000 - How to reflect table updates

Hello!
I have 2 database (DB1 and DB2) in 1 server. I want to reflect new changes made in DB1.tbl_pm_project to DB2.tbl_pm_project. Any idea on how to do it.
Thank you
JJ-honHello!

I have 2 database (DB1 and DB2) in 1 server. I want to reflect new changes made in DB1.tbl_pm_project to DB2.tbl_pm_project. Any idea on how to do it.

Thank you
JJ-hon

What kind of changes? Structural changes or data changes? How often do the changes need to be reflected (real time, near real time or batch)?

I'll assume data changes (insert, update, delete) and that the requirement is for real time.

For two databases on the same server, your best bet is probably going to be a trigger. I do not like triggers that affect data across schema boundaries (ie, from one db to another), but this will probably be your quickest solution.

See SQL BOL.

Regards,

hmscott|||Triggers or DTS or Replication... according to your requirement.

As you have only one table and if data is not huge then Trigger is fine else normally it is not preferred.

It's all about how fast & consistent data changes you want to reflect.|||Or let a stored procedure update both databases in a transaction since they are on the same server.