Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts

Tuesday, March 20, 2012

can I connect asp 1 to sqlserver 2005

Hi All,
I hopen this isnt a stupid question but can I connect asp 1 to sqlserver 2005? i want to update the database used on a ASP.net 1 project, I seem to be able to get it to connect but cant get it to see the tables?
Thanks for any help
LeeHi,
Were you able to try the connection to an SQL 2000, or other DBMS DB? I'm not up to speed on SQL Server 2005 yet (and as it's still hasn't been released, you may be having a problem peculiar to the beta version. Try posting your connection string (with any sensative parts x'ed out), along with more info on the particulars of your project. It always helps to provide enough information. BRN..|||

Hi Brian,

Thanks for helping!.

the connection string I am using in the web config is
<add key="ConnectionString" value="Server=xxxxx\SQLEXPRESS; Network=DBMSSOCN; Database=xxxxxx; Uid=xxxxx; Pwd=xxxxxx;"/>
SqlConnection sqlConn = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
SqlDataAdapter xxxxx= new SqlDataAdapter(strSql, sqlConn);

The error I get is
Invalid object name 'tbBob'
I forgot to mention I am using sql server 2005 express
Lee

|||There are two possible reasons for that, one you are in SQL Server Express without the Express Manager installed and two you are in the developer edition without management studio installed. Both are separate install the management studio is under management tools. Try the link below to download what you need. Hope this helps.
http://forums.asp.net/1069636/ShowPost.aspx|||Hi Caddre,
I am confused sorry...I need express manager to run a web page?
The error I get is from a web page .. the database isnt even on the same machine?
Lee|||No you don't need Express manager to run web pages but you need Express manager to manage SQL Server Express and there is no need for the database to be on the same machine. I am sorry did not intend to confuse you. Try the link below for Microsoft provided SQL permissions tutorial. Hope this helps.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000010.asp

Can I change SQL Server name?

First. Usually, SQL Server name is equal to computer name. Can I change SQL
Server name? So example: My computer name is ADIW, But SQL Server name is
ALI.
Can I do like it?
Second. Can/may one computer have 2 SQL Server? If Can, So how to make it?Hi,
Login into sql server using Query Analyzer and execute below commands,
sp_dropserver <old server name>
go
sp_addserver <newserver name>,local
After this stop and start sql server service
2. From SQL 2000 onwards you can install 16 instances of sql server in the
same machine. Each of the installation is independant of itself.
First installation will be default and the rest will be of named
installation. For Named instances the server name will be prefixed with a
Name.
This will allow all the sql server services to run in parellel.
Thanks
Hari
SQL Server MVP
"Bpk. Adi Wira Kusuma" <adi_wira_kusuma@.yahoo.com.sg> wrote in message
news:eoXn92QVFHA.3444@.TK2MSFTNGP10.phx.gbl...
> First. Usually, SQL Server name is equal to computer name. Can I change
SQL
> Server name? So example: My computer name is ADIW, But SQL Server name is
> ALI.
> Can I do like it?
> Second. Can/may one computer have 2 SQL Server? If Can, So how to make it?
>|||1: http://www.karaszi.com/SQLServer/in...server_name.asp
2. Yes. Install several instances (run setup several times).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Bpk. Adi Wira Kusuma" <adi_wira_kusuma@.yahoo.com.sg> wrote in message
news:eoXn92QVFHA.3444@.TK2MSFTNGP10.phx.gbl...
> First. Usually, SQL Server name is equal to computer name. Can I change SQ
L
> Server name? So example: My computer name is ADIW, But SQL Server name is
> ALI.
> Can I do like it?
> Second. Can/may one computer have 2 SQL Server? If Can, So how to make it?
>sql

Sunday, March 11, 2012

Can groups be set up within SQL Server 2000?

We would like to create groups (like Windows OS Groups) strictly within SQL
Server. This would give us easier control over permissions of groups SQL
Server login accounts. Then we wouldn't have to maintain permissions on
many, many individual SQL Server logins.
I realize that we could give the same users permissions through Windows
"Local Users and Groups", but our current goal is to not give them Windows
user accounts--just SQL Server permissions.
Any ideas?
Thanks!
JimYou cannot create groups at the server level but you can at the DB level.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"Jim Moon" <please.reply@.group> wrote in message
news:uSBRYp8FGHA.3864@.tk2msftngp13.phx.gbl...
We would like to create groups (like Windows OS Groups) strictly within SQL
Server. This would give us easier control over permissions of groups SQL
Server login accounts. Then we wouldn't have to maintain permissions on
many, many individual SQL Server logins.
I realize that we could give the same users permissions through Windows
"Local Users and Groups", but our current goal is to not give them Windows
user accounts--just SQL Server permissions.
Any ideas?
Thanks!
Jim|||I see what you mean--create a role, add user(s) to that role, and assign
permission on database objects.
Thank you, Tom!
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:ejpLPG9FGHA.2040@.TK2MSFTNGP14.phx.gbl...
> You cannot create groups at the server level but you can at the DB level.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> "Jim Moon" <please.reply@.group> wrote in message
> news:uSBRYp8FGHA.3864@.tk2msftngp13.phx.gbl...
> We would like to create groups (like Windows OS Groups) strictly within
> SQL
> Server. This would give us easier control over permissions of groups SQL
> Server login accounts. Then we wouldn't have to maintain permissions on
> many, many individual SQL Server logins.
> I realize that we could give the same users permissions through Windows
> "Local Users and Groups", but our current goal is to not give them Windows
> user accounts--just SQL Server permissions.
> Any ideas?
> Thanks!
> Jim
>
>|||As long as it's a database role, yes.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"Jim Moon" <please.reply@.group> wrote in message
news:ezNEXM9FGHA.3080@.TK2MSFTNGP10.phx.gbl...
I see what you mean--create a role, add user(s) to that role, and assign
permission on database objects.
Thank you, Tom!
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:ejpLPG9FGHA.2040@.TK2MSFTNGP14.phx.gbl...
> You cannot create groups at the server level but you can at the DB level.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> "Jim Moon" <please.reply@.group> wrote in message
> news:uSBRYp8FGHA.3864@.tk2msftngp13.phx.gbl...
> We would like to create groups (like Windows OS Groups) strictly within
> SQL
> Server. This would give us easier control over permissions of groups SQL
> Server login accounts. Then we wouldn't have to maintain permissions on
> many, many individual SQL Server logins.
> I realize that we could give the same users permissions through Windows
> "Local Users and Groups", but our current goal is to not give them Windows
> user accounts--just SQL Server permissions.
> Any ideas?
> Thanks!
> Jim
>
>

Friday, February 24, 2012

can any one help in writing quries to sqlserver 2005 analysis service

I just want to calculate the measures using functions ie i want to calculate the YTD MTD and QTD . Can anyone help me out

Have you tried using the time intelligence wizard to do this? Depending on the service pack that you have it may not write the mose efficient MDX, but at least it should get you started.

Tuesday, February 14, 2012

Can a column data type be changed on a replicated table?

On sqlserver 2000 transactional replication:

How would I best go about changing a published table's column from smallint to int? I could not find anything about it in BOL or MS.com. I do not think EM/Replication Properties allows the change. I suspect I have to run "Alter Table/Column" on the Publisher and each Subscriber the old-fashioned way. Is that true?

Thanks!

In SQL 2000, the only way to do this is to drop the article column, make your change, then re-add the article column. You can do this via sp_repldropcolumn and sp_repladdcolumn. You can find more information about these two procs in Books Online. You can also drop the entire article, make your change, and re-add the article.

In SQL 2005, there's a lot of improvement in DDL so you can do ALTER TABLE directly on the article table.

|||

Greg Y wrote:

You can also drop the entire article, make your change, and re-add the article.

Note, that in some cases (for example, if you have anonymous pull subscriptions), dropping and re-adding entire article into publication may cause subscription become obsolete and requires reinitialization.