Showing posts with label instance. Show all posts
Showing posts with label instance. Show all posts

Friday, March 30, 2012

Is using a named instance better over using a default instance?

If you were asked to install SQL 2005 on a machine, would u install a default instance or a named one? And why would u choose one over the other? Also, r there any issues with using a default instance?

Thank you for all your help.

Named instances allow for somewhat better server management -the names could reflect the SQL version. In an enviroment with lots of servers, various migration projects in play, and future upgrades, a simple way to know about the server is quite valuable.

For example:

Instance Name: LON_ACCT_Std05
Instance Name: NYC_HR_Ent05
Instance Name: DEN_INV_Exp05
Instance Name: LAX_ORD_Dev00

|||In addition, there is only one default instance on a machine. If you want to install multiple instances of SQL Server including 2000 and 2005, the rest should be named instances. Otherwise, setup will complain.|||

The other thing to think about is that the default instance name, MSSQLSERVER, is merely the defaul "named instance". No difference at all, but as pointed out, naming them allows you to describe them a bit.

Thanks,
Sam Lester (MSFT)

Wednesday, March 28, 2012

Is this SQL requirement possible?

I need a script that enumerates the the databases in a given instance of sql server. Then it needs to output the account with permissions on that server. Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Thanks a lot

1. "enumerates the the databases" -yes, possible.

2. "output the account with permissions" -yes, possible.

3. "search stored procedured for reference to specific file and account names loaded from a csv file" -yes, possible.

Any more detailed help requires more detailed information from you.

|||

What I don t understand is this:

"search stored procedured for reference to specific file and account names loaded from a csv file"?

would u be able to guess what that means and if possible give me an example of it, please?

Thanks a lot.

|||

I don't wish to continue playing 'guessing games' with you.

I have previously attempted to 'guess' what you had in mind when you made the original post. If my response doesn't seem 'close to the mark' for you, I suggest that you refine your question and repost.

|||

R.Tutus wrote:

I need a script that enumerates the the databases in a given instance of sql server. Then it needs to output the account with permissions on that server.

The following query will do this..

Create Table #ServerLoginDetails
(
DataBaseName Varchar(1000)
,LoginName Varchar(1000)
,MemberOf Varchar(1000)
)
Go
Exec sp_MSforeachdb 'Insert Into #ServerLoginDetails
Select ''?'',Users.Name Loginname, Isnull(Groups.Name,''NA'') MemberOf From ?..Sysusers Users
Left Outer Join ?..Sysmembers Members On Members.memberuid = Users.Uid
Left Outer Join ?..Sysusers Groups On Groups.Uid = Members.GroupUid And Groups.IsLogin=0
Where Users.IsLogin=1'

Select * from #ServerLoginDetails
Go
Drop Table #ServerLoginDetails

R.Tutus wrote:

Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Need more information buddy..

|||

That s perfect. Tell me what does the question mark "?" refer to in T-SQL. I used the script without it and i think ot still works. why do we hgave to use it?

Also you quoted the last question:

R.Tutus wrote:

Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Do u have a clue on what does means or how it can be solved.

Thanks a lot, i ll let u know if i have more questions in undersatanding your script.

|||

? will replace the database name when you execute the sp_MSForEachDB.

sp_MSForEachDB is one of the system SP but none of the online document guide you (Undocumented SPs)..

If you remove the ? from the query, you wont get all the database's users information. This SP will automatically enumerate each database and execute the query..

|||Please don't use this system stored procedure. It is not documented nor supported. So we can/will remove it or modify the behavior without notice in any version of SQL Server or service pack. Instead you should write your own SP that uses dynamic SQL to execute the cmd or use sp_executesql itself.|||

Yes I agree this...

So tried to change the logic with following query...

Create Table #ServerLoginDetails
(
DataBaseName Varchar(1000)
,LoginName Varchar(1000)
,MemberOf Varchar(1000)
)
Go
Declare @.DB Table (Query varchar(8000));
Declare @.Query as Varchar(5000);
Declare @.Count as int;

Select @.Query = 'Insert Into #ServerLoginDetails
Select ''?'',Users.Name Loginname, Isnull(Groups.Name,''NA'') MemberOf From ?..Sysusers Users
Left Outer Join ?..Sysmembers Members On Members.memberuid = Users.Uid
Left Outer Join ?..Sysusers Groups On Groups.Uid = Members.GroupUid And Groups.IsLogin=0
Where Users.IsLogin=1';

Insert Into @.DB
Select Replace(@.Query,'?',Name) From Master..Sysdatabases;

Select @.Count = Count(Query) from @.DB
While @.Count <> 0
Begin
Select @.Query=Query From @.DB;
Exec(@.Query);
Delete From @.DB Where Query=@.Query;
Select @.Count = Count(Query) from @.DB;
End

Select * from #ServerLoginDetails
Go
Drop Table #ServerLoginDetails

|||

can u explain a bit Mani pls:

what s the member table used for and how did u join the 2. ( i see the code ) but i need explanantions on what joined columns represent in order to understand.

also cn u explain to me just generally the last script, how different it s from the first. just generally.

Thanks a lot.

|||

How can I change the script above (that looks up the users of all the databases) so that I get the permissions as well.

Thank you.

Is this SQL requirement possible?

I need a script that enumerates the the databases in a given instance of sql server. Then it needs to output the account with permissions on that server. Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Thanks a lot

1. "enumerates the the databases" -yes, possible.

2. "output the account with permissions" -yes, possible.

3. "search stored procedured for reference to specific file and account names loaded from a csv file" -yes, possible.

Any more detailed help requires more detailed information from you.

|||

What I don t understand is this:

"search stored procedured for reference to specific file and account names loaded from a csv file"?

would u be able to guess what that means and if possible give me an example of it, please?

Thanks a lot.

|||

I don't wish to continue playing 'guessing games' with you.

I have previously attempted to 'guess' what you had in mind when you made the original post. If my response doesn't seem 'close to the mark' for you, I suggest that you refine your question and repost.

|||

R.Tutus wrote:

I need a script that enumerates the the databases in a given instance of sql server. Then it needs to output the account with permissions on that server.

The following query will do this..

Create Table #ServerLoginDetails
(
DataBaseName Varchar(1000)
,LoginName Varchar(1000)
,MemberOf Varchar(1000)
)
Go
Exec sp_MSforeachdb 'Insert Into #ServerLoginDetails
Select ''?'',Users.Name Loginname, Isnull(Groups.Name,''NA'') MemberOf From ?..Sysusers Users
Left Outer Join ?..Sysmembers Members On Members.memberuid = Users.Uid
Left Outer Join ?..Sysusers Groups On Groups.Uid = Members.GroupUid And Groups.IsLogin=0
Where Users.IsLogin=1'

Select * from #ServerLoginDetails
Go
Drop Table #ServerLoginDetails

R.Tutus wrote:

Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Need more information buddy..

|||

That s perfect. Tell me what does the question mark "?" refer to in T-SQL. I used the script without it and i think ot still works. why do we hgave to use it?

Also you quoted the last question:

R.Tutus wrote:

Finally it then needs to search stored procedured for reference to specific file and account names loaded from a csv file. The results should be output to a text file or displayed in an exportable window format.

Do u have a clue on what does means or how it can be solved.

Thanks a lot, i ll let u know if i have more questions in undersatanding your script.

|||

? will replace the database name when you execute the sp_MSForEachDB.

sp_MSForEachDB is one of the system SP but none of the online document guide you (Undocumented SPs)..

If you remove the ? from the query, you wont get all the database's users information. This SP will automatically enumerate each database and execute the query..

|||Please don't use this system stored procedure. It is not documented nor supported. So we can/will remove it or modify the behavior without notice in any version of SQL Server or service pack. Instead you should write your own SP that uses dynamic SQL to execute the cmd or use sp_executesql itself.|||

Yes I agree this...

So tried to change the logic with following query...

Create Table #ServerLoginDetails
(
DataBaseName Varchar(1000)
,LoginName Varchar(1000)
,MemberOf Varchar(1000)
)
Go
Declare @.DB Table (Query varchar(8000));
Declare @.Query as Varchar(5000);
Declare @.Count as int;

Select @.Query = 'Insert Into #ServerLoginDetails
Select ''?'',Users.Name Loginname, Isnull(Groups.Name,''NA'') MemberOf From ?..Sysusers Users
Left Outer Join ?..Sysmembers Members On Members.memberuid = Users.Uid
Left Outer Join ?..Sysusers Groups On Groups.Uid = Members.GroupUid And Groups.IsLogin=0
Where Users.IsLogin=1';

Insert Into @.DB
Select Replace(@.Query,'?',Name) From Master..Sysdatabases;

Select @.Count = Count(Query) from @.DB
While @.Count <> 0
Begin
Select @.Query=Query From @.DB;
Exec(@.Query);
Delete From @.DB Where Query=@.Query;
Select @.Count = Count(Query) from @.DB;
End

Select * from #ServerLoginDetails
Go
Drop Table #ServerLoginDetails

|||

can u explain a bit Mani pls:

what s the member table used for and how did u join the 2. ( i see the code ) but i need explanantions on what joined columns represent in order to understand.

also cn u explain to me just generally the last script, how different it s from the first. just generally.

Thanks a lot.

|||

How can I change the script above (that looks up the users of all the databases) so that I get the permissions as well.

Thank you.

Monday, March 26, 2012

Is this possible

Hi,
Is it possible to hide an instance of SQL Server so that it doesn't show up
when you open Ent Manager or SQL Query Analyser?
Thanks
Using the Server Network Utility, you can check the 'hide server' box under
the network protocol properties.
Hope this helps.
Dan Guzman
SQL Server MVP
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:4B7E30BD-A02B-42A1-8B97-03EC5C70A584@.microsoft.com...
> Hi,
> Is it possible to hide an instance of SQL Server so that it doesn't show
> up
> when you open Ent Manager or SQL Query Analyser?
> Thanks
|||Why do you want to do that? You could stop the service if you would like to.
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:4B7E30BD-A02B-42A1-8B97-03EC5C70A584@.microsoft.com...
> Hi,
> Is it possible to hide an instance of SQL Server so that it doesn't show
up
> when you open Ent Manager or SQL Query Analyser?
> Thanks

Friday, March 23, 2012

Is this possible

Hi,
Is it possible to hide an instance of SQL Server so that it doesn't show up
when you open Ent Manager or SQL Query Analyser?
ThanksUsing the Server Network Utility, you can check the 'hide server' box under
the network protocol properties.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:4B7E30BD-A02B-42A1-8B97-03EC5C70A584@.microsoft.com...
> Hi,
> Is it possible to hide an instance of SQL Server so that it doesn't show
> up
> when you open Ent Manager or SQL Query Analyser?
> Thanks|||Why do you want to do that? You could stop the service if you would like to.
--
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:4B7E30BD-A02B-42A1-8B97-03EC5C70A584@.microsoft.com...
> Hi,
> Is it possible to hide an instance of SQL Server so that it doesn't show
up
> when you open Ent Manager or SQL Query Analyser?
> Thanks

Is this possible

Hi,
Is it possible to hide an instance of SQL Server so that it doesn't show up
when you open Ent Manager or SQL Query Analyser?
ThanksUsing the Server Network Utility, you can check the 'hide server' box under
the network protocol properties.
Hope this helps.
Dan Guzman
SQL Server MVP
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:4B7E30BD-A02B-42A1-8B97-03EC5C70A584@.microsoft.com...
> Hi,
> Is it possible to hide an instance of SQL Server so that it doesn't show
> up
> when you open Ent Manager or SQL Query Analyser?
> Thanks|||Why do you want to do that? You could stop the service if you would like to.
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:4B7E30BD-A02B-42A1-8B97-03EC5C70A584@.microsoft.com...
> Hi,
> Is it possible to hide an instance of SQL Server so that it doesn't show
up
> when you open Ent Manager or SQL Query Analyser?
> Thanks

Monday, March 12, 2012

Is there necessary remove named instance alias after...

Hi,
I was told by someone that after install clustering SQL Server 2000 named
instance, it must remove that before installation made the alias. Is that
necessary? What if I leave the alias named instance in the server?
Thanks!
-Chen
Hi Chen,
I hope I'm understanding your question correctly.
It seems that you have installed a SQL 2000 Named Instance on a Windows
2003 Cluster. This requires an alias using Named Pipes for setup to run
properly.
Your question appears to be, do you have to remove it?
Technically, no, you don't have to remove the alias. However, cluster, sql
agent, and other local applications will continue to connect to SQL using
Named Pipes. There isn't an issue with this, but if you have an
application that specifically needs to use TCP, you will want to remove the
alias, or at least change it to TCP.
Hope that helps!
Donna Lambert
Microsoft PSS
SQL Server Support

Wednesday, March 7, 2012

Is there any way to deploy an SSIS Package (File Mode) to an App Server without SQL Instance?

We would like to deploy SSIS packages as an ETL Tool to an appserver that does not have SQL Server 2005 installed. Is this possible, or does it HAVE to be executed on the server with SQL 2005 installed?

Kevin
SQL Server (the database engine) doesn't have to be installed. However, you will need to install the SSIS full client (from the SQL Server installation media) and have a valid SQL Server license for that machine.|||

What Phil said is true that you can do this, however, there are other considerations on why you may not want to.

One main reason is if you are moving large amount of data through SSIS. If you have it on a seperate machine:

[Source Machine] - - - large amount of data - - > [SSIS machine] - - - large amoutn of data - - > [destination machine]

VS

[Source Machine] - - - large amount of data - - > [SSIS/Desitination machine]

As you can see, you will be moving large sets of data accross your network twice.

Friday, February 24, 2012

Is there any sample code to demo the SSB send messages with same sql instance?

Is there any sample code to demo the SSB send messages with same sql instance?

my case is very simple:

I want write a stored procedure to send a xml to another database. The stored procedure is called by tables triggers when some data is changed under the specific conditions.

this should be exactly what you need:

http://www.sqlteam.com/article/centralized-asynchronous-auditing-with-service-broker

Monday, February 20, 2012

Is there any advantage for creating a default instance vs. a named

Hello, DBA outthere.
I understand that SQL Server 2000 allows 1 default instance and up to 15
named instances per server. I believe the default instance needs to be
created first.
Is there any reason to have more than 1 instance per server? Does having
more than one instance affect the overall SQL server performance? SQL
2000 server also allows server alias if users to have different server
naming.
I usually create named instance for new installation instead of letting
the SQL setup create the default instance. I had some run-ins with using
named instance. Some not-so-well-prepared application setups looks into
the registry for default instance
(HKL\Software\Microsoft\MSSQLServer\MSSQLServer). If whatever they looks
for is not there, the application will fail. Developers need to take
into account that as SQL Server allows DBA to create either default or
named instance or both.
In any event, give share your thoughts on using default or named instance.
Thanks.
JJ.Hi
Having multiple instances will stretch your resources more. You may want to
create multiple instances if you have a packaged application that require
specific settings or maybe because of issues of security.
I don't think you have to create the default instance first although I have
never tried doing otherwise!
John
"John Joe" <yukondba@.hotmail-lessspam.com> wrote in message
news:%234L5alHiEHA.592@.TK2MSFTNGP11.phx.gbl...
> Hello, DBA outthere.
> I understand that SQL Server 2000 allows 1 default instance and up to 15
> named instances per server. I believe the default instance needs to be
> created first.
> Is there any reason to have more than 1 instance per server? Does having
> more than one instance affect the overall SQL server performance? SQL
> 2000 server also allows server alias if users to have different server
> naming.
> I usually create named instance for new installation instead of letting
> the SQL setup create the default instance. I had some run-ins with using
> named instance. Some not-so-well-prepared application setups looks into
> the registry for default instance
> (HKL\Software\Microsoft\MSSQLServer\MSSQLServer). If whatever they looks
> for is not there, the application will fail. Developers need to take
> into account that as SQL Server allows DBA to create either default or
> named instance or both.
> In any event, give share your thoughts on using default or named instance.
> Thanks.
> JJ.