Showing posts with label machine. Show all posts
Showing posts with label machine. Show all posts

Friday, March 30, 2012

How to attach mdf files which are residing on other machine

SQL Server 2005 and the related databases are on one server. Due to

space constraints I have to move one of the database(mdf & ldf) to

second server and access the same from the 1st server.

The following are the steps I ned to follow on the 1st server:

    Detached the database

    Moved the mdf & ldf files to 2nd machine/server

    Attach the database pointing to the 2nd server.

The 1st and 2nd steps went fine, the problem is with the 3rd step.

In the Attach Databases window, I clicked on ADD, it opened LOCATE

DATABASE FILE, the folder structure of the 1st server. Is there any way

I can change the SELECTED PATH and poin to the 2nd server?

I did even mapped network drive to the 2nd server but the mapped drive

is not getting displayed in the LOCATE DATABASE FILE folder structure.

Can we attach mdf/ldf files which reside on other machine?

Thanks in advance.

No - you can't use mdf, ldf or ndf files on devices which are not directly attached to SQL Server. It can't resolve shares, drive mappings, or redirects at this low a level.

Buck Woody

|||Network databases are normally not recommended. Unless your network storage meets strict I/O requirements, it's _not_ supported.

That's said, you can mount a network database if you enable trace flag 1807.

http://support.microsoft.com/kb/304261
http://msdn2.microsoft.com/en-us/library/ms176061.aspx
http://www.microsoft.com/sql/alwayson/default.mspx
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlIObasics.mspx

How to attach mdf files which are residing on other machine

SQL Server 2005 and the related databases are on one server. Due to space
constraints I have to move one of the database(mdf & ldf) to second server
and access the same from the 1st server.
The following are the steps I ned to follow on the 1st server:
1. Detached the database
2. Moved the mdf & ldf files to 2nd machine/server
3. Attach the database pointing to the 2nd server.
The 1st and 2nd steps went fine, the problem is with the 3rd step.
In the Attach Databases window, I clicked on ADD, it opened LOCATE DATABASE
FILE, the folder structure of the 1st server. Is there any way I can change
the SELECTED PATH and poin to the 2nd server?
I did even mapped network drive to the 2nd server but the mapped drive is
not getting displayed in the LOCATE DATABASE FILE folder structure.
Can we attach mdf/ldf files which reside on other machine?
Thanks in advance.> Can we attach mdf/ldf files which reside on other machine?
Short answer: No.
Long answer: Yes, with the proper trace flag, but you don't want to do that (trust me). See
http://support.microsoft.com/?id=304261
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mallykarjun" <mallykarjuna@.mallykarjuna.com> wrote in message
news:5e451cd9d0a042e2b8571d9eee45d779@.ureader.com...
> SQL Server 2005 and the related databases are on one server. Due to space
> constraints I have to move one of the database(mdf & ldf) to second server
> and access the same from the 1st server.
> The following are the steps I ned to follow on the 1st server:
> 1. Detached the database
> 2. Moved the mdf & ldf files to 2nd machine/server
> 3. Attach the database pointing to the 2nd server.
> The 1st and 2nd steps went fine, the problem is with the 3rd step.
> In the Attach Databases window, I clicked on ADD, it opened LOCATE DATABASE
> FILE, the folder structure of the 1st server. Is there any way I can change
> the SELECTED PATH and poin to the 2nd server?
> I did even mapped network drive to the 2nd server but the mapped drive is
> not getting displayed in the LOCATE DATABASE FILE folder structure.
> Can we attach mdf/ldf files which reside on other machine?
> Thanks in advance.

How to attach mdf files which are residing on other machine

SQL Server 2005 and the related databases are on one server. Due to space
constraints I have to move one of the database(mdf & ldf) to second server
and access the same from the 1st server.
The following are the steps I ned to follow on the 1st server:
1. Detached the database
2. Moved the mdf & ldf files to 2nd machine/server
3. Attach the database pointing to the 2nd server.
The 1st and 2nd steps went fine, the problem is with the 3rd step.
In the Attach Databases window, I clicked on ADD, it opened LOCATE DATABASE
FILE, the folder structure of the 1st server. Is there any way I can change
the SELECTED PATH and poin to the 2nd server?
I did even mapped network drive to the 2nd server but the mapped drive is
not getting displayed in the LOCATE DATABASE FILE folder structure.
Can we attach mdf/ldf files which reside on other machine?
Thanks in advance.> Can we attach mdf/ldf files which reside on other machine?
Short answer: No.
Long answer: Yes, with the proper trace flag, but you don't want to do that
(trust me). See
http://support.microsoft.com/?id=304261
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mallykarjun" <mallykarjuna@.mallykarjuna.com> wrote in message
news:5e451cd9d0a042e2b8571d9eee45d779@.ur
eader.com...
> SQL Server 2005 and the related databases are on one server. Due to space
> constraints I have to move one of the database(mdf & ldf) to second server
> and access the same from the 1st server.
> The following are the steps I ned to follow on the 1st server:
> 1. Detached the database
> 2. Moved the mdf & ldf files to 2nd machine/server
> 3. Attach the database pointing to the 2nd server.
> The 1st and 2nd steps went fine, the problem is with the 3rd step.
> In the Attach Databases window, I clicked on ADD, it opened LOCATE DATABAS
E
> FILE, the folder structure of the 1st server. Is there any way I can chang
e
> the SELECTED PATH and poin to the 2nd server?
> I did even mapped network drive to the 2nd server but the mapped drive is
> not getting displayed in the LOCATE DATABASE FILE folder structure.
> Can we attach mdf/ldf files which reside on other machine?
> Thanks in advance.

How to attach an .MDF file to another server?

Hi all

I am having trouble moving an .mdf file from a dev machine to a production machine.

On the dev machine(windows xp sp2 login <MyName>) I have an SSE instance - part of VisualStudio installation.
on the production machine I have only one full version SS instance called "PROD"(windows server 2k3, login Administrator) I do have SSMS installed too.

I create a website in VS on my dev machine. C:\Websites\Website1
I add to App_Data a new file: DB1.mdf
I add a couple of tables to DB1.mdf and maybe other objects etc. - all dbo.
Then I detach DB1.mdf and physically copy the file (without the .ldf as suggested in books online) via tha LAN.

from: C:\Websites\Website1\App_Data\DB1.mdf(dev machine)
to: C:\DB1.mdf (production machine)

I then try to attach C:\DB1.mdf to PROD and I get an error. The server is looking for a db by the name of the original path on the dev machine C:\Websites\Website1\App_Data\DB1.mdf There seems to be no way to rename the db.-not in VS before detaching it, not on PROD in the GUI to attach.

Just for kicks, I created the same folders on the production machine, so the file would have the same physical path as its name(which I still cannot change). C:\Websites\Website1\App_Data\DB1.mdf I even pasted the original .ldf file. This time it worked. I was able to attach it.

What is up with this? Is an .mdf file for ever stuck with the name of the path where it was first created?

This seems to be a most common scenario, even though I am not deploying a whole website.

Are we always supposed to execute our own script?

How are you reattaching the file ?

You should be able to use the command:

CREATE DATABASE database_name
ON
(name = logical_file_name,
filename = 'new file location')
FOR ATTACH

You'll need to know the logical_file_name that the mdf file uses. Find that out by running this command in the database before detaching:

select name from sysfiles where filename like '%.mdf'
|||

If you right click on the databases folder in Object Explorer in SSMS and select Attach... you get a UI to locate the .mdf file. The UI looks for the other files in database (.ndf or .ldf) in the locations specified in the .mdf file. If it doesn't find them there, it displays an error message for the files it can't find.

You can change the location where it is looking for the other files by editing the "Current File Path" in the lower grid. You can also remove the .ldf files from the grid (so it won't try to attach them) by selecting them in the grid and clicking on the Remove button.

Hope this helps,

Steve

|||

Thanks to both of you.

Both ways work now. I can't even duplicate the issue, and I remember I struggled for a while prior to posting a few days ago. It just didn't like that file name. I swear there is a voodoo ghost on the network!

Steven, I also played with some test UDFs and TVFs written in c#. I right-click deployed the assembly in visual studio. The test was to see what all I needed to do when I reattach the .mdf file. Well the functions work on the new machine just like that. So where is the .net assembly? Is the .dll embedded in the .mdf file? Because that is all I transferred.

Carl

How to attach a database using SQL Server 2005

Hello
In the full version of SQL Server I can use enterprise manager to attach a
database. I have an SQL Server 2005 database from another machine which I
want to attach to a new computer with SQL Server 2005 Express. Is there a
tool I can use or do I need to run a command?
Angushave you try the sp_attach stored procedure?
"Angus" <nospam@.gmail.com> wrote in message
news:#iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
> Hello
> In the full version of SQL Server I can use enterprise manager to attach a
> database. I have an SQL Server 2005 database from another machine which I
> want to attach to a new computer with SQL Server 2005 Express. Is there a
> tool I can use or do I need to run a command?
> Angus
>|||Yes I have found the sp_attach syntax - but how do I run these commands?
Can I run them from the command line? But if I navigate to prog
files\microsoft SQL Server\MSSQL.1\MSSQL\Binn\ - I cannot run eg sp_attach?
Is this not the right path?
Or have I maybe not installed something?
There is a Start menu item, Microsoft SQL Server 2005... Configuration
Tools... SQL Server Configuration Manager - but can't see where I could type
commands in there?
Angus
"Jeje" <willgart@.hotmail.com> wrote in message
news:uGaU5N8kHHA.2272@.TK2MSFTNGP02.phx.gbl...
> have you try the sp_attach stored procedure?
> "Angus" <nospam@.gmail.com> wrote in message
> news:#iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
> > Hello
> >
> > In the full version of SQL Server I can use enterprise manager to attach
a
> > database. I have an SQL Server 2005 database from another machine which
I
> > want to attach to a new computer with SQL Server 2005 Express. Is there
a
> > tool I can use or do I need to run a command?
> >
> > Angus
> >
> >|||"Angus" <nospam@.gmail.com> wrote in
news:ecHo7S8kHHA.4188@.TK2MSFTNGP02.phx.gbl:
> Yes I have found the sp_attach syntax - but how do I run these
> commands? Can I run them from the command line? But if I navigate to
> prog files\microsoft SQL Server\MSSQL.1\MSSQL\Binn\ - I cannot run eg
> sp_attach? Is this not the right path?
> Or have I maybe not installed something?
> There is a Start menu item, Microsoft SQL Server 2005... Configuration
> Tools... SQL Server Configuration Manager - but can't see where I
> could type commands in there?
You can use the OSQL command-line utility to run stored procedures. See
BOL for how to use it.
> Angus
> "Jeje" <willgart@.hotmail.com> wrote in message
> news:uGaU5N8kHHA.2272@.TK2MSFTNGP02.phx.gbl...
>> have you try the sp_attach stored procedure?
>> "Angus" <nospam@.gmail.com> wrote in message
>> news:#iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
>> > Hello
>> >
>> > In the full version of SQL Server I can use enterprise manager to
>> > attach
> a
>> > database. I have an SQL Server 2005 database from another machine
>> > which
> I
>> > want to attach to a new computer with SQL Server 2005 Express. Is
>> > there
> a
>> > tool I can use or do I need to run a command?
>> >
>> > Angus
>> >
>> >
>|||On Fri, 11 May 2007 12:52:21 +0100, "Angus" <nospam@.gmail.com> wrote:
>Hello
>In the full version of SQL Server I can use enterprise manager to attach a
>database. I have an SQL Server 2005 database from another machine which I
>want to attach to a new computer with SQL Server 2005 Express. Is there a
>tool I can use or do I need to run a command?
>Angus
SQL Server Management Studio Express has an attach command.
Click on Databases, right context mouse click, attach..
Another way to move a database from one machine to another is to make
a backup and then restore the backup to the new machine.|||Hi
CREATE DATABASE ...command has FOR ATTACH option ,please take a look at
BOL.
"Angus" <nospam@.gmail.com> wrote in message
news:%23iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
> Hello
> In the full version of SQL Server I can use enterprise manager to attach a
> database. I have an SQL Server 2005 database from another machine which I
> want to attach to a new computer with SQL Server 2005 Express. Is there a
> tool I can use or do I need to run a command?
> Angus
>

How to attach a database using SQL Server 2005

Hello
In the full version of SQL Server I can use enterprise manager to attach a
database. I have an SQL Server 2005 database from another machine which I
want to attach to a new computer with SQL Server 2005 Express. Is there a
tool I can use or do I need to run a command?
Angushave you try the sp_attach stored procedure?
"Angus" <nospam@.gmail.com> wrote in message
news:#iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
> Hello
> In the full version of SQL Server I can use enterprise manager to attach a
> database. I have an SQL Server 2005 database from another machine which I
> want to attach to a new computer with SQL Server 2005 Express. Is there a
> tool I can use or do I need to run a command?
> Angus
>|||Yes I have found the sp_attach syntax - but how do I run these commands?
Can I run them from the command line? But if I navigate to prog
files\microsoft SQL Server\MSSQL.1\MSSQL\Binn\ - I cannot run eg sp_attach?
Is this not the right path?
Or have I maybe not installed something?
There is a Start menu item, Microsoft SQL Server 2005... Configuration
Tools... SQL Server Configuration Manager - but can't see where I could type
commands in there?
Angus
"Jeje" <willgart@.hotmail.com> wrote in message
news:uGaU5N8kHHA.2272@.TK2MSFTNGP02.phx.gbl...[vbcol=seagreen]
> have you try the sp_attach stored procedure?
> "Angus" <nospam@.gmail.com> wrote in message
> news:#iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
a[vbcol=seagreen]
I[vbcol=seagreen]
a[vbcol=seagreen]|||"Angus" <nospam@.gmail.com> wrote in
news:ecHo7S8kHHA.4188@.TK2MSFTNGP02.phx.gbl:

> Yes I have found the sp_attach syntax - but how do I run these
> commands? Can I run them from the command line? But if I navigate to
> prog files\microsoft SQL Server\MSSQL.1\MSSQL\Binn\ - I cannot run eg
> sp_attach? Is this not the right path?
> Or have I maybe not installed something?
> There is a Start menu item, Microsoft SQL Server 2005... Configuration
> Tools... SQL Server Configuration Manager - but can't see where I
> could type commands in there?
You can use the OSQL command-line utility to run stored procedures. See
BOL for how to use it.

> Angus
> "Jeje" <willgart@.hotmail.com> wrote in message
> news:uGaU5N8kHHA.2272@.TK2MSFTNGP02.phx.gbl...
> a
> I
> a
>|||On Fri, 11 May 2007 12:52:21 +0100, "Angus" <nospam@.gmail.com> wrote:

>Hello
>In the full version of SQL Server I can use enterprise manager to attach a
>database. I have an SQL Server 2005 database from another machine which I
>want to attach to a new computer with SQL Server 2005 Express. Is there a
>tool I can use or do I need to run a command?
>Angus
SQL Server Management Studio Express has an attach command.
Click on Databases, right context mouse click, attach..
Another way to move a database from one machine to another is to make
a backup and then restore the backup to the new machine.|||Hi
CREATE DATABASE ...command has FOR ATTACH option ,please take a look at
BOL.
"Angus" <nospam@.gmail.com> wrote in message
news:%23iTQZL8kHHA.4936@.TK2MSFTNGP03.phx.gbl...
> Hello
> In the full version of SQL Server I can use enterprise manager to attach a
> database. I have an SQL Server 2005 database from another machine which I
> want to attach to a new computer with SQL Server 2005 Express. Is there a
> tool I can use or do I need to run a command?
> Angus
>sql

Wednesday, March 28, 2012

how to associate sql login with a trusted sql server connection?

Hello,
Last night I loaded a 2nd instance (development instance) of sql server on
my server machine (win2003). The first instance is the local server - serv1
.
The 2nd instance is serv1\dev. I loaded both instances using Windows
authentication. Note: the first instance was loaded on the default port of
1433. But for the 2nd instance, Setup assigned a default port of 0. I went
with port 0 and windows authentication. When I connect to serv1\dev in Quer
y
Analyzer through Windows authentication I connect OK. But I added a sql
login to serv1\dev. I can't connect to serv1\dev from Query Analyzer using
my sql login. The error message says that the login failed because my login
is not associated with a trusted sql server connection. So how do I
associate my sql login with a trusted sql server connection?
Note: On the original install I also added a sql login, and it works fine
from the server computer and from remote workstations. Why did the serv1
login work but not my new login on serv1\dev?
Thanks,
RichAfter doing a little research, I believe my problem is that I loaded
serv1\dev instance of sql server with Windows Authentication where I should
have selected Sql Authentication. When I register serv1\dev I can only
register it using Windows Authentication. Once the server is registered I g
o
into Edit Registration and select Sql authentication but it won't take
because my sql login is not associated with a trusted connection. Is there
a
way around this? Or do I need to re-install this instance?
"Rich" wrote:

> Hello,
> Last night I loaded a 2nd instance (development instance) of sql server on
> my server machine (win2003). The first instance is the local server - ser
v1.
> The 2nd instance is serv1\dev. I loaded both instances using Windows
> authentication. Note: the first instance was loaded on the default port
of
> 1433. But for the 2nd instance, Setup assigned a default port of 0. I we
nt
> with port 0 and windows authentication. When I connect to serv1\dev in Qu
ery
> Analyzer through Windows authentication I connect OK. But I added a sql
> login to serv1\dev. I can't connect to serv1\dev from Query Analyzer usin
g
> my sql login. The error message says that the login failed because my log
in
> is not associated with a trusted sql server connection. So how do I
> associate my sql login with a trusted sql server connection?
> Note: On the original install I also added a sql login, and it works fine
> from the server computer and from remote workstations. Why did the serv1
> login work but not my new login on serv1\dev?
> Thanks,
> Rich|||OK. I figured out the problem. I had to go into the serv1\dev server
properties and click on the "Sql and Windows Authentication" option. Now I
can connect using my sql login
"Rich" wrote:

> Hello,
> Last night I loaded a 2nd instance (development instance) of sql server on
> my server machine (win2003). The first instance is the local server - ser
v1.
> The 2nd instance is serv1\dev. I loaded both instances using Windows
> authentication. Note: the first instance was loaded on the default port
of
> 1433. But for the 2nd instance, Setup assigned a default port of 0. I we
nt
> with port 0 and windows authentication. When I connect to serv1\dev in Qu
ery
> Analyzer through Windows authentication I connect OK. But I added a sql
> login to serv1\dev. I can't connect to serv1\dev from Query Analyzer usin
g
> my sql login. The error message says that the login failed because my log
in
> is not associated with a trusted sql server connection. So how do I
> associate my sql login with a trusted sql server connection?
> Note: On the original install I also added a sql login, and it works fine
> from the server computer and from remote workstations. Why did the serv1
> login work but not my new login on serv1\dev?
> Thanks,
> Rich

How to assign roles to a user on reporting server through Web Service MEthod

I am using the Web service of SSRS to assign the roles for a user that exists on that reporting server machine.

I am using the followng code to do this.

Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetPolicies(@."/",p);

The same I have tried with SetSystemPolicy method also.

Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetSystemPolicies(p);

I have used the above codes in achieving the mapping between the SSRS role and the windows local user. Getting error on this.

Vikas

The code looks good to me. What kind of error did you get? There might be a couple of reasons for failing:

1. you do not have permission to perform this action

2. Role can be managed by user, "Content Manager" is a pre-defined role out of box. But it may have been deleted. You have to make sure the role exists. ListRoles soap APIs can get you the available roles.

3. There is already a policy associated with the same user.

...

|||

There is only one issue i see...

p[0].Roles = R;

Before calling SetPolicies.

How to assign roles to a user on reporting server through Web Service MEthod

I am using the Web service of SSRS to assign the roles for a user that exists on that reporting server machine.

I am using the followng code to do this.

Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetPolicies(@."/",p);

The same I have tried with SetSystemPolicy method also.

Policy[] p = new Policy[1];
p[0] = new Policy();
Role[] R = new Role[1];
R[0]= new Role();
R[0].Name = "Content Manager";
p[0].GroupUserName = "systemtest\user1";
rs.SetSystemPolicies(p);

I have used the above codes in achieving the mapping between the SSRS role and the windows local user. Getting error on this.

Vikas

The code looks good to me. What kind of error did you get? There might be a couple of reasons for failing:

1. you do not have permission to perform this action

2. Role can be managed by user, "Content Manager" is a pre-defined role out of box. But it may have been deleted. You have to make sure the role exists. ListRoles soap APIs can get you the available roles.

3. There is already a policy associated with the same user.

...

|||

There is only one issue i see...

p[0].Roles = R;

Before calling SetPolicies.

Monday, March 26, 2012

how to apply a sql script file on Sql server 2000 without OSql.exe

Hi guys

I need to apply a sql script file on Sql server 2000 by .net 2.0 program. but on the current running machine, there is not Osql.exe file. Do you guys know how to execute the sql file without the command? Is there any way provided in .net library ?

Thanks for you response!

This Should help.|||

Hi Ken

thanks for your response.

if my script file is long with comments,translation. if I combine all text lines in the file into one string to execute on sql, an error will be thrown out. how do you think that situation?

|||

Hi andi,

When you have installed a SQL Server instance, the osql.exe tool will always be installed. If you don't have SQL Server instance, the scripts cannot be applied to any SQL Server instance.

sql

Wednesday, March 21, 2012

how to allow anonymous login to rep services on local machine ?

Hi,
I cant seem to allow reporting services on 2003 SBS to accept anonymous
logon (i.e im always prompted for user/pass from windows).
I added EVERYONE and ANONYMOUS LOGON with full control to INETPUB and
C:\program files\Microsoft SQL server dirs and made sure these settings
replaced all child dirs security i.e cascaded down.
Its a stand alone machine for demos so im not worried about security.
Can someone help ?
Thanks
Scottok sorted it using the IIS dir security options.
scott

Wednesday, March 7, 2012

How to add a new instance to existing SQL Server 2000

Hi everybody,

I have an instance \VSdotNet for SQL Server 2000 on my machine. Now I want to create another instance called \NetSDK, so that the \NetSDK and \VSdotNet exist side by side.

Please let me know how I can do this.

Thanks
SunilPut the install disk in and follow the prompts ;)|||I do not have the disk since I downloaded the Net SDK in which SQL Server 2000 desktop is one component. But when I run the install program for SQL Server 2000, it says the SQL Server \NetSDk doesn't exist. Is there a tool that I can use to create a parallel instance.

Thanks
Sunil|||I've no idea what the rules are for "desktop" & "server" are but I'd uninstall destop and put Server on there twice - providing the licensing allows.

Sunday, February 19, 2012

How to access SQL Server 2005 with Query Analyzer (SQL 2000)

I'm not able to run queries on a MS SQL Server 2005 using the Query Analyzer
from an XP Pro machine running MS SQL 2000. I'm able to connect to the SQL
2005 server and display all objects in the Object Browser but can't run a
simple query. Any ideas?
By the way, I'm connecting with a new SQL account I created in SQL 2005 with
full rights.
What error message(s) are you getting?
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"Sal Young" <SalYoung@.discussions.microsoft.com> wrote in message
news:9BCEACF4-3E33-48B2-AB00-70AF2D087F5D@.microsoft.com...
> I'm not able to run queries on a MS SQL Server 2005 using the Query
> Analyzer
> from an XP Pro machine running MS SQL 2000. I'm able to connect to the
> SQL
> 2005 server and display all objects in the Object Browser but can't run a
> simple query. Any ideas?
> By the way, I'm connecting with a new SQL account I created in SQL 2005
> with
> full rights.
|||I'm running the following select statement to get a table does not exist error:
SELECT * FROM Address
"Gail Erickson [MS]" wrote:

> What error message(s) are you getting?
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> "Sal Young" <SalYoung@.discussions.microsoft.com> wrote in message
> news:9BCEACF4-3E33-48B2-AB00-70AF2D087F5D@.microsoft.com...
>
>
|||Sal Young wrote:
> I'm running the following select statement to get a table does not
> exist error:
> SELECT * FROM Address
>
I believe this was already addressed in another post (unless we're
dealing with two identifical posts from two users).
SQL Server databases use the concept of schemas. That is, objects may or
may not be owned by "dbo" - the general default from prior SQL versions.
Because of this, the schema must be supplied so SQL Server knows where
to look. The Address table in the AdventureWorks database is contained
in the Person schema. So try:
Select * from Person.Address
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||Query Analyzer does not fully support new SQL Server 2005 features. For
example, it does not recognize schema names in the Object Browser. So when
you look at the AdventureWorks objects in the Object Browser of QA, they all
appear to belong to dbo even though very few objects actually do. If you
want to continue to use QA for 2005 databases, you'll need to keep that in
mind. The SQL Server 2005 Books Online topic "AdventureWorks Data
Dictionary" lists all the tables and the schemas they are contained in.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:%234sqZta1FHA.4032@.TK2MSFTNGP15.phx.gbl...
> Sal Young wrote:
> I believe this was already addressed in another post (unless we're dealing
> with two identifical posts from two users).
> SQL Server databases use the concept of schemas. That is, objects may or
> may not be owned by "dbo" - the general default from prior SQL versions.
> Because of this, the schema must be supplied so SQL Server knows where to
> look. The Address table in the AdventureWorks database is contained in the
> Person schema. So try:
> Select * from Person.Address
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
|||I may just be me but I honestly think the SQL Server Management Studio is one
of the worst tool I have ever used. I wish they still had enterprise manager
and query analyzer for 2005. The new tools are so slow an bloated.
"Gail Erickson [MS]" wrote:

> Query Analyzer does not fully support new SQL Server 2005 features. For
> example, it does not recognize schema names in the Object Browser. So when
> you look at the AdventureWorks objects in the Object Browser of QA, they all
> appear to belong to dbo even though very few objects actually do. If you
> want to continue to use QA for 2005 databases, you'll need to keep that in
> mind. The SQL Server 2005 Books Online topic "AdventureWorks Data
> Dictionary" lists all the tables and the schemas they are contained in.
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> "David Gugick" <david.gugick-nospam@.quest.com> wrote in message
> news:%234sqZta1FHA.4032@.TK2MSFTNGP15.phx.gbl...
>
>