Showing posts with label management. Show all posts
Showing posts with label management. Show all posts

Friday, March 30, 2012

how to attach a .mdf file?

Hi,
i installed sqlserver express 2005.
I also use the sql server management studio express. I can connect to
(myserver\sqlexpress), but when i want to attach any existing .mdf file on
my disc, the window remains empty and i have not the opportunity to specify
a path.
Any idea how to fix this?
Thanks
BobYou also need the ldf file. Are you clicking the Add button in the attach
dialog box to browse for the file you want to attach?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <.> wrote in message news:u1RLbzeLHHA.1424@.TK2MSFTNGP04.phx.gbl...
> Hi,
> i installed sqlserver express 2005.
> I also use the sql server management studio express. I can connect to
> (myserver\sqlexpress), but when i want to attach any existing .mdf file on
> my disc, the window remains empty and i have not the opportunity to
> specify a path.
> Any idea how to fix this?
> Thanks
> Bob
>|||Hello,
In the SQL Server management studio express; go to query window and execute
SP_ATTACH_DB if you have both MDF and LDF files. If you have only MDF file
try sp_attach_single_file_db command. Take a look into books online for
usage.
Thanks
Hari
"Bob" <.> wrote in message news:u1RLbzeLHHA.1424@.TK2MSFTNGP04.phx.gbl...
> Hi,
> i installed sqlserver express 2005.
> I also use the sql server management studio express. I can connect to
> (myserver\sqlexpress), but when i want to attach any existing .mdf file on
> my disc, the window remains empty and i have not the opportunity to
> specify a path.
> Any idea how to fix this?
> Thanks
> Bob
>|||Hi, thanks for replying. I thing i become crazy. I desinstalled and
reinstalled it 2 times, but it still doen't work.
Yes, i have the ldf file.
When i click on ADD button, i get an error telling me that "cannot access
the sprecified path etc ...Verify that you have specific privileges ..."
I tried to add "myserver\aspnet" as account (server properties,
permissions), but then, it's always un recognized ...
I did sqlcmd -S myserver in the dos-box and i get:" name pipes provider:
could not open a connection to SQL Server"
And when i start an asp.net application, i get the error: "
An attempt to attach an auto-named database for file C:\myapp\my.mdf failed.
A database with the same name exists, or specified file cannot be opened, or
it is located on UNC share.
The only way it works is when doing ctrl-f5 in an application within VWD.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> schreef in bericht
news:uKalp4eLHHA.4244@.TK2MSFTNGP04.phx.gbl...
> You also need the ldf file. Are you clicking the Add button in the att
> dialog box to browse for the file you want to attach?
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Bob" <.> wrote in message news:u1RLbzeLHHA.1424@.TK2MSFTNGP04.phx.gbl...
>> Hi,
>> i installed sqlserver express 2005.
>> I also use the sql server management studio express. I can connect to
>> (myserver\sqlexpress), but when i want to attach any existing .mdf file
>> on my disc, the window remains empty and i have not the opportunity to
>> specify a path.
>> Any idea how to fix this?
>> Thanks
>> Bob
>|||Sounds like a security issue. When you attach through the debugger you
start up a user instance which attaches the database as the user who is
doing the debugging. When you attempt to attach using sqlcmd or the
workbench, you are attaching to the normal instance which runs as
networkservice by default. The problem is probably that network service
doesn't have write permission on the mdf and ldf files for your database.
There's more information about user instances here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/sqlexpuserinst.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <.> wrote in message news:u6TZOGoLHHA.4244@.TK2MSFTNGP04.phx.gbl...
> Hi, thanks for replying. I thing i become crazy. I desinstalled and
> reinstalled it 2 times, but it still doen't work.
> Yes, i have the ldf file.
> When i click on ADD button, i get an error telling me that "cannot access
> the sprecified path etc ...Verify that you have specific privileges ..."
> I tried to add "myserver\aspnet" as account (server properties,
> permissions), but then, it's always un recognized ...
> I did sqlcmd -S myserver in the dos-box and i get:" name pipes provider:
> could not open a connection to SQL Server"
> And when i start an asp.net application, i get the error: "
> An attempt to attach an auto-named database for file C:\myapp\my.mdf
> failed. A database with the same name exists, or specified file cannot be
> opened, or it is located on UNC share.
> The only way it works is when doing ctrl-f5 in an application within VWD.
>
>
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> schreef in bericht
> news:uKalp4eLHHA.4244@.TK2MSFTNGP04.phx.gbl...
>> You also need the ldf file. Are you clicking the Add button in the att
>> dialog box to browse for the file you want to attach?
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> Use of included script samples are subject to the terms specified at
>> http://www.microsoft.com/info/cpyright.htm
>> "Bob" <.> wrote in message news:u1RLbzeLHHA.1424@.TK2MSFTNGP04.phx.gbl...
>> Hi,
>> i installed sqlserver express 2005.
>> I also use the sql server management studio express. I can connect to
>> (myserver\sqlexpress), but when i want to attach any existing .mdf file
>> on my disc, the window remains empty and i have not the opportunity to
>> specify a path.
>> Any idea how to fix this?
>> Thanks
>> Bob
>>
>|||Hi, thanks for replying.
I started from the beginning but still with problems.
I post a new thread therefore.
"Hari Prasad" <hari_prasad_k@.hotmail.com> schreef in bericht
news:e08sUAfLHHA.780@.TK2MSFTNGP03.phx.gbl...
> Hello,
> In the SQL Server management studio express; go to query window and
> execute SP_ATTACH_DB if you have both MDF and LDF files. If you have only
> MDF file
> try sp_attach_single_file_db command. Take a look into books online for
> usage.
> Thanks
> Hari
>
> "Bob" <.> wrote in message news:u1RLbzeLHHA.1424@.TK2MSFTNGP04.phx.gbl...
>> Hi,
>> i installed sqlserver express 2005.
>> I also use the sql server management studio express. I can connect to
>> (myserver\sqlexpress), but when i want to attach any existing .mdf file
>> on my disc, the window remains empty and i have not the opportunity to
>> specify a path.
>> Any idea how to fix this?
>> Thanks
>> Bob
>sql

Wednesday, March 28, 2012

how to attach a .mdf file?

Hi,
i installed sqlserver express 2005.
I also use the sql server management studio express. I can connect to
(myserver\sqlexpress), but when i want to attach any existing .mdf file on
my disc, the window remains empty and i have not the opportunity to specify
a path.
Any idea how to fix this?
Thanks
BobYou also need the ldf file. Are you clicking the Add button in the attach
dialog box to browse for the file you want to attach?
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <.> wrote in message news:u1RLbzeLHHA.1424@.TK2MSFTNGP04.phx.gbl...
> Hi,
> i installed sqlserver express 2005.
> I also use the sql server management studio express. I can connect to
> (myserver\sqlexpress), but when i want to attach any existing .mdf file on
> my disc, the window remains empty and i have not the opportunity to
> specify a path.
> Any idea how to fix this?
> Thanks
> Bob
>|||Hello,
In the SQL Server management studio express; go to query window and execute
SP_ATTACH_DB if you have both MDF and LDF files. If you have only MDF file
try sp_attach_single_file_db command. Take a look into books online for
usage.
Thanks
Hari
"Bob" <.> wrote in message news:u1RLbzeLHHA.1424@.TK2MSFTNGP04.phx.gbl...
> Hi,
> i installed sqlserver express 2005.
> I also use the sql server management studio express. I can connect to
> (myserver\sqlexpress), but when i want to attach any existing .mdf file on
> my disc, the window remains empty and i have not the opportunity to
> specify a path.
> Any idea how to fix this?
> Thanks
> Bob
>|||Hi, thanks for replying. I thing i become crazy. I desinstalled and
reinstalled it 2 times, but it still doen't work.
Yes, i have the ldf file.
When i click on ADD button, i get an error telling me that "cannot access
the sprecified path etc ...Verify that you have specific privileges ..."
I tried to add "myserver\aspnet" as account (server properties,
permissions), but then, it's always un recognized ...
I did sqlcmd -S myserver in the dos-box and i get:" name pipes provider:
could not open a connection to SQL Server"
And when i start an asp.net application, i get the error: "
An attempt to attach an auto-named database for file C:\myapp\my.mdf failed.
A database with the same name exists, or specified file cannot be opened, or
it is located on UNC share.
The only way it works is when doing ctrl-f5 in an application within VWD.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> schreef in bericht
news:uKalp4eLHHA.4244@.TK2MSFTNGP04.phx.gbl...
> You also need the ldf file. Are you clicking the Add button in the att
> dialog box to browse for the file you want to attach?
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Bob" <.> wrote in message news:u1RLbzeLHHA.1424@.TK2MSFTNGP04.phx.gbl...
>|||Sounds like a security issue. When you attach through the debugger you
start up a user instance which attaches the database as the user who is
doing the debugging. When you attempt to attach using sqlcmd or the
workbench, you are attaching to the normal instance which runs as
networkservice by default. The problem is probably that network service
doesn't have write permission on the mdf and ldf files for your database.
There's more information about user instances here:
http://msdn.microsoft.com/library/d...>
userinst.asp
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <.> wrote in message news:u6TZOGoLHHA.4244@.TK2MSFTNGP04.phx.gbl...
> Hi, thanks for replying. I thing i become crazy. I desinstalled and
> reinstalled it 2 times, but it still doen't work.
> Yes, i have the ldf file.
> When i click on ADD button, i get an error telling me that "cannot access
> the sprecified path etc ...Verify that you have specific privileges ..."
> I tried to add "myserver\aspnet" as account (server properties,
> permissions), but then, it's always un recognized ...
> I did sqlcmd -S myserver in the dos-box and i get:" name pipes provider:
> could not open a connection to SQL Server"
> And when i start an asp.net application, i get the error: "
> An attempt to attach an auto-named database for file C:\myapp\my.mdf
> failed. A database with the same name exists, or specified file cannot be
> opened, or it is located on UNC share.
> The only way it works is when doing ctrl-f5 in an application within VWD.
>
>
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> schreef in bericht
> news:uKalp4eLHHA.4244@.TK2MSFTNGP04.phx.gbl...
>|||Hi, thanks for replying.
I started from the beginning but still with problems.
I post a new thread therefore.
"Hari Prasad" <hari_prasad_k@.hotmail.com> schreef in bericht
news:e08sUAfLHHA.780@.TK2MSFTNGP03.phx.gbl...
> Hello,
> In the SQL Server management studio express; go to query window and
> execute SP_ATTACH_DB if you have both MDF and LDF files. If you have only
> MDF file
> try sp_attach_single_file_db command. Take a look into books online for
> usage.
> Thanks
> Hari
>
> "Bob" <.> wrote in message news:u1RLbzeLHHA.1424@.TK2MSFTNGP04.phx.gbl...
>

Monday, March 12, 2012

How to add new user whit pass for new database

Hy,
I have question reagrding to SQL Server Authentication, I use SQL express and Microsoft SQL Server Management Studio Express. For creating and editing databases, I login whit Windows Authentication and it works fine, but as I need this new empty database for ASP script on my localhost ISS, I dont know what to enter for Username and Password as SQL Server Authentication.
Ex. here is this connection string where I need to enter U/P but what to enter if I use Windows Authentication?

strCon = "Provider=SQLOLEDB;Connection Timeout=90;Server=AMD\SQLEXPRESS;User ID=?;Password=?;Database=test_database;"

Connectionstrings can be found on www.connectionstrings.com , for Windows Authentication you would have to do something like this:

"Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;"

More details on this can be found on the site mentioned above.

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||

Have a look at this post from SQL Server Central on the Security and login functions for SQL Server 2005.

|||

Hy again,
thanx, I was able to create new SQL login whit pass, but now when I try to login whit that U/P I get this error:

Login failed for user 'test'. The user is not associated whit a trusted sql server connection.
Microsoft SQL server, Error: 18452

Then I search for microsoft for this error and try this http://support.microsoft.com/kb/269587/en-us but I still get the same error.

|||

hi,

in order to accept the changes, SQL Server service must be restart after you modify this security setting...

do you still have torubles?

regards

|||I have restarted ISS before, but I tryied to restart my computer and it works now finaly. Thanx to all!

Friday, March 9, 2012

How to add data in sql mobile database from sql server 2005 management studio

Hi,

After creating mobile database into sql server 2005 management studio, how to insert the records from sql server 2005 management studio into and mobile database from excel file?

Thank you

Prashant

There is no automatic tool (or out-of-box usable tool) which you can use to import data into SQL Mobile from excel or .csv file. You need to write a small app that reads the data/rwo from excel file and inserts into SQL Mobile database.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

Wednesday, March 7, 2012

How to add a New Server Registration for Reporting Services

I am trying to add a new server registration for Reporting Services. I am
using the Microsoft SQL Server Management Studio (SQL Server 2005). I also
have SQL Server 2000 installed. I placed 'LT-L31896\SQL05' in the 'Server
name:' field in the New Server Registration dialog and when I press the Test
button at the bottom, I receive the message
'Testing the registered server failed. Verify the server name, login
credentials. and database, and then click Test again.
Additional Information:
The Report Services WMI Provider is not installed or is misconfigured'
SQL Server 2000 uses the default instance name while I named the SQL Server
2005 instance 'LT-L31896\SQL05'.
Sorry if I didn't explain this correctly, I'm a developer and have limited
knowledge of SQL Server.
--
Dave B.are you sure that the server admin has granted you the appropriate
permissions ? double check with them.
Don't forget, you can register servers inside of VS 2005
"dmbuso" <dmbuso1@.community.nospam> wrote in message
news:E8F9244E-C283-49B7-92F8-D2A0E2B291F8@.microsoft.com...
>I am trying to add a new server registration for Reporting Services. I am
> using the Microsoft SQL Server Management Studio (SQL Server 2005). I also
> have SQL Server 2000 installed. I placed 'LT-L31896\SQL05' in the 'Server
> name:' field in the New Server Registration dialog and when I press the
> Test
> button at the bottom, I receive the message
> 'Testing the registered server failed. Verify the server name, login
> credentials. and database, and then click Test again.
> Additional Information:
> The Report Services WMI Provider is not installed or is misconfigured'
> SQL Server 2000 uses the default instance name while I named the SQL
> Server
> 2005 instance 'LT-L31896\SQL05'.
> Sorry if I didn't explain this correctly, I'm a developer and have limited
> knowledge of SQL Server.
> --
> Dave B.|||Hello Dave,
Could you please go to the Services to find the SQL Reporting Services.
What's the instance name after that service?
If is SQL05, then please contact your admin to grant your proper permission
to connect to the Reporting Services instance.
Also, please remember, the management studio could not connect to the SQL
2000 Reporting Services.
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thank you Wei Lu, this was helpful to me. It turns out that my demo version
of EE SQL2005 had no instance of Reporting Services running as a service. I
must have overlooked that when installing.
Question; I installed the EE so that I could learn. I recently discovered
the Developers Edition of SQL Server (x64) will allow me to learn, build, and
experience just as much as the EE. The problem is that in less than 6 months
my demo will expire. Can I retain all of my work, reports, stored procedures
and such by installing either the Standard Edition or the Developers Edition
when the time comes?
"Wei Lu [MSFT]" wrote:
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>