You have several options.
First one would be, of course, to use those 9,000,000 strings at programming time.
Then, you could make an array of strings, but you'll end up using arraysize*stringlength of memory, half of it wasted as your strings most likely aren't of the same length anyway. This is a lot better already design-wise. Plus side over linked list is that you can refer to each line with line[n] instead of searching through them every time.
Then we have linked lists, which allocate memory at run time and only the amount needed. I don't know which programming language you're using, but for example in VC++ you can simply use CList class for this. If you have thousands of lines you might consider holding a pointer to each line in an array to eliminate searching.
The above 3 are basically different ways to hold the data, now you'll need to consider how to read it. Basically if the game contains more than say 20 lines you should load them off a separate file, which you can lookup for each line, one at a time and only hold in memory the one at use. However, the bigger the game gets, the slower this method becomes, besides I don't like the idea of straining HD like that.
I'd probably use a linked list with an array of pointers, reading all the data at once from a file, or if your storyline allows it, a chapter at once or so. The advantage with linked list is that you can use a list of structures too, using a variable or two to define "rules" per line for the game.
Btw, when I was a kid I wrote a text game "reader" in QBasic, which read a file line by line, interpreted commands and showed texts. Basically the approach was that the executable could be used with any file, thus making several games and never touching the actual program, as long as the file to use follows the format I defined.
A few lines might have been something like this:
...
2ndchapter|$h=100|t:Beginning of Chapter 2.|g:line2|
line2|$h-5|!h<10:line4|t:You're hit by a rock and lose 5 hp. You have $h left. Take a turn left or right?|k1:L,line2|k2:R,line3|
line3|$g+500|t:You avoid the traps and get out of the dungeon.|end|
line4|t:You're hit by a rock and pass out. Story continues...|
...
Actually I'm quite proud I did something like that when I was like 10+, it allowed use of variables and everything. Shame I don't have it anymore
