Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Friday, March 30, 2012

modify ALIAS SQL Server Name with SQL 2005

Hello,

I would like create/modify/update the alias SQL server name on the SQL 2005 version.

I had a database mirroring on one base, and when the primary server fail, i would like my secondary alias become as the primary. I need this because of the application whom use my SQL server.

I tried with

sp_dropserver <old_name>
GO
sp_addserver <new_name>, local
GO

But this way doesn't work...

Anyone got an idea to change alias SQL server in transact?

Thanks for your help!!!

Hello,

I've found my answer on this site

http://blogs.developpeur.org/christian/archive/2006/11/04/SQL-Server-_3A00_-Alias-de-serveurs.aspx

We can change the alias SQL Server 2005 directly in the registry.

See u ;)

modify ALIAS SQL Server Name with SQL 2005

Hello,

I would like create/modify/update the alias SQL server name on the SQL 2005 version.

I had a database mirroring on one base, and when the primary server fail, i would like my secondary alias become as the primary. I need this because of the application whom use my SQL server.

I tried with

sp_dropserver <old_name>
GO
sp_addserver <new_name>, local
GO

But this way doesn't work...

Anyone got an idea to change alias SQL server in transact?

Thanks for your help!!!

Hello,

I've found my answer on this site

http://blogs.developpeur.org/christian/archive/2006/11/04/SQL-Server-_3A00_-Alias-de-serveurs.aspx

We can change the alias SQL Server 2005 directly in the registry.

See u ;)

sql

Modified Date For Stored Procedures

In SQL Server is there a way to know when a procedure was last
modified? I only see the "Create Date" column on the Enterprise
Manager.

Thanks Experts!jjone99 (jjone99@.hotmail.com) writes:
> In SQL Server is there a way to know when a procedure was last
> modified? I only see the "Create Date" column on the Enterprise
> Manager.

No, in SQL 2000 there is not.

This is addressed in the next version of SQL Server, currently in beta.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Wednesday, March 28, 2012

moderate sql procedure question

In SQL Server 20:

Lets say I have a table for address. I create a stored procedure to update any value in the database, i.e.:

CREATE PROCEDURE [SP_UPDATE_T_Site]
(
@.old_I_SiteID bigint,
@.new_V_SiteName varchar(50),
@.new_V_Address1 varchar(50),
@.new_V_Address2 varchar(50),
@.new_V_Address3 varchar(50),
@.new_V_TownCity varchar(50),
@.new_I_RegionID bigint,
@.new_V_Postcode varchar(10)
)
AS
UPDATE T_Sites SET
[V_SiteName] = @.new_V_SiteName,
[V_Address1] = @.new_V_Address1,
[V_Address2] = @.new_V_Address2,
[V_Address3] = @.new_V_Address3,
[V_TownCity] = @.new_V_TownCity,
[I_RegionID] =@.new_I_RegionID ,
[V_PostCode] = @.new_V_Postcode
WHERE
I_SiteID= @.old_I_SiteID

GO


Now, lets say that the user only changes one value, e.g. Address1. Is is possible to only get this one value to update instead of passing all the values back and updating them all, i.e.:

EXEC SP_UPDATE_T_Site @.I_SiteID='2', @.Address1="...."


I know I can set default values and check these, but this would be too much work for the ammount of tables I have. Is there an easy way of doing this?

jagdipa wrote:

In SQL Server 20:

Lets say I have a table for address. I create a stored procedure to update any value in the database, i.e.:

CREATE PROCEDURE [SP_UPDATE_T_Site]
(
@.old_I_SiteID bigint,
@.new_V_SiteName varchar(50),
@.new_V_Address1 varchar(50),
@.new_V_Address2 varchar(50),
@.new_V_Address3 varchar(50),
@.new_V_TownCity varchar(50),
@.new_I_RegionID bigint,
@.new_V_Postcode varchar(10)
)
AS
UPDATE T_Sites SET
[V_SiteName] = @.new_V_SiteName,
[V_Address1] = @.new_V_Address1,
[V_Address2] = @.new_V_Address2,
[V_Address3] = @.new_V_Address3,
[V_TownCity] = @.new_V_TownCity,
[I_RegionID] =@.new_I_RegionID ,
[V_PostCode] = @.new_V_Postcode
WHERE
I_SiteID= @.old_I_SiteID

GO


Now, lets say that the user only changes one value, e.g. Address1. Is is possible to only get this one value to update instead of passing all the values back and updating them all, i.e.:

EXEC SP_UPDATE_T_Site @.I_SiteID='2', @.Address1="...."


I know I can set default values and check these, but this would be too much work for the ammount of tables I have. Is there an easy way of doing this?


hi jagdipa,
we're on the same situation on that one, I've decided since then to use ado.net to update optional data, and use only stored procs if the data to be update/inserted is consistent; meaning it updates all column and not a few...

|||Once approach you could try is this:

CREATE PROCEDURE [SP_UPDATE_T_Site]
(
@.old_I_SiteID bigint,
@.new_V_SiteName varchar(50) = NULL,
@.new_V_Address1 varchar(50) = NULL,
@.new_V_Address2 varchar(50) = NULL,
@.new_V_Address3 varchar(50) = NULL,
@.new_V_TownCity varchar(50) = NULL,
@.new_I_RegionID bigint = NULL,
@.new_V_Postcode varchar(10) = NULL
)
AS
UPDATE T_Sites SET
[V_SiteName] = ISNULL(@.new_V_SiteName,[V_SiteName]),
[V_Address1] = ISNULL(@.new_V_Address1,[V_Address1]),
[V_Address2] = ISNULL(@.new_V_Address2,[V_Address2]),
[V_Address3] = ISNULL(@.new_V_Address3,[V_Address3]),
[V_TownCity] = ISNULL(@.new_V_TownCity,[V_TownCity]),
[I_RegionID] = ISNULL(@.new_I_RegionID,[I_RegionID]),
[V_PostCode] = ISNULL(@.new_V_Postcode,[V_PostCode])
WHERE
I_SiteID= @.old_I_SiteID

GO


|||good one terry, i've used default values before but never thought on this implementation.. sweet..Wink [;)]|||

Why is it not convenient to pass all the values in? How are you calling the Stored Proc?

If you use an Address object with Save method that calls the stored Proc, it should not be an issue to pass all the values to the Proc because all the values should be loaded into the instance of the Adress object that is calling Save.

|||

meantown2 wrote:

Why is it not convenient to pass all the values in? How are you calling the Stored Proc?

If you use an Address object with Save method that calls the stored Proc, it should not be an issue to pass all the values to the Proc because all the values should be loaded into the instance of the Adress object that is calling Save.

hi meantown, the poster wants to update only a selected column, if he/she is going to pass all values he might update columns he doesn't want to update. The reply of terry will prevent him/her from doing that, passing only selected parameters.Smile [:)]

|||The reason I asked this was not really for this stored procedure (I just used this one for an easy example).

I have a B2B website where there are a lot of text fields on one webform. The data entered could grow. To try to improve effieciecy, I wanted to only pass the values that have changed.

This does mean a little extra work on the webform though. I will have to go through each value and check if it has changed.

So that leads me to my next question (this is a hard question to put down in writing, but I've tried my best to put my point across):

Lets say I have loaded the old values into a webform.
Then the user changes some of these and hits Save.
Now I need to check whether the values have changed. I could do this by comparing the values against the ones in the database - but this means an extra database access to retrieve the old values. Is there a way I can use the viewstate and somehow compare the values entered by the user against the ones stored in the viewstate?

Note: I dont want to put a load of invisible input fields everywhere and save the old values in that.

Thanks in advance for any help.

Jagdip

Modelling Time Span with OLAP tools

This is more of a design question. I am trying to create a fact table for ti
me spans. For example an order might go through the following status of Crea
ted, In-Progress, Delivered. The time span between any 2 states could range
from minutes to days to mon
ths. I want to be able to see the current status and also the status as of l
ast month, or last quarter or some other previous date.
Some of the recommendations by extert sites are to have a date in your fact
table for each status accompained by a field
for storing a value 1. So the order fact by look like
Order Id
Order Create Date
Order Created Value
Order In-Progress Date
Order In-Progress Value
Order Delivered Date
Order Delivered Value
Also I am creating my own time dimension. The above approach will work very
well when you use SQLs to access your star schema, but I am not so sure this
approach will work for olap tools like MSAS.
Is there an alternative?
ThanksWhat you have here looks like an accumulating snapshot fact table. These
are best employed IMHO where you have a business process/relatively short
with milestones which you want to track.
It means that you have less rows in your fact table but that you will
revisit the row to perform UPDATEs, something not typically done.
This type of fact table is good for measuring time lags between business
processes i.e.
Time from Order -> Sale
Time from Sale -> Ship
The way I do this is to create a view over the top of the fact table which
calculates these figures for me. This way i can then use it as a measure
just like any other. I usually do it to difference in hours.
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Break It" <anonymous@.discussions.microsoft.com> wrote in message
news:13CB4DFA-500D-4268-B850-5EE207F917CD@.microsoft.com...
> This is more of a design question. I am trying to create a fact table for
time spans. For example an order might go through the following status of
Created, In-Progress, Delivered. The time span between any 2 states could
range from minutes to days to months. I want to be able to see the current
status and also the status as of last month, or last quarter or some other
previous date.
> Some of the recommendations by extert sites are to have a date in your
fact table for each status accompained by a field
> for storing a value 1. So the order fact by look like
> Order Id
> Order Create Date
> Order Created Value
> Order In-Progress Date
> Order In-Progress Value
> Order Delivered Date
> Order Delivered Value
> Also I am creating my own time dimension. The above approach will work
very well when you use SQLs to access your star schema, but I am not so sure
this approach will work for olap tools like MSAS.
> Is there an alternative?
> Thanks

Model Designer - ODBC Data Source

I want to create a Model against an ODBC data source.

This is not possible in the June CTP.

Will this facility be available in a future release?

Thanks,
JoeI've raised this as a call with Microsoft through our Partner Program.

Will post the result here when I get an answer.|||As promised here is Microsoft's reply:

Please find the answers to your queries below:

Query:

=======

You want to be able to create an Ad-hoc Report Model using the Model Designer in Visual Studio 2005.

You want to be able to use an ODBC data source for this model - currently the only option is to use the “SQL Client Data Provider”.

So you need to know whether this will be addressed in the final release of SQL Server 2005 (or any CTPs of SQL Server 2005 before then).

Solution:

==========

As of now only SQL and Analysis Services are directly supported as a data source for Report Builder.

However you can connect to the ODBC data source using SQL or Analysis Services. We have the following two ways to get this working:

Option I:

-

UDM (Unified Dimensional Model) is essentially a way that SQL Analysis Services 2005 can combine multiple sources of data into one model. Let’s say your “Sales” information is one an Oracle data store, your “HR” info is in SQL, and your “Inventory” is in DB2 – You would build a UDM which includes all three of these data sources, and then you could report against the UDM as if ALL of the information lived inside Analysis Services.

So, by using a UDM to point to the ODBC data source, you enable Report Builder to get at the data too, since Report Builder CAN report against Analysis Services.

Option II:

--

You could try this but the performance expected is not very good with this option:

1. create linked servers in order to reference the ODBC (or other) data sources

2. create a layer of views in a SQL Server database accessing the other database through the linked server mechanism. You could use just simple views to expose the contents of the underlying tables with 'select *'. For example:
create view MyODBCTableView as select * from LinkedServerName..SchemaOwner.TableX

3. build SQL Server views on top of these views as desired

4. build the Report Model against these SQL Views

5. use Report Builder to query the OBDC data source through this 'proxy'

The following link is useful for more information and resources on SQL Server 2005:

http://www.microsoft.com/uk/partner/sol_and_products/servers/sql/

|||Unfortunately the chaps from Partner Tech Support were misinformed.

This is a reply from MSAS newsgroup :

AS2005 is not going to support ODBC data source. However, you can try to
create a data source in SSIS project. Then, add the data source into new AS
project. You should be able to create DSV, cube and dimension, etc.

However, since this feature is not supported. Believe that this area has not
been tested enough and this may break engine or not working probably. It is
"AS IS" if you really want to use it.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

Ken Kwok
SQL Server Analysis Services

model databases

Hi,

When i create a new table in Model database how can i automatically create table in other user databeses. Thanks for your answers

FYI, any object you create in the model databas will be automatically created in any user database you create in the future. So say, you create a table named Table1 in your model database, there will be a table named Table1 in all the user databases you create after that|||

The model database is the mold for future databases that are created. There is no mechanism in place to have other databases "inherit" the structures that are put into model after the database is created.

You would want to either A. Run the create script yourself in existing databases or B. Write a tool to cursor through all databases (possibly using sp_MSforeachdb, which is undocumented, but you can find an abundence of info on the web) and create the objects like that.

I would build something in a UI tool that logs your actions personally, as you should need to do this in dev, test, preprod, and/or prod at some time.

Model Database Status is 1073741824

After upgrade SQL Server 7 to SQL Server 2000, the model database status bec
omes 1073741824. What does it mean? I can create a new database in this stat
us. How do I change it?
Thanks
Walter> After upgrade SQL Server 7 to SQL Server 2000, the model database status
becomes 1073741824. What does it mean?
From the SQL Server 2000 Books Online
<herf="tsqlref.chm::/ts_sys-d_5xrn.htm">, 1073741824 = cleanly shutdown.

> I can create a new database in this status. How do I change it?
I don't understand this part of your question. Please elaborate.
Hope this helps.
Dan Guzman
SQL Server MVP
"Walter" <Walter@.discussions.microsoft.com> wrote in message
news:E1EE009E-34CB-4681-935C-1B30B6DF1B52@.microsoft.com...
> After upgrade SQL Server 7 to SQL Server 2000, the model database status
becomes 1073741824. What does it mean? I can create a new database in this
status. How do I change it?
> Thanks
> Walter|||After upgrade SQL Server from 7 to 2000, the server looks fine and I can cre
ate new database. However,the model database status is 1073741824 (cleanly s
hutdown) (before update SQL Server, the status is 0). It is a problem? Can I
say the upgrade is success
ful? Can I change the status and how to do?
"Dan Guzman" wrote:

> becomes 1073741824. What does it mean?
> From the SQL Server 2000 Books Online
> <herf="tsqlref.chm::/ts_sys-d_5xrn.htm">, 1073741824 = cleanly shutdown.
>
> I don't understand this part of your question. Please elaborate.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Walter" <Walter@.discussions.microsoft.com> wrote in message
> news:E1EE009E-34CB-4681-935C-1B30B6DF1B52@.microsoft.com...
> becomes 1073741824. What does it mean? I can create a new database in this
> status. How do I change it?
>
>|||Yes, this is a normal status for the model database. My test server, a new
SQL 2000 install, has status 1073741824.
Hope this helps.
Dan Guzman
SQL Server MVP
"Walter" <Walter@.discussions.microsoft.com> wrote in message
news:AEE3D7B1-3FD3-4BC8-A656-25BC7F1E1382@.microsoft.com...
> After upgrade SQL Server from 7 to 2000, the server looks fine and I can
create new database. However,the model database status is 1073741824
(cleanly shutdown) (before update SQL Server, the status is 0). It is a
problem? Can I say the upgrade is successful? Can I change the status and
how to do?[vbcol=seagreen]
> "Dan Guzman" wrote:
>
status[vbcol=seagreen]
status[vbcol=seagreen]
this[vbcol=seagreen]sql

Model Database Status is 1073741824

After upgrade SQL Server 7 to SQL Server 2000, the model database status becomes 1073741824. What does it mean? I can create a new database in this status. How do I change it?
Thanks
Walter> After upgrade SQL Server 7 to SQL Server 2000, the model database status
becomes 1073741824. What does it mean?
From the SQL Server 2000 Books Online
<herf="tsqlref.chm::/ts_sys-d_5xrn.htm">, 1073741824 = cleanly shutdown.
> I can create a new database in this status. How do I change it?
I don't understand this part of your question. Please elaborate.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Walter" <Walter@.discussions.microsoft.com> wrote in message
news:E1EE009E-34CB-4681-935C-1B30B6DF1B52@.microsoft.com...
> After upgrade SQL Server 7 to SQL Server 2000, the model database status
becomes 1073741824. What does it mean? I can create a new database in this
status. How do I change it?
> Thanks
> Walter|||After upgrade SQL Server from 7 to 2000, the server looks fine and I can create new database. However,the model database status is 1073741824 (cleanly shutdown) (before update SQL Server, the status is 0). It is a problem? Can I say the upgrade is successful? Can I change the status and how to do?
"Dan Guzman" wrote:
> > After upgrade SQL Server 7 to SQL Server 2000, the model database status
> becomes 1073741824. What does it mean?
> From the SQL Server 2000 Books Online
> <herf="tsqlref.chm::/ts_sys-d_5xrn.htm">, 1073741824 = cleanly shutdown.
> > I can create a new database in this status. How do I change it?
> I don't understand this part of your question. Please elaborate.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Walter" <Walter@.discussions.microsoft.com> wrote in message
> news:E1EE009E-34CB-4681-935C-1B30B6DF1B52@.microsoft.com...
> > After upgrade SQL Server 7 to SQL Server 2000, the model database status
> becomes 1073741824. What does it mean? I can create a new database in this
> status. How do I change it?
> >
> > Thanks
> > Walter
>
>|||Yes, this is a normal status for the model database. My test server, a new
SQL 2000 install, has status 1073741824.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Walter" <Walter@.discussions.microsoft.com> wrote in message
news:AEE3D7B1-3FD3-4BC8-A656-25BC7F1E1382@.microsoft.com...
> After upgrade SQL Server from 7 to 2000, the server looks fine and I can
create new database. However,the model database status is 1073741824
(cleanly shutdown) (before update SQL Server, the status is 0). It is a
problem? Can I say the upgrade is successful? Can I change the status and
how to do?
> "Dan Guzman" wrote:
> > > After upgrade SQL Server 7 to SQL Server 2000, the model database
status
> > becomes 1073741824. What does it mean?
> >
> > From the SQL Server 2000 Books Online
> > <herf="tsqlref.chm::/ts_sys-d_5xrn.htm">, 1073741824 = cleanly shutdown.
> >
> > > I can create a new database in this status. How do I change it?
> >
> > I don't understand this part of your question. Please elaborate.
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> > "Walter" <Walter@.discussions.microsoft.com> wrote in message
> > news:E1EE009E-34CB-4681-935C-1B30B6DF1B52@.microsoft.com...
> > > After upgrade SQL Server 7 to SQL Server 2000, the model database
status
> > becomes 1073741824. What does it mean? I can create a new database in
this
> > status. How do I change it?
> > >
> > > Thanks
> > > Walter
> >
> >
> >

Model Database Status is 1073741824

After upgrade SQL Server 7 to SQL Server 2000, the model database status becomes 1073741824. What does it mean? I can create a new database in this status. How do I change it?
Thanks
Walter
> After upgrade SQL Server 7 to SQL Server 2000, the model database status
becomes 1073741824. What does it mean?
From the SQL Server 2000 Books Online
<herf="tsqlref.chm::/ts_sys-d_5xrn.htm">, 1073741824 = cleanly shutdown.

> I can create a new database in this status. How do I change it?
I don't understand this part of your question. Please elaborate.
Hope this helps.
Dan Guzman
SQL Server MVP
"Walter" <Walter@.discussions.microsoft.com> wrote in message
news:E1EE009E-34CB-4681-935C-1B30B6DF1B52@.microsoft.com...
> After upgrade SQL Server 7 to SQL Server 2000, the model database status
becomes 1073741824. What does it mean? I can create a new database in this
status. How do I change it?
> Thanks
> Walter
|||After upgrade SQL Server from 7 to 2000, the server looks fine and I can create new database. However,the model database status is 1073741824 (cleanly shutdown) (before update SQL Server, the status is 0). It is a problem? Can I say the upgrade is success
ful? Can I change the status and how to do?
"Dan Guzman" wrote:

> becomes 1073741824. What does it mean?
> From the SQL Server 2000 Books Online
> <herf="tsqlref.chm::/ts_sys-d_5xrn.htm">, 1073741824 = cleanly shutdown.
>
> I don't understand this part of your question. Please elaborate.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Walter" <Walter@.discussions.microsoft.com> wrote in message
> news:E1EE009E-34CB-4681-935C-1B30B6DF1B52@.microsoft.com...
> becomes 1073741824. What does it mean? I can create a new database in this
> status. How do I change it?
>
>
|||Yes, this is a normal status for the model database. My test server, a new
SQL 2000 install, has status 1073741824.
Hope this helps.
Dan Guzman
SQL Server MVP
"Walter" <Walter@.discussions.microsoft.com> wrote in message
news:AEE3D7B1-3FD3-4BC8-A656-25BC7F1E1382@.microsoft.com...
> After upgrade SQL Server from 7 to 2000, the server looks fine and I can
create new database. However,the model database status is 1073741824
(cleanly shutdown) (before update SQL Server, the status is 0). It is a
problem? Can I say the upgrade is successful? Can I change the status and
how to do?[vbcol=seagreen]
> "Dan Guzman" wrote:
status[vbcol=seagreen]
status[vbcol=seagreen]
this[vbcol=seagreen]

Monday, March 26, 2012

Model Builder Field Order and Inheritance

When I create a report model, it is easy to change the order in a given entity. Does anyone know how to order the fields in an entity when you are using inheritance or inlining? I want to have the fields in alphabetical order so that the end user doesn't have to hunt for the correct field.

The other item I need to find out is how to customize the prefixes that inlining uses. Any ideas there?

Ron

Specifying field order across entities is not supported in this release. One thing you can do to mitigate this is use field folders so the user has a "tree" to search instead of a long list that is not ordered very well. In the case of inlining, you can actually place the role in a folder by itself, and all its fields will show up there when the role is expanded.

By "prefixes" I assume you mean the contextual naming that is applied based on the Role.ContextualName and Attribute.ContextualName properties. These are the mechanism for controlling this behavior.

Hope this helps!

|||

That was right on the money with both of the questions. That folder trick is really helpful in cleaning up some seriously unmanageable lists of fields.

R

sql

Wednesday, March 21, 2012

Mixed Mode vs. Windows Authentication

I am trying to create a query that can determine if a user id is using mixed mode/windows/both authentication. I need to do this so that it can run on both sql server 2000 and 2005, meaning I can't use any of the sys.* views. Is there a single query could use for both systems?
-Kyle

Hi kschlap,

there is no method for your issue.

but maybe you can try to build a view to select cross these 2 servers.

create view v_loginid_info

as

select 'servname'='mssql2k', loginid

from mssql2k.master.dbo.sysprocesses

union all

select 'servname'='mssql2k05', loginid

from mssql2k05.master.sys.sysprocess

try to think about.

hoping this can help you.

Best Regrads,

Hunt.

|||I have found the query...

select name, is_policy_checked
from sys.sql_logins

When I use this query, it doesn't pick up the windows authenticated users. Is there a way to get it to pick up all users?
-Kyle|||

How about something like this:

select name, isntuser from syslogins

isntuser=1 means Windows authentication

isntuser=0 means SQL Server authentication

Ben

sql

Monday, March 19, 2012

mixed & windows authentication

Hi,
i am confused by the windows & mixed mode authentication
Under Windows Authentication , do i need to create a login
in SQL server ?
thks & rdgs
Hi,
Under Windows Authentication , do i need to create a login in SQL server ?
No need to create a login in SQL server if you are using in Windows
Authentication, Instead you just grant permission to Windows user or group
account to connect to Microsoft SQL Server ( refer sp_grantlogin in books
online) . But while allowing the access automatically a entry will put in to
SYSXLOGINS system table in Master database. All the User policies / Password
policies like password expiration, Password length , password
combination,... will be maintained by OS itself.
Windows Authentication:-
Only Windows users/groups will be able to connect to SQL Server.
Mixed Authentication:
Mixed Mode allows users to connect to an instance of SQL Server, through
either a Windows user account
or a SQL Server login.
Thanks
Hari
MCDBA
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:796801c4843b$fcf94cf0$a601280a@.phx.gbl...
> Hi,
> i am confused by the windows & mixed mode authentication
> Under Windows Authentication , do i need to create a login
> in SQL server ?
> thks & rdgs
|||thks Hari
>--Original Message--
>Hi,
>Under Windows Authentication , do i need to create a
login in SQL server ?
>No need to create a login in SQL server if you are using
in Windows
>Authentication, Instead you just grant permission to
Windows user or group
>account to connect to Microsoft SQL Server ( refer
sp_grantlogin in books
>online) . But while allowing the access automatically a
entry will put in to
>SYSXLOGINS system table in Master database. All the User
policies / Password
>policies like password expiration, Password length ,
password
>combination,... will be maintained by OS itself.
>Windows Authentication:-
>Only Windows users/groups will be able to connect to SQL
Server.
>Mixed Authentication:
>Mixed Mode allows users to connect to an instance of SQL
Server, through
>either a Windows user account
>or a SQL Server login.
>Thanks
>Hari
>MCDBA
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:796801c4843b$fcf94cf0$a601280a@.phx.gbl...
authentication[vbcol=seagreen]
login
>
>.
>

mixed & windows authentication

Hi,
i am confused by the windows & mixed mode authentication
Under Windows Authentication , do i need to create a login
in SQL server ?
thks & rdgsHi,
Under Windows Authentication , do i need to create a login in SQL server ?
No need to create a login in SQL server if you are using in Windows
Authentication, Instead you just grant permission to Windows user or group
account to connect to Microsoft SQL Server ( refer sp_grantlogin in books
online) . But while allowing the access automatically a entry will put in to
SYSXLOGINS system table in Master database. All the User policies / Password
policies like password expiration, Password length , password
combination,... will be maintained by OS itself.
Windows Authentication:-
Only Windows users/groups will be able to connect to SQL Server.
Mixed Authentication:
Mixed Mode allows users to connect to an instance of SQL Server, through
either a Windows user account
or a SQL Server login.
Thanks
Hari
MCDBA
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:796801c4843b$fcf94cf0$a601280a@.phx.gbl...
> Hi,
> i am confused by the windows & mixed mode authentication
> Under Windows Authentication , do i need to create a login
> in SQL server ?
> thks & rdgs|||thks Hari
>--Original Message--
>Hi,
>Under Windows Authentication , do i need to create a
login in SQL server ?
>No need to create a login in SQL server if you are using
in Windows
>Authentication, Instead you just grant permission to
Windows user or group
>account to connect to Microsoft SQL Server ( refer
sp_grantlogin in books
>online) . But while allowing the access automatically a
entry will put in to
>SYSXLOGINS system table in Master database. All the User
policies / Password
>policies like password expiration, Password length ,
password
>combination,... will be maintained by OS itself.
>Windows Authentication:-
>Only Windows users/groups will be able to connect to SQL
Server.
>Mixed Authentication:
>Mixed Mode allows users to connect to an instance of SQL
Server, through
>either a Windows user account
>or a SQL Server login.
>Thanks
>Hari
>MCDBA
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message
>news:796801c4843b$fcf94cf0$a601280a@.phx.gbl...
authentication[vbcol=seagreen]
login[vbcol=seagreen]
>
>.
>

mixed & windows authentication

Hi,
i am confused by the windows & mixed mode authentication
Under Windows Authentication , do i need to create a login
in SQL server ?
thks & rdgsHi,
Under Windows Authentication , do i need to create a login in SQL server ?
No need to create a login in SQL server if you are using in Windows
Authentication, Instead you just grant permission to Windows user or group
account to connect to Microsoft SQL Server ( refer sp_grantlogin in books
online) . But while allowing the access automatically a entry will put in to
SYSXLOGINS system table in Master database. All the User policies / Password
policies like password expiration, Password length , password
combination,... will be maintained by OS itself.
Windows Authentication:-
Only Windows users/groups will be able to connect to SQL Server.
Mixed Authentication:
Mixed Mode allows users to connect to an instance of SQL Server, through
either a Windows user account
or a SQL Server login.
Thanks
Hari
MCDBA
"maxzsim" <anonymous@.discussions.microsoft.com> wrote in message
news:796801c4843b$fcf94cf0$a601280a@.phx.gbl...
> Hi,
> i am confused by the windows & mixed mode authentication
> Under Windows Authentication , do i need to create a login
> in SQL server ?
> thks & rdgs|||thks Hari
>--Original Message--
>Hi,
>Under Windows Authentication , do i need to create a
login in SQL server ?
>No need to create a login in SQL server if you are using
in Windows
>Authentication, Instead you just grant permission to
Windows user or group
>account to connect to Microsoft SQL Server ( refer
sp_grantlogin in books
>online) . But while allowing the access automatically a
entry will put in to
>SYSXLOGINS system table in Master database. All the User
policies / Password
>policies like password expiration, Password length ,
password
>combination,... will be maintained by OS itself.
>Windows Authentication:-
>Only Windows users/groups will be able to connect to SQL
Server.
>Mixed Authentication:
>Mixed Mode allows users to connect to an instance of SQL
Server, through
>either a Windows user account
>or a SQL Server login.
>Thanks
>Hari
>MCDBA
>
>"maxzsim" <anonymous@.discussions.microsoft.com> wrote in
message
>news:796801c4843b$fcf94cf0$a601280a@.phx.gbl...
>> Hi,
>> i am confused by the windows & mixed mode
authentication
>> Under Windows Authentication , do i need to create a
login
>> in SQL server ?
>> thks & rdgs
>
>.
>

Monday, March 12, 2012

Missing system stored procedures

When I create a new database, the system stored procedures are missing;
dt_addtosourcecontrol_u
dt_checkinobject_u
etc.
I'm logged in as sa.Is that the only 2?

I've never used them before...but the appear in all the databases I've created.

What version are you using?

And can you see them in master?|||Those procedures are magically created by Enterprise Manager, as far as I can tell. Even if you are logged into EM as someone with no create procedure rights. I would not worry over them, unless you have errors. You may need to apply a service pack to the client, at worst.|||Whatdya know...I gotta script that for often...it's the only thing I don't script

CREATE DATABASE [myDB99]
ON (NAME = N'myDB99'
, FILENAME = N'd:\database\njros1d151dev\MSSQL$NJROS1D151DEV\da ta\myDB99.mdf'
, SIZE = 209, FILEGROWTH = 10%)
LOG ON (NAME = N'myDB99_log', FILENAME = N'd:\database\njros1d151dev\MSSQL$NJROS1D151DEV\da ta\myDB99.ldf'
, SIZE = 61
, FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
GO|||These procs are created automagically when you use the database diagrams feature in EM. These procedures have something to do with the creation of the diagrams (though i do not exactly know what).

I would not worry about them ... i have not ever seen anybody use them ... except the Enterprise Manager.|||I thought they had more to do with Visual Source Safe then with the DB Diagram feature...

Friday, March 9, 2012

Missing results from stored proc

ok...I must be blind.
I have this procedure (which I didn't write):
CREATE PROCEDURE dbo.spWebqryAccountList41257
(@.StartDate nvarchar(15)
,@.EndDate nvarchar(15)
,@.ClientID int
,@.ArpCode nvarchar(15)
,@.brchid nvarchar(5)
,@.username nvarchar(10)
)
AS
SELECT *
FROM
dbo.vwWebClaimDetailNext4
WHERE
([Date Handled] between @.StartDate AND @.EndDate)
AND ([Client ID] = @.ClientID)
and ARPCODE in (@.ArpCode)
and BranchID = @.brchid
and username = @.username
Note that all it is doing is selecting from a view and narrowing the results
I have two executions:
EXEC spWebqryAccountList41257
@.StartDate = '2/1/2006',
@.EndDate = '3/3/2006',
@.ClientID = 2287,
@.ARPCode = 'A',
@.BrchID = 'A#79',
@.Username = 'ME2287'
Result = 4 records
EXEC spWebqryAccountList41257
@.StartDate = '2/1/2006',
@.EndDate = '3/3/2006',
@.ClientID = 2287,
@.ARPCode = 'A',
@.BrchID = 'Mil#104',
@.Username = 'ME2287'
Result = 0 records
The only difference between the two is the @.BrchID parameter.
The underlying view run with the same parameters as the second execution in
the WHERE clause returns records (7, to be exact) for the second set, but
the stored proc does not.
If I do this:
SELECT *
FROM
dbo.vwWebClaimDetailNext4
WHERE
([Date Handled] between '2/1/2006' and '3/3/2006')
AND ([Client ID] =2287)
and ARPCODE in ('A')
and BranchID = 'Mil#104'
and username = 'ME2287'
I get the right results...
I've been looking at the # sign as the culprit, but both branches have one
(as do many others).
Help?
--
Kevin Hill
3NF Consulting
www.3nf-inc.com/NewsGroups.htmNevermind...the @.brchid parameter isn't big enough to hold what is being
passed...
Thanks for looking :-)
Kevin Hill
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.expertsrt.com - not your average tech Q&A site
"Kevin3NF" <Kevin@.DontNeedNoSpam3NF-inc.com> wrote in message
news:ORLUL$ZQGHA.3896@.TK2MSFTNGP15.phx.gbl...
> ok...I must be blind.
> I have this procedure (which I didn't write):
> CREATE PROCEDURE dbo.spWebqryAccountList41257
> (@.StartDate nvarchar(15)
> ,@.EndDate nvarchar(15)
> ,@.ClientID int
> ,@.ArpCode nvarchar(15)
> ,@.brchid nvarchar(5)
> ,@.username nvarchar(10)
> )
> AS
> SELECT *
> FROM
> dbo.vwWebClaimDetailNext4
> WHERE
> ([Date Handled] between @.StartDate AND @.EndDate)
> AND ([Client ID] = @.ClientID)
> and ARPCODE in (@.ArpCode)
> and BranchID = @.brchid
> and username = @.username
>
> Note that all it is doing is selecting from a view and narrowing the
> results
> I have two executions:
> EXEC spWebqryAccountList41257
> @.StartDate = '2/1/2006',
> @.EndDate = '3/3/2006',
> @.ClientID = 2287,
> @.ARPCode = 'A',
> @.BrchID = 'A#79',
> @.Username = 'ME2287'
> Result = 4 records
> EXEC spWebqryAccountList41257
> @.StartDate = '2/1/2006',
> @.EndDate = '3/3/2006',
> @.ClientID = 2287,
> @.ARPCode = 'A',
> @.BrchID = 'Mil#104',
> @.Username = 'ME2287'
> Result = 0 records
> The only difference between the two is the @.BrchID parameter.
> The underlying view run with the same parameters as the second execution
> in the WHERE clause returns records (7, to be exact) for the second set,
> but the stored proc does not.
> If I do this:
> SELECT *
> FROM
> dbo.vwWebClaimDetailNext4
> WHERE
> ([Date Handled] between '2/1/2006' and '3/3/2006')
> AND ([Client ID] =2287)
> and ARPCODE in ('A')
> and BranchID = 'Mil#104'
> and username = 'ME2287'
> I get the right results...
> I've been looking at the # sign as the culprit, but both branches have one
> (as do many others).
> Help?
> --
> Kevin Hill
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
>
>
>

Wednesday, March 7, 2012

Missing projects/templates options?

I have a limited selection of projects.

I want to be able to create business intelligence project for reporting but the business intelligence project option is not there when I go to file/new/project.

When I first installed visual studio I chose visual basic/web development as the preference would this prevent other project types from being displayed?

After update from VSSP1 Vista Beta to VSSP1 (or was it update SQL 2005 SP2) I am missing in Visual Studio all Templates, except the Starter Kids and the Template for AJAX.

How can I reactivate the Templates again?

Thanks for help

Missing ODBC Drivers

I'm trying to connect a NT 4.0 Workstation to a ODBC database (SQL 2000). Wh
en I use the the ODBC Data Administrator on the WS to create a new DSN there
are no ODBC drivers available. How to install the missing driver?
Thanks for help!
DirkYou can download MDAC from the support.microsoft.com and install it. Pick a
version 2.6 or greater. By default, a SQL SErver ODBC driver is not
istalled on Windows NT 4.0. If an application has not been installed to
install the driver it probably will not be on the system. Installing MDAC
will install the ODBC driver.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||Thanks for help.

>Dirk