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

Monday, March 26, 2012

Read Only Database

Hi guys,
I'm using SQL Server 2005 Express. When i'm attaching My project database through "SQl Server Management Studio" The database is getting attached as a 'Read only' database. But when i'm attaching the same database from command prompt or using a batch file it is getting attached normally.
The database is from another system. It is behaving the same on the parent system on which it is developed.

Look at the attributes and the permissions:

"A variation of this issue is when the user that opens the user instance connection has read permissions on the database files but does not have write permissions. In this case, SQL Server attaches the database as a READ_ONLY database. If you get a message saying that the database is opened as read only, you need to change the permissions on the database file. "

http://msdn2.microsoft.com/en-us/library/bb264564.aspx

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||Hi Jens
thankQ very much for your reply.
Can you suggest me how can i change the permissions on the database file.
I've given full access permissions for the folder contaning the database files, but still the problem is the same.|||

hi,

you have to grant NTFS permissions to the account running the SQL Server instance..

regards

|||

Make also sure that the appropiate file attributes are not set like readonly / archive. This can also prevent the service from opening the file in a writeable mode.

Jens K. Suessmeyer


http://www.sqlserver2005.de

Read only database

hi

I'm having a problem while attaching the database to the server through server management studio. The database is getting attached as read only database.

But when i'm attaching it through command prompt or using a batch file it is getting attached properly

Can any one suggest the rason and a reamedy for avoiding this problem

Where does this database come from?|||The database is from another system/ computer. It is behaving the same on that computer also|||

Databases can be marked as read-only. You should check the other system to see if the database was marked that way. Check the database proprties, Options page under State (in 2005, not sure where this is in 2000). The read-only flag travels with the database, you'll need to un-set it at the source before moving the database.

Mike

sql

Wednesday, March 21, 2012

Read BLOB under SQL 2005 Management Studio -> Open Table.

How to read the content of a BLOB field under SQL 2005 Management Studio?
under the Management Studio, how to tell the blob field contain information
or not.
Does the BLOB content store in the .mdb file or somewhere else?
Is there any way or tools available for me to look at the content in the BLOB
field without writing some code?
"John Bell" wrote:

> Hi
> I assume you are using the Open table option in SSMS, in which case if your
> column has data it will say <binary data> if you have data in a image or
> varbinary column. If you ran select query in a query windows against the
> column you would see the data itself. Blob data is stored in the database,
> with SQL 2008 and the filestream option for varbinary(max) you can store
> your blobs on the filesystem.
> John
> "Kam" <Kam@.discussions.microsoft.com> wrote in message
> news:C2B2D7F0-5C73-4EBC-9D2C-48EDAF73C29D@.microsoft.com...
>
>
|||If you are talking about some kind of general-purpose GUI tools, I'm afraid
not because what is stored in an image column is just a bit stream, and SQL
Server doesn't care about its semantics, i.e. what the content actually
represent. For a tool to properly display the content of an image column, it
would have to understand the semantics of the image values. When one value
can be a Word file, another can be an Excel file, another can be of an
arbitrary 3rd-party file format, and yet another can be a custom binary file,
no general-purpose tool can handle them all.
Linchi
"Kam" wrote:
[vbcol=seagreen]
> Is there any way or tools available for me to look at the content in the BLOB
> field without writing some code?
> "John Bell" wrote:

Read BLOB under SQL 2005 Management Studio -> Open Table.

How to read the content of a BLOB field under SQL 2005 Management Studio?
under the Management Studio, how to tell the blob field contain information
or not.
Does the BLOB content store in the .mdb file or somewhere else?Hi
I assume you are using the Open table option in SSMS, in which case if your
column has data it will say <binary data> if you have data in a image or
varbinary column. If you ran select query in a query windows against the
column you would see the data itself. Blob data is stored in the database,
with SQL 2008 and the filestream option for varbinary(max) you can store
your blobs on the filesystem.
John
"Kam" <Kam@.discussions.microsoft.com> wrote in message
news:C2B2D7F0-5C73-4EBC-9D2C-48EDAF73C29D@.microsoft.com...
> How to read the content of a BLOB field under SQL 2005 Management Studio?
> under the Management Studio, how to tell the blob field contain
> information
> or not.
> Does the BLOB content store in the .mdb file or somewhere else?
>
>|||Is there any way or tools available for me to look at the content in the BLOB
field without writing some code?
"John Bell" wrote:
> Hi
> I assume you are using the Open table option in SSMS, in which case if your
> column has data it will say <binary data> if you have data in a image or
> varbinary column. If you ran select query in a query windows against the
> column you would see the data itself. Blob data is stored in the database,
> with SQL 2008 and the filestream option for varbinary(max) you can store
> your blobs on the filesystem.
> John
> "Kam" <Kam@.discussions.microsoft.com> wrote in message
> news:C2B2D7F0-5C73-4EBC-9D2C-48EDAF73C29D@.microsoft.com...
> > How to read the content of a BLOB field under SQL 2005 Management Studio?
> >
> > under the Management Studio, how to tell the blob field contain
> > information
> > or not.
> >
> > Does the BLOB content store in the .mdb file or somewhere else?
> >
> >
> >
>
>|||If you are talking about some kind of general-purpose GUI tools, I'm afraid
not because what is stored in an image column is just a bit stream, and SQL
Server doesn't care about its semantics, i.e. what the content actually
represent. For a tool to properly display the content of an image column, it
would have to understand the semantics of the image values. When one value
can be a Word file, another can be an Excel file, another can be of an
arbitrary 3rd-party file format, and yet another can be a custom binary file,
no general-purpose tool can handle them all.
Linchi
"Kam" wrote:
> Is there any way or tools available for me to look at the content in the BLOB
> field without writing some code?
> "John Bell" wrote:
> > Hi
> >
> > I assume you are using the Open table option in SSMS, in which case if your
> > column has data it will say <binary data> if you have data in a image or
> > varbinary column. If you ran select query in a query windows against the
> > column you would see the data itself. Blob data is stored in the database,
> > with SQL 2008 and the filestream option for varbinary(max) you can store
> > your blobs on the filesystem.
> >
> > John
> >
> > "Kam" <Kam@.discussions.microsoft.com> wrote in message
> > news:C2B2D7F0-5C73-4EBC-9D2C-48EDAF73C29D@.microsoft.com...
> > > How to read the content of a BLOB field under SQL 2005 Management Studio?
> > >
> > > under the Management Studio, how to tell the blob field contain
> > > information
> > > or not.
> > >
> > > Does the BLOB content store in the .mdb file or somewhere else?
> > >
> > >
> > >
> >
> >
> >

Monday, February 20, 2012

Rather odd functionality in Management Studio

Hi,

I have found some nice functionality in SQL Server Management Studio (I'm using the Developer Edition) that appears to me to be about reverse from what it should be.

If you start to create a View, the Query Designer opens. If you add a Parameter to your query, you get an error message saying that it is not valid in this type of query (of course). If you continue and then execute the query, a nice dialogue opens and invites you to enter the values to complete running the query. Nice, you can test your SQL. But of course you can't save. (You could cut and paste the tested SQL of course).

You get the same functionality when adding a query using VS2005 dataset designer, but here it is called the Query Builder! And without the error message of course.

On the otherhand, start to create a new Query, a text editor opens. Right click to start the Query Designer. Now write the same query, but there is no ability to run from the Designer. Close the designer, and if you try to run, you get an error message because the SQL is not parsed for the parameters!

Have others found this and thought it odd?

Thanks

John

Yes, this is odd and based ont he fact that the two UIs are own by different program groups at Microsoft. in further versions they will be aligned but until then you will have the different behaviour.

Jens K. Suessmeyer.

http://www.sqlserver2005.de