Any Available Solution Do Creat 3 Databases Correspondence?

Feb 19, 2007

Hi,

we have three dabases:

1. Two localDatabases in two offices, Main Office & Branch Office, each office in a diffrent city!!

2. One remoteDatabes exist in on the internet server.

all of it are with the same exact architecture, we are planning to upload and download to & from remoteDatabase to get the same data in all of them.

any available solution to do this with SQL Server 2005 ?

View 3 Replies


ADVERTISEMENT

Best Practice Configuring Visual Studio Solution For .SDF Databases

Dec 5, 2006

Hello,



In our company we haven't tamed Visual Studio yet for the part of configuring
the application database. Therefore I was wondering if there is someone that
can give me hints or clues on what the best practice is for configuring Visual
Solution to handle an SDF database (SQLCE 3.0). I have search a bit on the
internet and this forum, but couldn't find a decent how-to or best practices
guide that copes with this specific problem.

As
a matter of facts, i am also curious for guidelines and tips on the best way to
configure and manage SQL Server databases under Visual Studio. I guess (read as
hope) that the configuration of a mobile and full blown
database will have some overlaps somehow.



I've found the Database Project which with to manage (Create/Alter) databases,
but is this also the best way to store versions of the database in an
source repository? Can such a project allow me to 'automagically' have a
correct database (so with tables and data) when i want to deploy or debug my
device application?

I am asking this because now our database designers and software engineers have
to do allot of manual actions to update the application with the most recent
database version. SDF databases are flying around all over the place, and in
order to test a specific version of the application, the related database has
to be copied manually on the device. We are not searching for replication
related solutions, nor adding the SDF itself to the source repository, but because
most of our applications are server-client based, it would be really super cool
if we could somehow couple both database definitions and generation together. My
feeling says me there ought to be some feature embedded somewhere deep into
Visual Studio that we missed that would (partially) simplify and automate this
whole process for us.

Another
related question is if it is possible to couple XSD generated datasets to an
SDF database. Is it possible to update the generated code (or the describing
XSD documents) from an SDF database? i again guess that this somehow should be
possible in oderder to keep both code and data in sync, and i do not like the
alternative to always update the XSD when the SDF architecture changes. Somehow
i cannot find out how to do this. i was initially searching for the other way
around: Use an XSD to generate both the DataSet codewrappers and the database
itself.

Any
information is welcome and many thanks in advance!

Peter
Vrenken

View 7 Replies View Related

How To Creat A First DB?

Dec 3, 2006

Hello all,

I've Installed VS2005 and MSSQL express with it. I used to work with mssql 2003 enterprise edition where it had "Enterprise Manager" from which I could create and modify my Databases.

How do I creat a new database with MSSQL express?

I've tried to do this via visual studio 2005 "server explorer". I"m entering the "Create new SQL Server Database" dialog, I select my server's name and my new database name and I recive an error message which says "An error has occurred while estabilishing a connection to the server" and it also says that

"When connecting to SQL server 2005, this failure may be caused by the fact that under the defult settings SQL sever does not allow remote connections".

How do configure my MSSQL express to allow the remote connection?



Thanks in advance!

View 5 Replies View Related

How To Creat A DataBase?

Dec 1, 2007

I have a DataBase name Customer
Customer have 30 Tables name table1 �table2�table 3...
I want to have a DataBase name Customer_Offile with same Table same column like Customer ( the Customer_Offlike will used to a backup  DataBase)
How to wirte a script for copy Customer?
 thank you very much

View 3 Replies View Related

Creat A Table.

Jun 3, 2006

Kindly provide me the creat table querry for MS sql
its urgent.

Thank you!

View 1 Replies View Related

Can't Creat Subscriptions

May 11, 2006

We're new to SQL Reporting Services and have a new SQL 2005 server.

I'm having a problem activating scubscriptions.

- "New Subscription" is greyed out in Server Management Studio.

- Subscribing via the browser, even as the Content Manager, allows you to fill in the form for the subscription but then reports the following error;

"The current action cannot be completed because the user data source credentials that are required to execute this report are not stored in the report server database. (rsInvalidDataSourceCredentialSetting)"

Any suggestions?

 

Found the problem.

When configuring the Data Source the "Impersonate the authenticated user after a connection has been made to the data source" button should be off.

 

View 3 Replies View Related

What If I Attempt To Creat A Publication While...

Apr 29, 2007

What if I attempt to creat a (merge) publication while the production sql server is online and active?



From another point of view, is there any drawback if I try to create (merge) publication while the tables are being used by users?





Thanks

Ekrem Önsoy

View 5 Replies View Related

Customising Creat User Wizard

Feb 23, 2008

Hello
This code was translated from c# but I keep getting this error.
 The variable name '@UserId' has already been declared. Variable names must be unique within a query batch or stored procedure
Any ideas I have tried changing the user id name but no luck. thanks
 
 Partial Class userInherits System.Web.UI.Page
 Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
Dim UserNameTextBox As TextBox
UserNameTextBox = CreateUserWizardStep2.ContentTemplateContainer.FindControl("UserName")Dim DataSource As SqlDataSource = CreateUserWizardStep2.ContentTemplateContainer.FindControl("InsertExtraInfo")
Dim user As MembershipUser = Membership.GetUser(UserNameTextBox.Text)Dim UserGUID As Object = user.ProviderUserKeyDataSource.InsertParameters.Add("UserId", UserGUID.ToString())
DataSource.Insert()
End Sub
End Class

View 4 Replies View Related

Creat Indexed View Error

May 1, 2008

I am tryung to create a indexed view..

CREATE VIEW vwLookAdmissionRecord

WITH SCHEMABINDING

AS

select episode_key as episode_key, ee.object_key, ee.encounter_begin_dt , cp.procedure from dbo.encounters e

join (

select episode_key as minepisode, min(isnull(e.object_key,e.Object_key_History) ) as object_key, min(e.encounter_begin_dt)as encounter_begin_dt

from dbo.encounters e

join dbo.CD_Procedure CP on CP.Procedure_CD = e.procedure_cd
where cp.procedure > 0

group by e.episode_key

)ee on e.object_key = ee.object_key

join dbo.cd_procedure cp on cp.procedure_cd = e.procedure_cd





CREATE UNIQUE CLUSTERED INDEX IDX_V1

ON vwLookAdmissionRecord (episode_key)


but i keep getting an error:


annot create index on view "dbo.vwLookAdmissionRecord" because it references derived table "ee" (defined by SELECT statement in FROM clause). Consider removing the reference to the derived table or not indexing the view.



How can I fix this?

View 11 Replies View Related

How To Creat A Database Via SQL Querry Analyzer To A Web Server

Nov 20, 2003

I am new to ASP.NET and met a problem about access a database on a Web Server (www.myserver.com). My meaning here that I created a .sql from my localhost to test, but when to upload to my web server on the internet, an error occured: "System.Data.SqlClient.SqlException: SQL Server does not exist or access denied".
Anyone here can help me to solve my problem. Waiting for your reply soon. Thanks

View 2 Replies View Related

Cannot Creat Stored Procedure On Existing Database

May 15, 2008

Hi, I already got a database and I need to add another stored procedure on it in order to call it from the SSIS package.
But when I execute the sql file to create the procedure, there is a error message popping out like:

"Cannot add rows to sys.sql_dependencies for the stored procedure because it depends on the missing table 'logit'. The stored procedure will still be created; however, it cannot be successfully executed until the table exists."

And I have tried it on another computer, there is the same error. Could you please tell me how to solve the problem. Thanks very very much.

View 4 Replies View Related

How To Create Trigger Which CREAT TABLE From A Variable String?

Feb 23, 2006



I have a Table Name "Forums". I want to ceate an AFTER-Trigger on it. It will execute when ever a new row is inserted to "Froums" Table.

Here is what I did but It needs to be corrected:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

ALTER TRIGGER CreateTopicsTableTrigger

ON dbo.Forums

AFTER INSERT

AS

SET NOCOUNT OFF

DECLARE @myNewForum varchar

CAST(@@ROWCOUNT as varchar) /*Is it OK???*/

SET @myNewForum=@myNewForum+@@ROWCOUNT /*Here I dont know how assigments work in SQL*/

GO

CREATE Table @myNewForum /*Will this work some how???*/

( TopicID int IDENTITY NOT NULL, TopicTitle varchar(50) , CreatedBy varchar(50) ,

DateCreated DateTime , DateLastUpdate DateTime , LastUpdateBy varchar(50) )



::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

View 5 Replies View Related

SOLUTION! - VB.NET 2005 Express And SQL Server 2005 - NOT Saving Updates To DB - SOLUTION!

Nov 30, 2006

VB.NET 2005 Express and SQL Server 2005 Express - NOT saving updates to DB - SOLUTION!

-----------------------------------

The following article is bogus and confusing:

How to: Manage Local Data Files - Setting 'Copy to Output Directory' to 'Do not copy'
http://msdn2.microsoft.com/en-us/library/ms246989.aspx

You must manually copy the database file to the output directory
AFTER setting 'Copy to Output Directory' to 'Do not copy'.

Do not copy








The file is never copied or overwritten by the project system. Because your application creates a dynamic connection string that points to the database file in the output directory, this setting only works for local database files when you manually copy the file yourself.

You must manually copy the database file to the output directory
AFTER setting 'Copy to Output Directory' to 'Do not copy'.

-----------------------------------

The above article is bogus and confusing.

This is rediculous!

This is the most vague and convoluted bunch of nonsince I've ever come accross!

Getting caught out on this issue for the 10th time!
And not being able to find an exact step-by-step solution.

--------------------------

I've tried it and it doesn't work for me.

Please don't try what the article eludes to as I'm still sorting out exactly what is supposed to be happening.



If you have a step-by-step procedure that can be reproduced this properly please PM me.

I would like to test its validity then update this exact post as a solution rather than just another dicussion thread.

Many thanks.



This is the exact procedure I have come up with:

NOTE 1: DO NOT allow VB.net to copy the database into its folders/directorys.

NOTE 2: DO NOT hand copy the database to a folder/directory in your project.

Yes, I know its hard not to do it because you want your project nice and tidy.
I just simply could NOT get it to work.
You should NOT have myData.mdf listed in the Solution Explorer. Ever.

Create a folder for your data following NOTE 2.

Copy your data to that folder. * mine was C:mydatamyData.mdf



Create a NEW project.

Remove any Data Connections. ( no matter what)

Save it.

Data | View Data Sources

Add New Data Source

select NEW CONNECTION ( No Matter what, do it!

Select the database. * again mine was C:mydatamyData.mdf

Answer NO to the question:
Would you like to copy the file to your project and modify the connection?
- NO ( no matter what - ANSWER NO ! - Absolutely NO )
Then select the tables you want in the DataSet.
and Finish.



To Test ----------

From the Solution Explorer | click the table name drop down arrow | select details
Now Drag the table name onto the form.

The form is then populated with a Navigation control
and matching Labels with corresponding Textboxes for each field in the table.

Save it.

1) Run the app.

Add one database record to the database by pressing the Add(+) icon

Just add some quick junk data that you don't mind getting lost if it doesn't save.

YOU MUST CLICK THE SAVE ICON to save the data you just entered.

Now exit the application.

2) Run the app again.

And verify there is one record already there.

Now add a second database record to the database by pressing the Add (+) icon.

NOW add some quick junk data that you WILL intentionally loose.

*** DO NOT *** press the save icon.

Just Exit the app.

3) Again, Run the app.

Verify that the first record is still there.

Verify that the Second record is NOT there.
Its NOT there because you didn't save the data before exiting the app.

Proving that YOU MUST CLICK THE SAVE ICON to save the data you just entered.

Also proving you must add your own code to catch the changes
and ask the user to save the data before exitiing or moving to another record.

As a side note, since vb.net uses detached datasets,
(a copy/snapshot of the dataset in memory and NOT directly linked to the database)
the dataset will reflect all changes made when moving around the detached datasets.
YOU MUT REMEMBER TO SUBMIT YOUR CHANGES TO THE DATABASE TO SAVE THEM.
Otherwise, they will simply be discarded without notice.

Whewh!

I hope this saves me some time the next time I want to start a new database project.

Oh, and uh, for anyone else reading this post.

Thanks,
Barry G. Sumpter

Currently working with:
Visual Basic 2005 Express
SQL Server 2005 Express

Developing Windows Forms with
101 Samples for Visual Basic 2005
using the DataGridView thru code
and every development wizard I can find within vb.net
unless otherwise individually stated within a thread.

View 17 Replies View Related

Creat Server Using Sql Server 2005

Jun 5, 2006

hi
i want to creat server using sql server 2005
and connect the server with clients (computers)
my question is :
1-must be the server computer using OS Windows Server
2-which book you advice me to read for creat server using SQL Server 2005 database
thank you

View 2 Replies View Related

Linking Tables From Different Databases Or Querying From Multiple Databases

Dec 10, 2007

Dear Readers,Is it possible, like in Access, to link to tables in other SQL databases that are on the same server? I have a query that I originally had in Access that queered from multiply databases. It did this by having those other tables in the other databases linked to the database that had the query. 
 

View 3 Replies View Related

Best Solution

Dec 3, 2003

Let say I have a table that is composed of 11 columns - one the Primary Key and the other are keys to rows in another table. Of these 10 column 2-10 are nullable. Can I get all the info in one SELECT? I can't use JOINS because columns 1-10 are keys to the same table. I am not very good at explaining these things but hopefully it makes sense.

Thanks

View 5 Replies View Related

Need A Solution

Oct 3, 2001

Using SQL 7 (of course), is there a way to give a user access to create and modify Stored procedures without actually giving them DBO rights?

View 1 Replies View Related

Best Possible Solution

Jan 11, 2005

Hi folks, guidance required!
Clients have an MSDE installed and they need all of their data to be dowloaded for the first time from our website. 30 tables r involved.
Can i automate this? I suspect BCP allows only one table to be exported into a text file. Since it's the first time process i don't want to setup replication.



Howdy!

View 2 Replies View Related

Just A Solution

Sep 27, 2007

Hello All,
I have a transaction table that holds nearly a million records and my master with 60000 records,I want to fetch details based on two dates.

I use Union operator to query the info from a view,is this right or fetch the result into a temporary table and fetch the result from temporary table using the same Union operator.

Which is the better way to fetch details faster.

Nirene

My SP is pasted below just advice me to execute this more efficiently,cos this SP is called thru a Web application.

CREATE PROCEDURE GL @SDt Varchar(10),@EDt Varchar(10),@Loccode Char(5),@OP Char(4)
AS

Declare @OpBalQry NVarchar(1000),@TrnQry NVarchar(2000),@MainSQry NVarchar(500),@MainEQry NVarchar(500)
Declare @Cocode Char(5)
Declare @CashGL Char(6),@Gldesc Varchar(50)

IF EXISTS (Select 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND TABLE_NAME='#Gltmp')
Begin
Drop Table #Gltmp
End

Select @Cocode=Cocode from Location Where Loccode=@Loccode
Select @CashGL=Glcode,@Gldesc=Gldesc from Glmast Where Cocode=@Cocode and Subgroupcode='CASH'

Set @OpBalQry='Select A.Glcode,'''' as Trtype,''' + @SDt + ''' as Refdt,'' Opening Balance'' as Refno,
Max(B.Gldesc) as Narration,Case When (Sum(A.Deb)-Sum(A.Cre))<0 Then (-1*(Sum(A.Deb)-Sum(A.Cre))) Else 0 End as Dr,
Case When (Sum(A.Deb)-Sum(A.Cre))>=0 Then (Sum(A.Deb)-Sum(A.Cre)) Else 0 End as Cr from
(
Select Glcode,
(Case When Drcrflag=''D'' Then Opbal Else 0 End) as Deb,
(Case When Drcrflag=''C'' Then Opbal Else 0 End) as Cre from Obdata
Union
Select Glcode,
(Case When Drcrflag=''D'' Then Tramt Else 0 End) as Deb,
(Case When Drcrflag=''C'' Then Tramt Else 0 End) as Cre from Trans_Journal
Where Refdt <Convert(Datetime,''' + @SDt + ''',103)
) A,Glmast B Where B.Cocode=''' + @Cocode + ''' and A.Glcode=B.Glcode Group By A.Glcode
Union
'
Set @TrnQry='SELECT T.Glcode,T.Trtype,Convert(Varchar,Max(T.Refdt),103) as Refdt , '''' AS Refno,
(Rtrim(Ltrim(Max(G.Gldesc))) + '' -- From Sub-Ledger'') AS Narration,
SUM(CASE WHEN T.Drcrflag = ''D'' THEN T.tramt ELSE 0 END) AS Dr,
SUM(CASE WHEN T.Drcrflag = ''C'' THEN T.tramt ELSE 0 END) AS Cr
FROM Trans_Journal T,Glmast G
WHERE T.Glcode=G.Glcode and G.Cocode=''' + @Cocode + ''' and (T.Slcode IS NOT NULL AND Len(Rtrim(Ltrim(T.Slcode)))>0) and
(T.Refdt>=Convert(Datetime,''' + @SDt + ''',103) and T.Refdt <=Convert(Datetime,''' + @EDt + ''',103)
and T.Loccode= ''' + @Loccode + ''' and (G.Subgroupcode<>''BANK'' or G.Subgroupcode<>''CASH''))
GROUP BY T.Glcode,T.Trtype
UNION
SELECT A.Glcode,'''' as Trtype,Convert(Varchar,A.Refdt,103) as Refdt, A.Refno, B.Gldesc AS Narration,
CASE WHEN A.Drcrflag = ''D'' THEN A.Tramt ELSE 0 END AS Dr,
CASE WHEN A.Drcrflag = ''C'' THEN A.Tramt ELSE 0 END AS Cr
FROM Trans_Journal, Glmast B
WHERE (A.Glcode = B.Glcode and B.Cocode=''' + @Cocode + ''') and
(A.Slcode IS NULL OR Len(Rtrim(Ltrim(A.Slcode)))=0) and
(A.Refdt>=Convert(Datetime,''' + @SDt + ''',103) and A.Refdt<=Convert(Datetime,''' + @EDt + ''',103))
and A.Loccode=''' + @Loccode + ''' and (B.Subgroupcode<>''BANK'' or B.Subgroupcode<>''CASH'')
Union
Select Glcode,Trtype,Convert(Varchar,Max(Refdt),103) as Refdt,'' '' as Refno,Max(Narration) as Narration,Sum(Dr) as Dr,Sum(Cr) as Cr from
(Select A.Glcode,A.Trtype,A.Refdt,B.Gldesc as Narration,
CASE WHEN A.Drcrflag =''D'' THEN A.Tramt ELSE 0 END AS Dr, CASE WHEN A.Drcrflag =''C'' THEN A.Tramt ELSE 0 END AS Cr
from Trans_Journal,Glmast B
WHERE
(A.Glcode=B.Glcode and B.Cocode=''' + @Cocode + ''' and A.Refdt>=Convert(Datetime,''' + @SDt + ''',103)
and A.Refdt<=Convert(Datetime,''' + @EDt + ''' ,103)
and A.Loccode=''' + @Loccode + ''') and (B.Subgroupcode=''BANK'' or B.Subgroupcode=''CASH'')
Union
Select ''' + @CashGL + ''' as Glcode,Trtype,Refdt,''' + @Gldesc + ''' as Narration,
CASE WHEN Drcrflag =''C'' THEN Tramt ELSE 0 END AS Dr, CASE WHEN Drcrflag =''D'' THEN Tramt ELSE 0 END AS Cr
from Trans_Transnarr
WHERE (Trtype=''CPM'' or Trtype=''CRT'') and Loccode=''' + @Loccode + ''' and
Refdt>=Convert(Datetime,''' + @SDt + ''' ,103) and Refdt<=Convert(Datetime,''' + @EDt + ''',103)) TT
Group By Glcode,Trtype) X'

Set @MainSQry='Select Glcode,Trtype,Refdt,Refno,Narration,Dr,Cr Into #Gltmp from ('

Declare @Fullqry NVarchar(4000)

If @OP='WOB'
Begin
Set @TrnQry = @OpBalQry+@TrnQry
End

Set @FullQry = @MainSQry+@TrnQry

Exec sp_executesql @FullQry

Select Glcode,Trtype,Refdt,Refno,Narration,Ltrim(Rtrim(Str(Dr,14,2))) as Dr,Ltrim(Rtrim(Str(Cr,14,2))) as Cr from #Gltmp SQL2XML
Where Dr+Cr<>0 Order By Glcode,Trtype,Refdt,Refno for XML AUTO

Drop Table #Gltmp
GO

View 3 Replies View Related

Better Solution

Mar 28, 2008

hi,

i want to get following output:
id_order | type | number
-------------------------
1234 | A | 1
1235 |A | 0
1235 |B | 0
1236 |B | 1
1237 |C | 0
1237 |D | 0


create table tbl_order
(
id_order int
,type nvarchar(40)
)

insert into tbl_order (id_order, type) values (1234, 'A' )
insert into tbl_order (id_order, type) values (1235, 'A' )
insert into tbl_order (id_order, type) values (1235, 'B' )
insert into tbl_order (id_order, type) values (1236, 'B' )
insert into tbl_order (id_order, type) values (1237, 'C' )
insert into tbl_order (id_order, type) values (1237, 'D' )
insert into tbl_order (id_order, type) values (1238, 'A' )
insert into tbl_order (id_order, type) values (1239, 'D' )
insert into tbl_order (id_order, type) values (1239, 'B' )
insert into tbl_order (id_order, type) values (1239, 'A' )


select
id_order
,type
--,isnull(orderX,'') as number
,case when orderX > 1 then 1 else 0 end as number2
from tbl_order
left join (select t2.id_order as orderX
from tbl_order as t2
where
(select count(t1.id_order)
from tbl_order as t1
where
t1.id_order = t2.id_order) = 1
)as x
on tbl_order.id_order = x.orderX


Is there any better/faster select sentance to do this? i'm using sql2000.

thank you

View 1 Replies View Related

Possible Solution?

Mar 3, 2008

Hi, i am not sure if i can solve the problem with SSIS. I wanted do do it hardcoded with C# or so.

So, for my project I need to download zip-files on a daily-base. In these zip-files are xml-Files. And in these files is information stored for inserting or updating tables on a MS-SQL-Server.

So, my question, is it possible to solve that with SSIS? And if, is it easy to understand and to learn within a few days?

I haven't found good sources for information on how to get the data out of XML-Files.

View 18 Replies View Related

Any Solution For That?

Jun 15, 2006

I've got a .dts which load data to several Sql2k servers by Copy SQL Server Objects Task. I'd like to add another task for a Sql25k but I can't because of it's requesting SMO.

It seems that such task need DMO. I know that there are other ways for do such stuff in that DTS but I wonder if there is any trick or shortcut for to avoid this barrier.

View 1 Replies View Related

Please Help Me To Get A Solution I

Dec 26, 2007

Dear All expertise please help me

The following is the table structure of Holiday

EmployeeID(Integer)
HolidayFrom(date)
HolidayTo(date)

The following record exist in the table

EmployeeId HolidayFrfom Holidayto
-----------------------------------------------------------------------------------------------
5 25/12/2007 28/12/2007
1 02/01/2008 10/01/2008
2 03/01/2008 03/01/2008
3 25/01/2008 27/01/2008


I want a report to get the employee who did take the leave from the given date range. For example I am giving the date range as follows

Criteria for Report
----------------------------------
date from 03/01/2008
Date to 04/01/2008


When I given the date range as above two record have to be displayed . Because Employee 1 and 2 will be on leave on that date.

EmployeeId HolidayFrfom Holidayto
-----------------------------------------------------------------------------------------------
1 02/01/2008 10/01/2008
2 03/01/2008 03/01/2008

So please help me to find out an SQL to display the records from the given criteria of two date range



View 2 Replies View Related

What Is The Best Solution?

May 25, 2007

Hi all,

I think i have a quite specific problem that we have to resolve with replication. however, i don't know which type of replication to use and how to configure it for this:

To simplify the case a bit:
We have one central server which has a table Sales(id, shopid, article).
Also our 50 shops have the same table Sales(id, shopid, article).

spec 1:
When a shop sells an article, the row of the Sales table at the local shop has to be replicated to the central server. This way, the central server its Sales table has all sold articles from all shops.

spec2:
But now we have also an internet shop. All e-orders arrive immediately in the table Sales at the Central Serve with a specific shopid where the article will arrive. Now i have to find a way to replicate the new rows from the Central Server to the specific Shop.... Remark: the other shops should not have rows of other shops.

which type of replication would i use the best and how?

Thanks !

View 6 Replies View Related

Someone Must Have A Solution For

Feb 12, 2007

The encrypted value for the "LogonCred" configuration setting cannot be decrypted. (rsFailedToDecryptConfigInformation) (Microsoft.ReportingServices.Diagnostics)



Please: a step by step solution.

View 6 Replies View Related

Add New Database To Solution

Mar 20, 2006

I'm running VS 2005 Enterprise, and SQL Server 2005 Developer / workgroup edition.I'm trying to follow a few online examples to play around, and some of these examples require that you add a SQL DB to your solution by going:-right click on website-Add new Item-Add SQL DataBase.WHen I do that, I get the error that SQL Express isn't installed.  Now the question is, why would I want SQL Express installed when I have SQL server 2005 already installed? My Machine can support it, but it's sort of a waste when I need to run SQL Server 2000, SQL Server 2005 and then SQL Server express all at the same time.Any advice?

View 3 Replies View Related

MDX Query Solution

Jan 3, 2002

Dear All,

I'm new in SQL Server 2000. Anyone has a good materials or sites to recommend which talk about Multidimensional Expression? Especially MDX work in "Analysis Manager".

You information are highly appreaciate. Thanking you in advance.

View 1 Replies View Related

Scalable Solution??

Feb 24, 2005

can anyone please point me to any good links for scalable solutions in sql server..

thanks

View 1 Replies View Related

Set-based Solution

Mar 15, 2006

Thought I'd got my head round using a set-based approach but my brain's gone dead on this one


CREATE TABLE #mytable (SWID INT , T INT , DateA DATETIME , DateB DATETIME)

INSERT #mytable (swid , t , DateA , DateB)

SELECT 63967 , 1 , CAST('31-Mar-2006' AS DATETIME),CAST( '01-Aug-2006'AS DATETIME)
UNION ALL
SELECT 63967 , 1 , CAST('31-Mar-2006' AS DATETIME),CAST( '01-Feb-2007'AS DATETIME)
UNION ALL
SELECT 63967 , 0 , CAST('15-Mar-2006'AS DATETIME) , CAST('01-Aug-2006'AS DATETIME)
UNION ALL
SELECT 63967 , 0 , CAST('15-Mar-2006'AS DATETIME) , CAST('01-Feb-2007'AS DATETIME)
UNION ALL
SELECT 63967 , 9999 ,CAST( '28-Feb-2006'AS DATETIME) , CAST('01-Aug-2006'AS DATETIME)
UNION ALL
SELECT 63967 , 9999 ,CAST( '28-Feb-2006'AS DATETIME) , CAST('01-Feb-2007'AS DATETIME)
UNION ALL
SELECT 63967 , 9999 , CAST('31-Jan-2006'AS DATETIME) , CAST('01-Aug-2006'AS DATETIME)
UNION ALL
SELECT 63967 , 9999 ,CAST( '31-Jan-2006'AS DATETIME) , CAST('01-Feb-2007'AS DATETIME)
UNION ALL
SELECT 10051 , 1 ,CAST('31-Mar-2006'AS DATETIME) , CAST('01-Aug-2006'AS DATETIME)
UNION ALL
SELECT 10051 , 1 ,CAST( '31-Mar-2006'AS DATETIME) , CAST('01-Feb-2007'AS DATETIME)
UNION ALL
SELECT 10051 , 0 , CAST('15-Mar-2006' AS DATETIME), CAST('01-Aug-2006'AS DATETIME)
UNION ALL
SELECT 10051 , 0 , CAST('15-Mar-2006'AS DATETIME) , CAST( '01-Feb-2007'AS DATETIME)
UNION ALL
SELECT 10051 , 9999 ,CAST( '28-Feb-2006'AS DATETIME) ,CAST( '01-Aug-2006'AS DATETIME)
UNION ALL
SELECT 10051 , 9999 ,CAST( '28-Feb-2006'AS DATETIME) , CAST('01-Feb-2007'AS DATETIME)
UNION ALL
SELECT 10051 , 9999 ,CAST( '31-Jan-2006'AS DATETIME) , CAST('01-Aug-2006'AS DATETIME)
UNION ALL
SELECT 10051 , 9999 ,CAST( '31-Jan-2006'AS DATETIME), CAST('01-Feb-2007'AS DATETIME)
UNION ALL
SELECT 10051 , 9999 , CAST('31-Dec-2005'AS DATETIME) , CAST('01-Aug-2006'AS DATETIME)
UNION ALL
SELECT 10051 , 9999 ,CAST( '31-Dec-2005' AS DATETIME), CAST('01-Feb-2007' AS DATETIME)
UNION ALL
SELECT 10051 , 9999 ,CAST('30-Nov-2005'AS DATETIME) , CAST( '01-Aug-2006' AS DATETIME)
UNION ALL
SELECT 10051 , 9999 ,CAST( '30-Nov-2005' AS DATETIME), CAST('01-Feb-2007' AS DATETIME)
select * from #mytable order by SWID desc, DateA desc

The Columns where T values are 1 and 0 are OK having already been derived. I need to UPDATE the remaining rows from the Default T Value of 9999
to Decrementing values (starting at -1) commencing at the highest remaining (ie non 9999 T Value) DateA value and working 'backwards'
'grouping' on SWID

The DateB value is irrelevant for this purpose


The desired output is below with derived T values

SWIDTDateADateB
6396712006-03-31 00:00:00.0002006-08-01 00:00:00.000
6396712006-03-31 00:00:00.0002007-02-01 00:00:00.000
6396702006-03-15 00:00:00.0002006-08-01 00:00:00.000
6396702006-03-15 00:00:00.0002007-02-01 00:00:00.000
63967-12006-02-28 00:00:00.0002006-08-01 00:00:00.000
63967-12006-02-28 00:00:00.0002007-02-01 00:00:00.000
63967-22006-01-31 00:00:00.0002006-08-01 00:00:00.000
63967-22006-01-31 00:00:00.0002007-02-01 00:00:00.000
1005112006-03-31 00:00:00.0002006-08-01 00:00:00.000
1005112006-03-31 00:00:00.0002007-02-01 00:00:00.000
1005102006-03-15 00:00:00.0002006-08-01 00:00:00.000
1005102006-03-15 00:00:00.0002007-02-01 00:00:00.000
10051-12006-02-28 00:00:00.0002006-08-01 00:00:00.000
10051-12006-02-28 00:00:00.0002007-02-01 00:00:00.000
10051-22006-01-31 00:00:00.0002006-08-01 00:00:00.000
10051-22006-01-31 00:00:00.0002007-02-01 00:00:00.000
10051-32005-12-31 00:00:00.0002006-08-01 00:00:00.000
10051-32005-12-31 00:00:00.0002007-02-01 00:00:00.000
10051-42005-11-30 00:00:00.0002006-08-01 00:00:00.000
10051-42005-11-30 00:00:00.0002007-02-01 00:00:00.000


Thanks in advance

View 3 Replies View Related

Best Primary Key Solution?

Apr 4, 2006

Hi there,

Looking for a bit of help with my problem:

Say i have 3 tables-

tblClients
clientID (primary key identity/autonumber)
clientName (varchar 50)

tblCities
cityID (primary key identity/autonumber)
cityName (varchar 50)

tblClientsCities
ID (primary key identity/autonumber)
clientID (int)
cityID(int)


A client can be located in more than 1 city so i have tblClientsCities (think thats the right way to do it). Say i add a new client and the autonumber changes to "10" which is that client's identifier. How do i then add that identifier to tblClientsCities? I mean it could have been 3,7,205 absolutley anything.

I thought is would be easier to make up a unique key for each client with a script eg

client name: PJ Computers
Unique key Generated: PJCOMP58784

Now that the primary key is known in advance it can be added to tblClients and then tblClientCities. But! i was reading around and many seem to think primary key's like this will slow things down.

So my question is what's the best way of accomplishing this?

Any help would be much appreciated, thanks :)

View 1 Replies View Related

Backp Solution

Nov 9, 2006

Hi ,

What is the best Backup plan that can be give for a sql databse that is on a very high usage.
Will a six hour backup will decrease the performance of the SQL server...

Sipin

View 1 Replies View Related

Set Based Solution For ....

Jan 8, 2004

CREATE TABLE [Cube_fact_table] (
[ISIN_ID] [bigint] NOT NULL ,
[CLIMSTID] [bigint] NOT NULL ,
[HOLDID] [bigint] NOT NULL ,
[Quantity] [bigint] NULL ,
[Holding] [numeric](15, 0) NOT NULL ,
[Cost] [numeric](18, 3) NOT NULL ,
[Close_Price] [numeric](18, 3) NOT NULL ,
[Tran_Value] [bigint] NULL ,
[Date] [datetime] NULL ,
[UCOA] [bigint] NULL ,
[COA] [bigint] NULL
) ON [PRIMARY]
GO




INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('1', '1', '1', '2000', 2000, 170.100, 170.100, '340200', '11/28/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('1', '1', '3', '-1000', 1000, 185.500, 185.500, '-185500', '12/12/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '5', '48600', 48600, 225.000, 225.000, '10935000', '11/27/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '8', '-48575', 25, 243.000, 243.000, '-11803725', '12/4/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '9', '12575', 12600, 254.000, 254.000, '3194050', '12/5/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '10', '-12120', 480, 232.000, 232.000, '-2811840', '12/5/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '11', '12120', 12600, 219.000, 219.000, '2654280', '12/6/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '12', '-12120', 480, 265.000, 265.000, '-3211800', '12/6/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '13', '4261', 4741, 224.000, 224.000, '954464', '12/8/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '14', '9059', 13800, 223.000, 223.000, '2020157', '12/11/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '15', '10200', 24000, 233.000, 233.000, '2376600', '12/12/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '16', '-12188', 11812, 243.000, 243.000, '-2961684', '12/12/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '17', '12188', 24000, 234.000, 234.000, '2851992', '12/13/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '18', '-12188', 11812, 234.000, 234.000, '-2851992', '12/13/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '19', '788', 12600, 254.000, 254.000, '200152', '12/16/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '20', '8000', 20600, 223.000, 223.000, '1784000', '12/17/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '21', '-13754', 6846, 231.000, 231.000, '-3177174', '12/17/2003 12:00:00 AM', NULL, NULL)
INSERT [cube_fact_table] ([ISIN_ID], [CLIMSTID], [HOLDID], [Quantity], [Holding], [Cost], [Close_Price], [Tran_Value], [Date], [UCOA], [COA]) VALUES ('2', '1', '22', '10554', 17400, 245.000, 245.000, '2585730', '12/19/2003 12:00:00 AM', NULL, NULL)





Now what i want to do is this ...

UCOA is to be updated with the average of all previous transactions where the climstid and isin_id are the same.

example

take case where holdid(transaction no) in the sample data is 14.
What i need is a query which will sum up the data in the tran_value column upto holdid 5.

Again I need a set based solution. Gurus .. please help

View 3 Replies View Related

What Is The Best Backup Solution?

Mar 2, 2004

SQL Gurus,

What is the best backup solution?

Product:MS SQL 2000 Enterprise Edition
Environment:webserver

Goal:Off-site backup of database without onsite tech intervention

Obstacles:
* Webhost does not want SQL Server Agent running for fear of viruses
* Database is 3.4GB, LDF is 3.7GB, and a Full Backup is 3.1GB.

Connection / Access:Enterprise Manager, RDP and FTP all work to access data and backups.

I have looked into doing a full backup then differential backups, doing transaction replication, and log shipping. The client doesn't really need replication, he just wants to know that if his server with the production database goes up in flames he has a way of getting back in business without losing more than one day of data.

I am hoping there is a method of "restoring" on his off-site server the data that is "backed up" on the production server. Is that possible if we're doing differential backups?

Is that the best solution or is there a better way?

Thanks for any recommendations or advice,
Alec Sherman

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved