Showing posts with label edition. Show all posts
Showing posts with label edition. Show all posts

Wednesday, March 28, 2012

How to assign primary key or forign key to existing tables

Hi,

I am new to SQL server. I have one doubt.

I am using SQL server 2005 Express Edition

I have two tables which I created earlier. Now I need to coonect these tables using primary key and foreign key.
So how can I assign these PK and Fk to these tables?
Thanks in advance.
Siju George

Quote:

Originally Posted by sijugeo

Hi,

I am new to SQL server. I have one doubt.

I am using SQL server 2005 Express Edition

I have two tables which I created earlier. Now I need to coonect these tables using primary key and foreign key.
So how can I assign these PK and Fk to these tables?
Thanks in advance.
Siju George


Hi
You can do by searching in sql books online.
Ok......add primary key constraint on one column in one table using alter table add constraint.add refference constraint on one column in other table
example:
[code]

CREATE TABLE doc_exe ( column_a INT CONSTRAINT column_a_un UNIQUE) ;
GO
ALTER TABLE doc_exe ADD

-- Add a PRIMARY KEY identity column.
column_b INT IDENTITY
CONSTRAINT column_b_pk PRIMARY KEY,

-- Add a column that references another column in the same table.
column_c INT NULL
CONSTRAINT column_c_fk
REFERENCES doc_exe(column_a),

-- Add a column with a constraint to enforce that
-- nonnull data is in a valid telephone number format.
column_d VARCHAR(16) NULL
CONSTRAINT column_d_chk
CHECK
(column_d LIKE '[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]' OR
column_d LIKE
'([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]'),

-- Add a nonnull column with a default.
column_e DECIMAL(3,3)
CONSTRAINT column_e_default
DEFAULT .081 ;
GO
EXEC sp_help doc_exe ;
GO
DROP TABLE doc_exe ;
GOsql

How to Assign Identity Key values in Replication

This is a very basic question on replication.

I'm having a central Server with SQL Server 2005 Standard Edition and Other sites with Sql Express Server 2005.

Other sites will also be adding New records and data will be replicated to Central server and from there it will be distributed to all sites.

Question is that if Other sites are also adding Records how i can assing Identity values in those databases. There are few restricitons on this :-

1. I don't want to use GUID.

2. Numbers should be sequential that is after 1000, 1001, 1002 etc. should come.

i thought of adding Negative Values in the primary key on other sites and then when data is replicated on central server then replace it with sequential key but i'm not clear on how to accomplish this.

any help will be highly appreciable.

You can specify identity ranges. See books online topic "Replicating Identity Columns". You can also search books online for "replication identity" for a range of topics.|||

thanks for your reply.

i saw the topics which you have mentioned. As per my requirement i/o specify individual ranges i have to keep this Identity column in Sequence for all sites. so i will have to do this manually..

is it possible to point towards some code which does that as i'm sure this is a very common requirement and lot of people must have already written generic code to accomplish this.

Monday, March 19, 2012

How to add SQL 3.5 in Visual Studio prerequisites ?

Hi!

I want to deploy an application that require the SQL Server Compact Edition 3.5 to be installed..... and I want to deploy my application with ClickOnce!

But, the problem is that I can't select "SQL Server Compact Edition" in the prerequisites of the Visual Studio Project properties... ?

Do you have a solution ?

thx!

SQL Server Compact 3.5 pre-requisite shows up in Visual Studio 2008 Beta 2. The Beta 2 can be downloaded from

http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx

Regards

Ambrish

How to add SQL 3.5 in Visual Studio prerequisites ?

Hi!

I want to deploy an application that require the SQL Server Compact Edition 3.5 to be installed..... and I want to deploy my application with ClickOnce!

But, the problem is that I can't select "SQL Server Compact Edition" in the prerequisites of the Visual Studio Project properties... ?

Do you have a solution ?

thx!

SQL Server Compact 3.5 pre-requisite shows up in Visual Studio 2008 Beta 2. The Beta 2 can be downloaded from

http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx

Regards

Ambrish

Monday, March 12, 2012

How to add Full Text Search to SQL2005

Hi,
We have a server with SQL2005 Standard Edition installed. We did not install
Full Text Search and want to add it to the existing default instance. The
attempt to install it says it is already installed when we know that it is
not. Is this a known bug?
Thanks
Chris
Seems you have to give the actual instance name, MSSQL for the default,
before the install will happen.
Chris
"Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
news:%23TtGy7FIGHA.3000@.TK2MSFTNGP14.phx.gbl...
> Hi,
> We have a server with SQL2005 Standard Edition installed. We did not
> install Full Text Search and want to add it to the existing default
> instance. The attempt to install it says it is already installed when we
> know that it is not. Is this a known bug?
> Thanks
> Chris
>

How to add Full Text Search to SQL2005

Hi,
We have a server with SQL2005 Standard Edition installed. We did not install
Full Text Search and want to add it to the existing default instance. The
attempt to install it says it is already installed when we know that it is
not. Is this a known bug?
Thanks
ChrisSeems you have to give the actual instance name, MSSQL for the default,
before the install will happen.
Chris
"Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
news:%23TtGy7FIGHA.3000@.TK2MSFTNGP14.phx.gbl...
> Hi,
> We have a server with SQL2005 Standard Edition installed. We did not
> install Full Text Search and want to add it to the existing default
> instance. The attempt to install it says it is already installed when we
> know that it is not. Is this a known bug?
> Thanks
> Chris
>

Friday, March 9, 2012

How to add Full Text Search to SQL2005

Hi,
We have a server with SQL2005 Standard Edition installed. We did not install
Full Text Search and want to add it to the existing default instance. The
attempt to install it says it is already installed when we know that it is
not. Is this a known bug?
Thanks
ChrisSeems you have to give the actual instance name, MSSQL for the default,
before the install will happen.
Chris
"Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
news:%23TtGy7FIGHA.3000@.TK2MSFTNGP14.phx.gbl...
> Hi,
> We have a server with SQL2005 Standard Edition installed. We did not
> install Full Text Search and want to add it to the existing default
> instance. The attempt to install it says it is already installed when we
> know that it is not. Is this a known bug?
> Thanks
> Chris
>

Friday, February 24, 2012

How to activate licenses

I've just installed Workgroup Edition for the first time. I have copies on each of two servers, each ordered with five CALs.

My problem is that I don't know how to assign the licenses. I can't find anything in the documentation about it, nothing in the tools menus, and no reference to SQL Server in the Licensing application. The latter really looks like the right place, so if I had to guess, I'd think I've installed something incorrectly. Shouldn't SQL Server appear there as a product?

Of course, I'd also think this would be documented somewhere, but then it's probably one of those things that any idiot would know, so there's no need to explain it.

Once I get past that problem, I'll be setting up eight workstations. I understand from Microsoft Sales that since I've purchased a total of ten CALs, then all eight workstations will be able to access either server. Do I have to do anything special to make that work? Currently, there's no domain. The servers are just members of a workgroup.

Thanks,

Dick

There is no license 'manager', there is no 'place' to record the licenses. It is an 'honor' system. (Except for Small Business Server -which does have a license manager built it.)

Keep the license information on file in case your organization ever gets hit with a software license compliance audit.

Yes, since you now have 10 CALs, up to 10 client devices can connect to your servers.

In the future, for definitive answers to licensing questions, contact the friendly folks at:

Licensing –VL Contact
(800) 426-9400