Showing posts with label location. Show all posts
Showing posts with label location. Show all posts

Wednesday, March 21, 2012

Creating a SQL Database File in a Specific Location

In SQL Server 9.0 (Standard Edition), I want to create a database from within
the Management Studio. But when I create it, I don't seem to have any control
of WHERE the actual database files are placed. I *must* be able to control
that somewhere, right?
Alex
Hi Alex
I presume you are using the New Database Dialog in Management Studio. In the
box where you supply the db name, you also supply all the details about each
of the files, including their physical location. When you scroll to the
right, you can see the text boxes for the path, and there is a button to
click to allow you to browse and choose a different path than the default.
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
news:EB0663C5-18DF-4ECB-8D43-3C36E6263CB9@.microsoft.com...
> In SQL Server 9.0 (Standard Edition), I want to create a database from
> within
> the Management Studio. But when I create it, I don't seem to have any
> control
> of WHERE the actual database files are placed. I *must* be able to control
> that somewhere, right?
> Alex
|||Alex
Yes you can specify the database file location
General-> under Database file(move the scroll bar right) section
VT
"Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
news:EB0663C5-18DF-4ECB-8D43-3C36E6263CB9@.microsoft.com...
> In SQL Server 9.0 (Standard Edition), I want to create a database from
> within
> the Management Studio. But when I create it, I don't seem to have any
> control
> of WHERE the actual database files are placed. I *must* be able to control
> that somewhere, right?
> Alex
|||In SQL Server Management Studio on the General page for creating a new
database you can expand the window or scroll to the right to see the Path
field. This is where you change the default location of the database files.
Regards,
Plamen Ratchev
http://www.SQLStudio.com
"Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
news:EB0663C5-18DF-4ECB-8D43-3C36E6263CB9@.microsoft.com...
> In SQL Server 9.0 (Standard Edition), I want to create a database from
> within
> the Management Studio. But when I create it, I don't seem to have any
> control
> of WHERE the actual database files are placed. I *must* be able to control
> that somewhere, right?
> Alex
|||Yeah, OOPS. Just found that Thanks.
"Kalen Delaney" wrote:

> Hi Alex
> I presume you are using the New Database Dialog in Management Studio. In the
> box where you supply the db name, you also supply all the details about each
> of the files, including their physical location. When you scroll to the
> right, you can see the text boxes for the path, and there is a button to
> click to allow you to browse and choose a different path than the default.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
> "Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
> news:EB0663C5-18DF-4ECB-8D43-3C36E6263CB9@.microsoft.com...
>
>

Creating a SQL Database File in a Specific Location

In SQL Server 9.0 (Standard Edition), I want to create a database from withi
n
the Management Studio. But when I create it, I don't seem to have any contro
l
of WHERE the actual database files are placed. I *must* be able to control
that somewhere, right?
AlexHi Alex
I presume you are using the New Database Dialog in Management Studio. In the
box where you supply the db name, you also supply all the details about each
of the files, including their physical location. When you scroll to the
right, you can see the text boxes for the path, and there is a button to
click to allow you to browse and choose a different path than the default.
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
news:EB0663C5-18DF-4ECB-8D43-3C36E6263CB9@.microsoft.com...
> In SQL Server 9.0 (Standard Edition), I want to create a database from
> within
> the Management Studio. But when I create it, I don't seem to have any
> control
> of WHERE the actual database files are placed. I *must* be able to control
> that somewhere, right?
> Alex|||Alex
Yes you can specify the database file location
General-> under Database file(move the scroll bar right) section
VT
"Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
news:EB0663C5-18DF-4ECB-8D43-3C36E6263CB9@.microsoft.com...
> In SQL Server 9.0 (Standard Edition), I want to create a database from
> within
> the Management Studio. But when I create it, I don't seem to have any
> control
> of WHERE the actual database files are placed. I *must* be able to control
> that somewhere, right?
> Alex|||In SQL Server Management Studio on the General page for creating a new
database you can expand the window or scroll to the right to see the Path
field. This is where you change the default location of the database files.
Regards,
Plamen Ratchev
http://www.SQLStudio.com
"Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
news:EB0663C5-18DF-4ECB-8D43-3C36E6263CB9@.microsoft.com...
> In SQL Server 9.0 (Standard Edition), I want to create a database from
> within
> the Management Studio. But when I create it, I don't seem to have any
> control
> of WHERE the actual database files are placed. I *must* be able to control
> that somewhere, right?
> Alex|||Yeah, OOPS. Just found that Thanks.
"Kalen Delaney" wrote:

> Hi Alex
> I presume you are using the New Database Dialog in Management Studio. In t
he
> box where you supply the db name, you also supply all the details about ea
ch
> of the files, including their physical location. When you scroll to the
> right, you can see the text boxes for the path, and there is a button to
> click to allow you to browse and choose a different path than the default.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
> "Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
> news:EB0663C5-18DF-4ECB-8D43-3C36E6263CB9@.microsoft.com...
>
>

Thursday, March 8, 2012

Creating a Login

Hi;

This may not be the correct location for this thread; but it does relate to what I'm trying to do.

I have SQL Server [2005] setup on a Windows XP pro system. I also have Windows 2003 server setup (on another system). I want to setup a login account for SQL Server using a domain account (defined on the Windows 2003 server configured with Active Directory). When I open locations list in the new Login dialog box I only see the local system [computer name]; no domain is listed [in the list].

Now I can see the other computers on the network (all registered with the domain managed by active directory); and can access the other computers (via domain account signon credentials), My guess is that things are setup properly.

What I'm not getting is how do I use domain accounts when setting up a new login for SQL Server. I have read a bunch of things and tried them all (like making sure DNS is installed on server system; loginig on to SQL Server machine with domain account) but nothing seems to work.

So my question is; does anyone know what I'm missing here -- should I be able to see the domain listed in the location list for SQL Server (that is installed on a XP system)?

Peter

hi peter,

Your windows XP should be a member of the domain.

In short, you should be able to login to the domain from your XP box.

for instruction on joining a domain please consult this links.

http://www.windowsnetworking.com/articles_tutorials/wxpjoind.html

thanks,

joey

|||

Hi;

I guess my question was unclear. All computers in the network are part of the domain. I'm not looking at how to connect an XP box to the domain; as my question stated; I am looking for information on creating a login account in SQL SERVER 2005 using a domain account. The problem I'm having is I cannot see any domain listed in the location list when creating thew new login for SQL SERVER.

Peter

|||

is this what u r looking for?

CREATE LOGIN [YourDomainName\DomainUserName] FROM WINDOWS;

Madhu

|||

Hi;

Wasn't looking for script. I am using SQL Server Management Studio and I am creating a new login from the new login dialog. One of the options in the new login dialog is a search (for user) accessed via the search button on the main dialog. This will bring up the standard Select User or Group dialog where you can select from a list of users recongized by the system. On the select User or Group dialog there is a button marked Location; and when selected it will bring up the standard location dialog. This dialog should show all the possible locations that can be used for locating a user. On my system it only shows the local computer [name]. The local computer is registered and belongs to a domain. My assumtion was that I should be able to see the domain [name] as one of the locations listed. It is not. I am trying to figure out how I get the domain to show up in the location list. The local computer is running Windows XP pro; and I wan't to know how to have it configured so that it shows the domain in the location list. I have tried a bunch of things recommended by others but I still cannot see the domain in the location list.

If I attempt to do what you had suggested via the dialog gui (i.e. DOMAINNAME\USERNAME) I get the following error when I do a check names on the specified user:

The object named "adomain\adomainuser" is not from the a domain listed in the Select Location dialog box, and is therefore not valid."

Peter|||

thats wonderful.

then....

Why dont you just

logging into to your XP box as the Domain Administrator?

if my memory servers me right

thats a member of the administrators NT group

which is by default administrator to Sql server as well

via builtin\administrator.

From there you should be able to access all Domain resources

If that is not possible... hehehe

try logging in using any of your domain accounts.

before doing anything in the box.

by the way...

Are your sql services running under

the domain account or local XP account?

The steps are of course.

1. make sure your box is a member of the domian

2. make sure you can login to the box using a domain account

3. your sql box services is runing under a domain account

no 3 should be a sure way to answer your problem

|||

Also I would like to suggest to contact your network administrator to see controllers in your domain. Depending on how you’ve set up Active Directory, you could miss a few of your domain controllers. The second way is a little bit more complicated, but barring any unforeseen circumstances, should always return a list of all your domain controllers.

Tuesday, February 14, 2012

Create view from cursor

I have multiple locations that I want to create views for each
individual location.

I am using a cursor to create the views for each location. So, the
cursor grabs site #1 then <should> create view_site_#1, then grab site
#2 and <should> create view_site_#2.

For some reason it doesn't like the view name with the @.site in it.
Any ideas of how to get this done?

Here's the cursor...

declare @.site varchar(5)

declare c_site cursor for
select station from VHAISLCAUDIA.VISN_SITE
order by station

open c_site
fetch from c_site
into @.site

while (@.@.fetch_status = 0)
begin

CREATE VIEW Site_All_Data_+ @.site
AS
SELECT *
FROM dbo.[600_All_Suggested_Data]
WHERE (Site = @.site)

Print 'View for ' + @.site + ' Created'

fetch next from c_site into @.site
end
close c_site
deallocate c_site
return

endThis is actually one of the few times that a cursor and dynamic SQL can
be useful; this administrative scripting is a great target for this
sort of stuff.

Anyway, you need to use dynamic SQL for this:

DECLARE @.tSite TABLE (site varchar(5))
INSERT INTO @.tSite
SELECT 'ABCDE'
UNION ALL
SELECT 'FGHIJ'

declare @.site varchar(5)
DECLARE @.SQL nvarchar(2000)

declare c_site cursor for
select site from @.tsite

open c_site
fetch from c_site
into @.site

while (@.@.fetch_status = 0)
begin

SET @.SQL = 'CREATE VIEW Site_All_Data_' + @.site + '
AS
SELECT *
FROM dbo.[600_All_Suggested_Data]
WHERE Site = ''' + @.site + ''''

exec (@.SQL)

Print 'View for ' + @.site + ' Created'

fetch next from c_site into @.site
end
close c_site
deallocate c_site

HTH,
Stu|||Worked like a charm!

Thanks for helping a developer that forgets the 'simple' stuff
sometimes.

db55

Create view "disconnected" (correct group this time)

Oops, I accidentally put this in the wrong newsgroup the first time. I
think this is a better location. Sorry for the double-post.
I occasionally need to create or alter a view that references a linked
server, where the linked server is not currently online (or my Internet
connection is not currently connected, or whatever).
An "Alter View" statement that references a linked server name will fail
with "Could not find server", "Login Failed" or other errors, if the server
is not accessible at the moment.
I sometimes don't care about this problem at the time that I *define* the
view (or stored procedure, or user-defined function); when I *run* the
view, procedure, or function, the linked server will be there, and things
will work.
I can't find how to get around this, which seems like a limitation of the
"Create View" and "Alter View" commands.
Thanks for any suggestions.
David Walker
Well, I replied in microsoft.public.sqlserver.server. - RLF
"DWalker" <none@.none.com> wrote in message
news:eRW7s8g1HHA.4584@.TK2MSFTNGP03.phx.gbl...
> Oops, I accidentally put this in the wrong newsgroup the first time. I
> think this is a better location. Sorry for the double-post.
>
> I occasionally need to create or alter a view that references a linked
> server, where the linked server is not currently online (or my Internet
> connection is not currently connected, or whatever).
> An "Alter View" statement that references a linked server name will fail
> with "Could not find server", "Login Failed" or other errors, if the
> server
> is not accessible at the moment.
> I sometimes don't care about this problem at the time that I *define* the
> view (or stored procedure, or user-defined function); when I *run* the
> view, procedure, or function, the linked server will be there, and things
> will work.
> I can't find how to get around this, which seems like a limitation of the
> "Create View" and "Alter View" commands.
> Thanks for any suggestions.
> David Walker
|||Hi David,
You can continue the communications under your other post in
microsoft.public.sqlserver.server. You are guaranteed to get Microsoft
assistance in MSDN managed newsgroup.
If you have any other questions or concerns, please feel free to let us
know.
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

Create view "disconnected" (correct group this time)

Oops, I accidentally put this in the wrong newsgroup the first time. I
think this is a better location. Sorry for the double-post.
I occasionally need to create or alter a view that references a linked
server, where the linked server is not currently online (or my Internet
connection is not currently connected, or whatever).
An "Alter View" statement that references a linked server name will fail
with "Could not find server", "Login Failed" or other errors, if the server
is not accessible at the moment.
I sometimes don't care about this problem at the time that I *define* the
view (or stored procedure, or user-defined function); when I *run* the
view, procedure, or function, the linked server will be there, and things
will work.
I can't find how to get around this, which seems like a limitation of the
"Create View" and "Alter View" commands.
Thanks for any suggestions.
David WalkerWell, I replied in microsoft.public.sqlserver.server. - RLF
"DWalker" <none@.none.com> wrote in message
news:eRW7s8g1HHA.4584@.TK2MSFTNGP03.phx.gbl...
> Oops, I accidentally put this in the wrong newsgroup the first time. I
> think this is a better location. Sorry for the double-post.
>
> I occasionally need to create or alter a view that references a linked
> server, where the linked server is not currently online (or my Internet
> connection is not currently connected, or whatever).
> An "Alter View" statement that references a linked server name will fail
> with "Could not find server", "Login Failed" or other errors, if the
> server
> is not accessible at the moment.
> I sometimes don't care about this problem at the time that I *define* the
> view (or stored procedure, or user-defined function); when I *run* the
> view, procedure, or function, the linked server will be there, and things
> will work.
> I can't find how to get around this, which seems like a limitation of the
> "Create View" and "Alter View" commands.
> Thanks for any suggestions.
> David Walker|||Hi David,
You can continue the communications under your other post in
microsoft.public.sqlserver.server. You are guaranteed to get Microsoft
assistance in MSDN managed newsgroup.
If you have any other questions or concerns, please feel free to let us
know.
Best regards,
Charles Wang
Microsoft Online Community Support
========================================
=============
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
========================================
==============
This posting is provided "AS IS" with no warranties, and confers no rights.
========================================
==============